summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-09-26 00:34:14 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-09-26 18:15:14 +0200
commit74d3dd420bd80f88dd7e1078dd500aba8841aa44 (patch)
tree65af078fa814a8073e63a239040d5bb3f40f3bdf /sc
parenta953cae319ce4e09626a6f0aae8f84fbb1dc6cf1 (diff)
add "Manage Names..." entry to Name Box/ScPosWnd
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/globstr.hrc7
-rw-r--r--sc/source/ui/app/inputwin.cxx19
-rw-r--r--sc/source/ui/src/globstr.src4
3 files changed, 26 insertions, 4 deletions
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 67170455dfa9..4e88a8e50ef1 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_MANAGE_NAMES 458
+
+#define STR_COUNT 459
-#define STR_COUNT 458
#endif
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 6c26f3d3b952..1ae6f33a42c2 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 fa9a9df2396c..9a1a42f060e7 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...";
+ };
};