summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-03-21 15:20:02 +0100
committerEike Rathke <erack@redhat.com>2014-03-21 15:21:58 +0100
commit4d9ccf41db5f5860275ff62f7de7401512f72791 (patch)
treefc4f125e1e0447ff4c05626031317689e1034a22 /sc
parent0dcb50f50c09b8c43dbfc4b7b401c4c037eace5b (diff)
update enhanced protection ranges
Change-Id: I15eb63da7123f8c2bf9ae1b77fdd32289dba3636
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table1.cxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 552292dee0e3..0f71358153bc 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);