[Libreoffice-commits] .: sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Mon Jun 27 21:00:23 PDT 2011


 sc/source/core/tool/rangeutl.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 3c785454ced516eab69f2fcb950391369a65d8ae
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Jun 28 05:54:02 2011 +0200

    add support for local range names to ScRangeUtil

diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index d0b50af..ef63c55 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -286,8 +286,13 @@ sal_Bool ScRangeUtil::MakeRangeFromName	(
 
     if( eScope==RUTL_NAMES )
     {
-        const ScRangeName& rRangeNames = *pDoc->GetRangeName();
-        const ScRangeData* pData = rRangeNames.findByName(rName);
+        //first check for local range names
+        ScRangeName* pRangeNames = pDoc->GetRangeName( nCurTab );
+        ScRangeData* pData = NULL;
+        if ( pRangeNames )
+            pData = pRangeNames->findByName(rName);
+        if (!pData)
+            pData = pDoc->GetRangeName()->findByName(rName);
         if (pData)
         {
             String		 aStrArea;


More information about the Libreoffice-commits mailing list