diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-07-30 15:27:02 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-07-30 23:50:02 -0400 |
commit | 0277792d169d66ad24734504ff33d2ec7d52ebaf (patch) | |
tree | 1f1968f9c65ccfd8184f6855a60e887805a2786d /sc/source/core/data/document.cxx | |
parent | 441e70aee90e83a9f8782a3f84482db86b857b87 (diff) |
Rework reference update in conditional formatting and cell validation.
No tests are written for this yet.
Change-Id: Ic26a7f19d6ce6e6d7059035dc9c99ae5bcb9d77b
Diffstat (limited to 'sc/source/core/data/document.cxx')
-rw-r--r-- | sc/source/core/data/document.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 25fc4c3ef271..a6eb5ef4846c 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -501,8 +501,9 @@ bool ScDocument::InsertTab( SCTAB nPos, const OUString& rName, if ( *it ) (*it)->StartAllListeners(); - if ( pValidationList ) - pValidationList->UpdateReference( URM_INSDEL, aRange, 0,0,1 ); + if (pValidationList) + pValidationList->UpdateInsertTab(aCxt); + // sheet names of references are not valid until sheet is inserted if ( pChartListenerCollection ) pChartListenerCollection->UpdateScheduledSeriesRanges(); @@ -587,8 +588,9 @@ bool ScDocument::InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames, if ( *it ) (*it)->StartAllListeners(); - if ( pValidationList ) - pValidationList->UpdateReference( URM_INSDEL, aRange, 0,0,nNewSheets ); + if (pValidationList) + pValidationList->UpdateInsertTab(aCxt); + // sheet names of references are not valid until sheet is inserted if ( pChartListenerCollection ) pChartListenerCollection->UpdateScheduledSeriesRanges(); @@ -650,8 +652,8 @@ bool ScDocument::DeleteTab( SCTAB nTab ) pDetOpList->UpdateReference( this, URM_INSDEL, aRange, 0,0,-1 ); UpdateChartRef( URM_INSDEL, 0,0,nTab, MAXCOL,MAXROW,MAXTAB, 0,0,-1 ); UpdateRefAreaLinks( URM_INSDEL, aRange, 0,0,-1 ); - if ( pValidationList ) - pValidationList->UpdateReference( URM_INSDEL, aRange, 0,0,-1 ); + if (pValidationList) + pValidationList->UpdateDeleteTab(aCxt); if ( pUnoBroadcaster ) pUnoBroadcaster->Broadcast( ScUpdateRefHint( URM_INSDEL, aRange, 0,0,-1 ) ); @@ -738,8 +740,8 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets ) pDetOpList->UpdateReference( this, URM_INSDEL, aRange, 0,0,-1*nSheets ); UpdateChartRef( URM_INSDEL, 0,0,nTab, MAXCOL,MAXROW,MAXTAB, 0,0,-1*nSheets ); UpdateRefAreaLinks( URM_INSDEL, aRange, 0,0,-1*nSheets ); - if ( pValidationList ) - pValidationList->UpdateReference( URM_INSDEL, aRange, 0,0,-1*nSheets ); + if (pValidationList) + pValidationList->UpdateDeleteTab(aCxt); if ( pUnoBroadcaster ) pUnoBroadcaster->Broadcast( ScUpdateRefHint( URM_INSDEL, aRange, 0,0,-1*nSheets ) ); |