[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed May 4 16:39:09 PDT 2011


 sc/source/ui/app/inputwin.cxx |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit e43736eda4df49bd1c592ba1c7a7c26bcc6a2083
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed May 4 19:37:28 2011 -0400

    fdo#36848: Typing a named range in the position window should jump.

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 4e88c19..3907c6d 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


More information about the Libreoffice-commits mailing list