[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Fri Mar 21 07:22:28 PDT 2014
sc/source/core/data/table1.cxx | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
New commits:
commit 4d9ccf41db5f5860275ff62f7de7401512f72791
Author: Eike Rathke <erack at redhat.com>
Date: Fri Mar 21 15:20:02 2014 +0100
update enhanced protection ranges
Change-Id: I15eb63da7123f8c2bf9ae1b77fdd32289dba3636
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 552292d..0f71358 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1577,6 +1577,10 @@ void ScTable::UpdateReference(
if(mpCondFormatList)
mpCondFormatList->UpdateReference(rCxt);
+
+ ScTableProtection* pProtection = GetProtection();
+ if (pProtection)
+ pProtection->updateReference( eUpdateRefMode, pDocument, rCxt.maRange, nDx, nDy, nDz);
}
void ScTable::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
@@ -1607,7 +1611,14 @@ void ScTable::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
if (mpCondFormatList)
mpCondFormatList->UpdateInsertTab(rCxt);
- for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTab(rCxt);
+ ScTableProtection* pProtection = GetProtection();
+ if (pProtection)
+ pProtection->updateReference( URM_INSDEL, pDocument,
+ ScRange( 0, 0, rCxt.mnInsertPos, MAXCOL, MAXROW, MAXTAB),
+ 0, 0, rCxt.mnSheets);
+
+ for (SCCOL i=0; i <= MAXCOL; i++)
+ aCol[i].UpdateInsertTab(rCxt);
if (IsStreamValid())
SetStreamValid(false);
@@ -1628,6 +1639,12 @@ void ScTable::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
if (mpCondFormatList)
mpCondFormatList->UpdateDeleteTab(rCxt);
+ ScTableProtection* pProtection = GetProtection();
+ if (pProtection)
+ pProtection->updateReference( URM_INSDEL, pDocument,
+ ScRange( 0, 0, rCxt.mnDeletePos, MAXCOL, MAXROW, MAXTAB),
+ 0, 0, -rCxt.mnSheets);
+
for (SCCOL i = 0; i <= MAXCOL; ++i)
aCol[i].UpdateDeleteTab(rCxt);
@@ -1648,6 +1665,12 @@ void ScTable::UpdateMoveTab(
if(mpCondFormatList)
mpCondFormatList->UpdateMoveTab(rCxt);
+ ScTableProtection* pProtection = GetProtection();
+ if (pProtection)
+ pProtection->updateReference( URM_REORDER, pDocument,
+ ScRange( 0, 0, rCxt.mnOldPos, MAXCOL, MAXROW, MAXTAB),
+ 0, 0, rCxt.mnNewPos - rCxt.mnOldPos);
+
for ( SCCOL i=0; i <= MAXCOL; i++ )
{
aCol[i].UpdateMoveTab(rCxt, nTabNo);
More information about the Libreoffice-commits
mailing list