Kaydet (Commit) 4d4ce886 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

prevent some nasty ScRangeList->ScRange->ScRangeList conversion

Change-Id: I9dac82ffeed920ce39aab16d89a91e2f9083908b
üst a9b7b4ab
...@@ -1523,6 +1523,7 @@ public: ...@@ -1523,6 +1523,7 @@ public:
bool ContinueOnlineSpelling(); // TRUE = found s.th. bool ContinueOnlineSpelling(); // TRUE = found s.th.
void RepaintRange( const ScRange& rRange ); void RepaintRange( const ScRange& rRange );
void RepaintRange( const ScRangeList& rRange );
bool IsIdleDisabled() const { return bIdleDisabled; } bool IsIdleDisabled() const { return bIdleDisabled; }
void DisableIdle(bool bDo) { bIdleDisabled = bDo; } void DisableIdle(bool bDo) { bIdleDisabled = bDo; }
......
...@@ -136,6 +136,7 @@ public: ...@@ -136,6 +136,7 @@ public:
ScSheetSaveData* GetSheetSaveData(); ScSheetSaveData* GetSheetSaveData();
void RepaintRange( const ScRange& rRange ); void RepaintRange( const ScRange& rRange );
void RepaintRange( const ScRangeList& rRange );
bool HasChangesListeners() const; bool HasChangesListeners() const;
......
...@@ -542,12 +542,7 @@ void ScColorScaleFormat::DataChanged(const ScRange& rRange) ...@@ -542,12 +542,7 @@ void ScColorScaleFormat::DataChanged(const ScRange& rRange)
bool bNeedUpdate = CheckEntriesForRel(rRange); bool bNeedUpdate = CheckEntriesForRel(rRange);
if(bNeedUpdate) if(bNeedUpdate)
{ {
size_t n = GetRange().size(); mpDoc->RepaintRange(GetRange());
for(size_t i = 0; i < n; ++i)
{
const ScRange* pRange = GetRange()[i];
mpDoc->RepaintRange(*pRange);
}
} }
} }
...@@ -648,12 +643,7 @@ void ScDataBarFormat::DataChanged(const ScRange& rRange) ...@@ -648,12 +643,7 @@ void ScDataBarFormat::DataChanged(const ScRange& rRange)
if(bNeedUpdate) if(bNeedUpdate)
{ {
size_t n = GetRange().size(); mpDoc->RepaintRange(GetRange());
for(size_t i = 0; i < n; ++i)
{
const ScRange* pRange = GetRange()[i];
mpDoc->RepaintRange(*pRange);
}
} }
} }
...@@ -929,7 +919,6 @@ condformat::ScFormatEntryType ScIconSetFormat::GetType() const ...@@ -929,7 +919,6 @@ condformat::ScFormatEntryType ScIconSetFormat::GetType() const
void ScIconSetFormat::DataChanged( const ScRange& ) void ScIconSetFormat::DataChanged( const ScRange& )
{ {
} }
void ScIconSetFormat::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab ) void ScIconSetFormat::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab )
......
...@@ -1947,9 +1947,7 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified ) ...@@ -1947,9 +1947,7 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
else else
{ {
// all conditional format cells // all conditional format cells
size_t n = maRanges.size(); pDoc->RepaintRange( maRanges );
for(size_t i = 0; i < n; ++i)
pDoc->RepaintRange(*maRanges[i]);
} }
} }
......
...@@ -898,6 +898,16 @@ void ScDocument::RepaintRange( const ScRange& rRange ) ...@@ -898,6 +898,16 @@ void ScDocument::RepaintRange( const ScRange& rRange )
} }
} }
void ScDocument::RepaintRange( const ScRangeList& rRange )
{
if ( bIsVisible && pShell )
{
ScModelObj* pModel = ScModelObj::getImplementation( pShell->GetModel() );
if ( pModel )
pModel->RepaintRange( rRange ); // locked repaints are checked there
}
}
//------------------------------------------------------------------------ //------------------------------------------------------------------------
bool ScDocument::IdleCheckLinks() // true = demnaechst wieder versuchen bool ScDocument::IdleCheckLinks() // true = demnaechst wieder versuchen
......
...@@ -449,6 +449,12 @@ void ScModelObj::RepaintRange( const ScRange& rRange ) ...@@ -449,6 +449,12 @@ void ScModelObj::RepaintRange( const ScRange& rRange )
pDocShell->PostPaint( rRange, PAINT_GRID ); pDocShell->PostPaint( rRange, PAINT_GRID );
} }
void ScModelObj::RepaintRange( const ScRangeList& rRange )
{
if (pDocShell)
pDocShell->PostPaint( rRange, PAINT_GRID );
}
uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType ) uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
throw(uno::RuntimeException) throw(uno::RuntimeException)
{ {
......
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