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:
bool ContinueOnlineSpelling(); // TRUE = found s.th.
void RepaintRange( const ScRange& rRange );
void RepaintRange( const ScRangeList& rRange );
bool IsIdleDisabled() const { return bIdleDisabled; }
void DisableIdle(bool bDo) { bIdleDisabled = bDo; }
......
......@@ -136,6 +136,7 @@ public:
ScSheetSaveData* GetSheetSaveData();
void RepaintRange( const ScRange& rRange );
void RepaintRange( const ScRangeList& rRange );
bool HasChangesListeners() const;
......
......@@ -542,12 +542,7 @@ void ScColorScaleFormat::DataChanged(const ScRange& rRange)
bool bNeedUpdate = CheckEntriesForRel(rRange);
if(bNeedUpdate)
{
size_t n = GetRange().size();
for(size_t i = 0; i < n; ++i)
{
const ScRange* pRange = GetRange()[i];
mpDoc->RepaintRange(*pRange);
}
mpDoc->RepaintRange(GetRange());
}
}
......@@ -648,12 +643,7 @@ void ScDataBarFormat::DataChanged(const ScRange& rRange)
if(bNeedUpdate)
{
size_t n = GetRange().size();
for(size_t i = 0; i < n; ++i)
{
const ScRange* pRange = GetRange()[i];
mpDoc->RepaintRange(*pRange);
}
mpDoc->RepaintRange(GetRange());
}
}
......@@ -929,7 +919,6 @@ condformat::ScFormatEntryType ScIconSetFormat::GetType() const
void ScIconSetFormat::DataChanged( const ScRange& )
{
}
void ScIconSetFormat::UpdateMoveTab( SCTAB nOldTab, SCTAB nNewTab )
......
......@@ -1947,9 +1947,7 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
else
{
// all conditional format cells
size_t n = maRanges.size();
for(size_t i = 0; i < n; ++i)
pDoc->RepaintRange(*maRanges[i]);
pDoc->RepaintRange( maRanges );
}
}
......
......@@ -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
......
......@@ -449,6 +449,12 @@ void ScModelObj::RepaintRange( const ScRange& rRange )
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 )
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