diff options
author | Eike Rathke <erack@redhat.com> | 2014-07-18 00:45:44 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-07-22 11:43:47 +0200 |
commit | da4098695c1dc1495b4abb0f25609a33d4101da9 (patch) | |
tree | 6fe2842d55bacb0eab25f38e1df2ad39fb4d901d /sc | |
parent | b08af1d20ca6600da6b26b7992d9fc178f908c5b (diff) |
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/10376
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/table1.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index e0eb3eb8ef62..834dfe1cfc65 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -1603,6 +1603,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; @@ -1610,9 +1616,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); |