From 4551eb2197ed39375978def0e1b881bd183342b9 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Tue, 5 Jul 2011 00:41:08 +0200 Subject: change from manual loop to ScMarkData::iterator in most situations it's much faster to use the iterator instead of the manual loop + ScMarkData::GetTableSelect --- sc/source/ui/view/viewutil.cxx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'sc/source/ui/view/viewutil.cxx') diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index a7cd41fc4578..482b6743a675 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -259,24 +259,24 @@ void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc ) SCROW nEndRow = aMultiArea.aEnd.Row(); bool bChanged = false; - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTabRowFiltered(nRow, nTab, NULL, &nLastRow)) { - SCROW nLastRow = nRow; - if (pDoc->RowFiltered(nRow, nTab, NULL, &nLastRow)) - { - // use nStartCol/nEndCol, so the multi mark area isn't extended to all columns - // (visible in repaint for indentation) - rMark.SetMultiMarkArea( - ScRange(nStartCol, nRow, nTab, nEndCol, nLastRow, nTab), false); - bChanged = true; - nRow = nLastRow; - } + // use nStartCol/nEndCol, so the multi mark area isn't extended to all columns + // (visible in repaint for indentation) + rMark.SetMultiMarkArea( + ScRange(nStartCol, nRow, nTab, nEndCol, nLastRow, nTab), false); + bChanged = true; + nRow = nLastRow; } } + } if ( bChanged && !rMark.HasAnyMultiMarks() ) rMark.ResetMark(); -- cgit