[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source
Katarina Machalkova
bubli at kemper.freedesktop.org
Wed Jul 6 02:07:45 PDT 2011
sc/source/core/data/table1.cxx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit 6da6e164f04b8110e9800378215d76ea4a51549c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jun 30 05:44:00 2011 +0200
fix for fdo#38380: update local range names
local range names must be updated like global range names
Signed-off-by: Katarina Machalkova <kmachalkova at novell.com>
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 2927aa0..b755bdf 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1303,6 +1303,12 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
bUpdated |= aCol[i].UpdateReference(
eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz, pUndoDoc );
+ if (mpRangeName)
+ {
+ ScRange aRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );;
+ mpRangeName->UpdateReference( eUpdateRefMode, aRange, nDx, nDy, nDz );
+ }
+
if ( bIncludeDraw )
UpdateDrawRef( eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz, bUpdateNoteCaptionPos );
@@ -1410,6 +1416,9 @@ void ScTable::UpdateInsertTab(SCTAB nTable)
}
for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTab(nTable);
+ if (mpRangeName)
+ mpRangeName->UpdateTabRef( nTable, 1);
+
if (IsStreamValid())
SetStreamValid(false);
}
@@ -1429,6 +1438,11 @@ void ScTable::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo
else
for (i=0; i <= MAXCOL; i++) aCol[i].UpdateDeleteTab(nTable, bIsMove, NULL);
+ if (mpRangeName)
+ {
+ mpRangeName->UpdateTabRef( nTable, 2 );
+ }
+
if (IsStreamValid())
SetStreamValid(false);
}
@@ -1443,6 +1457,9 @@ void ScTable::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo,
rProgress.SetState( rProgress.GetState() + aCol[i].GetCodeCount() );
}
+ if (mpRangeName)
+ mpRangeName->UpdateTabRef(nOldPos, 3, nNewPos);
+
if (IsStreamValid())
SetStreamValid(false);
if (pDBDataNoName)
More information about the Libreoffice-commits
mailing list