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

Eike Rathke erack at redhat.com
Thu Jul 17 17:26:55 PDT 2014


 sc/source/core/data/table1.cxx |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

New commits:
commit 76a4eee58830b7faf4fa0a89e82df36e352d5b06
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Jul 18 00:45:44 2014 +0200

    resolved fdo#81294 store correct sheet number during range names update
    
    Change-Id: Ic4c858efa6e7c1a65357ac79f01e6c08f464ae3f
    (cherry picked from commit 4011b74eb7650a0eeb99d3acebb9ef60b0fcaab9)
    Reviewed-on: https://gerrit.libreoffice.org/10374
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index b7e020f..94cf672 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1597,6 +1597,12 @@ void ScTable::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
 
 void ScTable::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
 {
+    // Store the old tab number in sc::UpdatedRangeNames for
+    // ScTokenArray::AdjustReferenceOnInsertedTab() to check with
+    // isNameModified()
+    if (mpRangeName)
+        mpRangeName->UpdateInsertTab(rCxt, nTab);
+
     if (nTab >= rCxt.mnInsertPos)
     {
         nTab += rCxt.mnSheets;
@@ -1604,9 +1610,6 @@ void ScTable::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
             pDBDataNoName->UpdateMoveTab(nTab - 1 ,nTab);
     }
 
-    if (mpRangeName)
-        mpRangeName->UpdateInsertTab(rCxt, nTab);
-
     if (mpCondFormatList)
         mpCondFormatList->UpdateInsertTab(rCxt);
 
@@ -1624,6 +1627,12 @@ void ScTable::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
 
 void ScTable::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
 {
+    // Store the old tab number in sc::UpdatedRangeNames for
+    // ScTokenArray::AdjustReferenceOnDeletedTab() to check with
+    // isNameModified()
+    if (mpRangeName)
+        mpRangeName->UpdateDeleteTab(rCxt, nTab);
+
     if (nTab > rCxt.mnDeletePos)
     {
         nTab -= rCxt.mnSheets;
@@ -1631,9 +1640,6 @@ void ScTable::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
             pDBDataNoName->UpdateMoveTab(nTab + 1,nTab);
     }
 
-    if (mpRangeName)
-        mpRangeName->UpdateDeleteTab(rCxt, nTab);
-
     if (mpCondFormatList)
         mpCondFormatList->UpdateDeleteTab(rCxt);
 


More information about the Libreoffice-commits mailing list