prevent some nasty ScRangeList->ScRange->ScRangeList conversion

Change-Id: I9dac82ffeed920ce39aab16d89a91e2f9083908b
This commit is contained in:
Markus Mohrhard 2012-11-28 15:11:55 +01:00
parent a9b7b4ab6b
commit 4d4ce88667
6 changed files with 21 additions and 16 deletions

View file

@ -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; }

View file

@ -136,6 +136,7 @@ public:
ScSheetSaveData* GetSheetSaveData();
void RepaintRange( const ScRange& rRange );
void RepaintRange( const ScRangeList& rRange );
bool HasChangesListeners() const;

View file

@ -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 )

View file

@ -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 );
}
}

View file

@ -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

View file

@ -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)
{