add "Manage Names..." entry to Name Box/ScPosWnd
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 6717045..4e88a8e 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -588,8 +588,11 @@
#define STR_FORM_SPINNER 455
#define STR_FORM_SCROLLBAR 456
#define STR_PGNUM 457
#define STR_PGNUM 457
#define STR_COUNT 458
#define STR_MANAGE_NAMES 458
#define STR_COUNT 459
#endif
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 6c26f3d..1ae6f33 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -60,6 +60,7 @@
#include "scresid.hxx"
#include "sc.hrc"
#include "globstr.hrc"
#include "reffact.hxx"
#include "editutil.hxx"
#include "inputhdl.hxx"
#include "tabvwsh.hxx"
@@ -95,7 +96,8 @@ enum ScNameInputType
SC_NAME_INPUT_SHEET,
SC_NAME_INPUT_DEFINE,
SC_NAME_INPUT_BAD_NAME,
SC_NAME_INPUT_BAD_SELECTION
SC_NAME_INPUT_BAD_SELECTION,
SC_MANAGE_NAMES
};
@@ -1832,6 +1834,9 @@ void ScPosWnd::FillRangeNames()
{
ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument();
InsertEntry(ScGlobal::GetRscString( STR_MANAGE_NAMES ));
SetSeparatorPos(0);
ScRange aDummy;
std::set<rtl::OUString> aSet;
ScRangeName* pRangeNames = pDoc->GetRangeName();
@@ -1958,7 +1963,9 @@ ScNameInputType lcl_GetInputType( const String& rText )
SCTAB nNameTab;
sal_Int32 nNumeric;
if ( aRange.Parse( rText, pDoc, eConv ) & SCA_VALID )
if (rText == ScGlobal::GetRscString(STR_MANAGE_NAMES))
eRet = SC_MANAGE_NAMES;
else if ( aRange.Parse( rText, pDoc, eConv ) & SCA_VALID )
eRet = SC_NAME_INPUT_RANGE;
else if ( aAddress.Parse( rText, pDoc, eConv ) & SCA_VALID )
eRet = SC_NAME_INPUT_CELL;
@@ -2118,6 +2125,14 @@ void ScPosWnd::DoEnter()
}
}
}
else if (eType == SC_MANAGE_NAMES)
{
sal_uInt16 nId = ScNameDlgWrapper::GetChildWindowId();
SfxViewFrame* pViewFrm = pViewSh->GetViewFrame();
SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
SC_MOD()->SetRefDialog( nId, pWnd ? false : sal_True );
}
else
{
// for all selection types, excecute the SID_CURRENTCELL slot.
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index fa9a9df..9a1a42f 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -1823,5 +1823,9 @@ Resource RID_GLOBSTR
{
Text [ en-US ] = "Insert Current Time";
};
String STR_MANAGE_NAMES
{
Text [ en-US ] = "Manage Names...";
};
};