summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-09-02 20:29:35 +0200
committerEike Rathke <erack@redhat.com>2015-09-03 00:09:05 +0200
commit0347ba13460fdd33ca77efa53457ee66651f189b (patch)
tree8a3c0957aa98b8bdcc90b9253358dc400aa3b21d /sc/source/ui/docshell
parent034b1b724aeed9ae02990354caa2a402a13386c0 (diff)
TableRef: use ScRangeList instead of vector for Join()
... so adjacent areas result in one call to RefreshTableColumnNames(). Change-Id: I1c42a37cbe9630b66504654fec021e39f0c0e67c
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r--sc/source/ui/docshell/docsh.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 5acd5b4ec9c1..560ba3ea6264 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3067,10 +3067,14 @@ ScDocShellModificator::ScDocShellModificator( ScDocShell& rDS )
ScDocShellModificator::~ScDocShellModificator()
{
ScDocument& rDoc = rDocShell.GetDocument();
- if (!mvContentModified.empty() && !rDoc.IsImportingXML())
+ if (!maContentModified.empty() && !rDoc.IsImportingXML())
{
- for (auto const& it : mvContentModified)
- rDoc.RefreshTableColumnNames( it);
+ for (size_t i=0, n = maContentModified.size(); i < n; ++i)
+ {
+ const ScRange* p = maContentModified[i];
+ if (p)
+ rDoc.RefreshTableColumnNames( *p);
+ }
}
rDoc.SetAutoCalcShellDisabled( bAutoCalcShellDisabled );
if ( !bAutoCalcShellDisabled && rDocShell.IsDocumentModifiedPending() )
@@ -3100,7 +3104,7 @@ void ScDocShellModificator::SetDocumentModified()
void ScDocShellModificator::AppendCellContentModified( const ScRange& rRange )
{
- mvContentModified.push_back( rRange);
+ maContentModified.Join( rRange);
}
bool ScDocShell::IsChangeRecording() const