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

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Jun 15 12:21:23 PDT 2011


 sc/source/core/tool/compiler.cxx |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 18eaab9989d02e05e6c11e707107ad0a90c596eb
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Jun 15 20:56:17 2011 +0200

    give local range names higher priority than global ones
    
    Signed-off-by: Kohei Yoshida <kyoshida at novell.com>

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 7ebcb9f..b61b146 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2892,18 +2892,17 @@ sal_Bool ScCompiler::IsNamedRange( const String& rUpperName )
 {
     // IsNamedRange is called only from NextNewToken, with an upper-case string
 
-    // Try global named ranges first, then sheet local next.  BTW does this
-    // order matter?
-    bool bGlobal = true;
-    ScRangeName* pRangeName = pDoc->GetRangeName();
+    // try local names first
+    bool bGlobal = false;
+    ScRangeName* pRangeName = pDoc->GetRangeName(aPos.Tab());
     const ScRangeData* pData = pRangeName->findByUpperName(rUpperName);
     if (!pData)
     {
-        pRangeName = pDoc->GetRangeName(aPos.Tab());
+        pRangeName = pDoc->GetRangeName();
         if (pRangeName)
             pData = pRangeName->findByUpperName(rUpperName);
         if (pData)
-            bGlobal = false;
+            bGlobal = true;
     }
 
     if (pData)


More information about the Libreoffice-commits mailing list