diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-05-04 19:37:28 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-05-04 19:37:28 -0400 |
commit | e43736eda4df49bd1c592ba1c7a7c26bcc6a2083 (patch) | |
tree | 9b5b782f2453da1db43e9217639d01aacc850632 | |
parent | 8fdf19844c061923424835054b66c2d3380662a9 (diff) |
fdo#36848: Typing a named range in the position window should jump.
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 4e88c19bf..3907c6d79 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1533,7 +1533,7 @@ ScNameInputType lcl_GetInputType( const String& rText ) sal_Int32 nNumeric; if ( aRange.Parse( rText, pDoc, eConv ) & SCA_VALID ) - eRet = SC_NAME_INPUT_NAMEDRANGE; + eRet = SC_NAME_INPUT_RANGE; else if ( aAddress.Parse( rText, pDoc, eConv ) & SCA_VALID ) eRet = SC_NAME_INPUT_CELL; else if ( aRangeUtil.MakeRangeFromName( rText, pDoc, nTab, aRange, RUTL_NAMES, eConv ) ) @@ -1697,11 +1697,14 @@ void ScPosWnd::DoEnter() else { // for all selection types, excecute the SID_CURRENTCELL slot. - // Note that SID_CURRENTCELL always expects address to be - // in Calc A1 format. Convert the text. - ScRange aRange; - aRange.ParseAny(aText, pDoc, pDoc->GetAddressConvention()); - aRange.Format(aText, SCR_ABS_3D, pDoc, ::formula::FormulaGrammar::CONV_OOO); + if (eType == SC_NAME_INPUT_CELL || eType == SC_NAME_INPUT_RANGE) + { + // Note that SID_CURRENTCELL always expects address to + // be in Calc A1 format. Convert the text. + ScRange aRange; + aRange.ParseAny(aText, pDoc, pDoc->GetAddressConvention()); + aRange.Format(aText, SCR_ABS_3D, pDoc, ::formula::FormulaGrammar::CONV_OOO); + } SfxStringItem aPosItem( SID_CURRENTCELL, aText ); SfxBoolItem aUnmarkItem( FN_PARAM_1, sal_True ); // remove existing selection |