diff options
Diffstat (limited to 'sc/source/ui/view/viewutil.cxx')
-rw-r--r-- | sc/source/ui/view/viewutil.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
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; nTab<nTabCount; nTab++) - if ( rMark.GetTableSelect(nTab ) ) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + { + SCTAB nTab = *itr; + for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow) { - for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow) + SCROW nLastRow = nRow; + if (pDoc->RowFiltered(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(); |