summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documen9.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-07-05 04:21:41 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-07-05 04:21:41 +0200
commit75f0c33a051cb7a0f7665010c4bb8ff015211a3b (patch)
tree3de880b73c854e891a33345ae60d4faa1ab02750 /sc/source/core/data/documen9.cxx
parent4551eb2197ed39375978def0e1b881bd183342b9 (diff)
change from manual loop to ScMarkData::iterator in calc/source/core
Diffstat (limited to 'sc/source/core/data/documen9.cxx')
-rw-r--r--sc/source/core/data/documen9.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 94d1e9e39149..0d8d524575da 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -276,9 +276,10 @@ void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR
return;
SCTAB nTabCount = GetTableCount();
- for (SCTAB nTab=0; nTab<nTabCount; nTab++)
- if (maTabs[nTab] && rMark.GetTableSelect(nTab))
- pDrawLayer->DeleteObjectsInArea( nTab, nCol1, nRow1, nCol2, nRow2 );
+ ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end();
+ for (; itr != itrEnd && *itr < nTabCount; ++itr)
+ if (maTabs[*itr])
+ pDrawLayer->DeleteObjectsInArea( *itr, nCol1, nRow1, nCol2, nRow2 );
}
void ScDocument::DeleteObjectsInSelection( const ScMarkData& rMark )