[Libreoffice-commits] .: sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Wed Jun 15 11:58:32 PDT 2011


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

New commits:
commit 8a94dfc7f2462db9c9dbdcae99fb6506ffe78e63
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

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f8b2a85..c018482 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