Kaydet (Commit) 0347ba13 authored tarafından Eike Rathke's avatar Eike Rathke

TableRef: use ScRangeList instead of vector for Join()

... so adjacent areas result in one call to RefreshTableColumnNames().

Change-Id: I1c42a37cbe9630b66504654fec021e39f0c0e67c
üst 034b1b72
...@@ -3067,10 +3067,14 @@ ScDocShellModificator::ScDocShellModificator( ScDocShell& rDS ) ...@@ -3067,10 +3067,14 @@ ScDocShellModificator::ScDocShellModificator( ScDocShell& rDS )
ScDocShellModificator::~ScDocShellModificator() ScDocShellModificator::~ScDocShellModificator()
{ {
ScDocument& rDoc = rDocShell.GetDocument(); ScDocument& rDoc = rDocShell.GetDocument();
if (!mvContentModified.empty() && !rDoc.IsImportingXML()) if (!maContentModified.empty() && !rDoc.IsImportingXML())
{ {
for (auto const& it : mvContentModified) for (size_t i=0, n = maContentModified.size(); i < n; ++i)
rDoc.RefreshTableColumnNames( it); {
const ScRange* p = maContentModified[i];
if (p)
rDoc.RefreshTableColumnNames( *p);
}
} }
rDoc.SetAutoCalcShellDisabled( bAutoCalcShellDisabled ); rDoc.SetAutoCalcShellDisabled( bAutoCalcShellDisabled );
if ( !bAutoCalcShellDisabled && rDocShell.IsDocumentModifiedPending() ) if ( !bAutoCalcShellDisabled && rDocShell.IsDocumentModifiedPending() )
...@@ -3100,7 +3104,7 @@ void ScDocShellModificator::SetDocumentModified() ...@@ -3100,7 +3104,7 @@ void ScDocShellModificator::SetDocumentModified()
void ScDocShellModificator::AppendCellContentModified( const ScRange& rRange ) void ScDocShellModificator::AppendCellContentModified( const ScRange& rRange )
{ {
mvContentModified.push_back( rRange); maContentModified.Join( rRange);
} }
bool ScDocShell::IsChangeRecording() const bool ScDocShell::IsChangeRecording() const
......
...@@ -453,7 +453,7 @@ typedef tools::SvRef<ScDocShell> ScDocShellRef; ...@@ -453,7 +453,7 @@ typedef tools::SvRef<ScDocShell> ScDocShellRef;
*/ */
class SC_DLLPUBLIC ScDocShellModificator class SC_DLLPUBLIC ScDocShellModificator
{ {
::std::vector<ScRange> mvContentModified; ScRangeList maContentModified;
ScDocShell& rDocShell; ScDocShell& rDocShell;
boost::scoped_ptr<ScRefreshTimerProtector> mpProtector; boost::scoped_ptr<ScRefreshTimerProtector> mpProtector;
bool bAutoCalcShellDisabled; bool bAutoCalcShellDisabled;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment