diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-07-05 00:41:08 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-07-05 00:44:41 +0200 |
commit | 4551eb2197ed39375978def0e1b881bd183342b9 (patch) | |
tree | e1fd2cb151ccbf34c4e248e2ae1b6297cbc18bc1 /sc/source/ui/view/spelldialog.cxx | |
parent | 1fed62c9e3f875c077b98e0282f8cf566e5b0cc8 (diff) |
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
Diffstat (limited to 'sc/source/ui/view/spelldialog.cxx')
-rw-r--r-- | sc/source/ui/view/spelldialog.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx index 25c3b859ad62..33dea9c1977c 100644 --- a/sc/source/ui/view/spelldialog.cxx +++ b/sc/source/ui/view/spelldialog.cxx @@ -237,13 +237,13 @@ void ScSpellDialogChildWindow::Init() if ( rMarkData.GetSelectCount() > 1 ) { - SCTAB nTabCount = mpDoc->GetTableCount(); - for( SCTAB nOtherTab = 0; nOtherTab < nTabCount; ++nOtherTab ) + ScMarkData::iterator itr = rMarkData.begin(), itrEnd = rMarkData.end(); + for (; itr != itrEnd; ++itr) { - if( rMarkData.GetTableSelect( nOtherTab ) && (nOtherTab != nTab) ) + if( *itr != nTab ) { - mxUndoDoc->AddUndoTab( nOtherTab, nOtherTab ); - mxRedoDoc->AddUndoTab( nOtherTab, nOtherTab ); + mxUndoDoc->AddUndoTab( *itr, *itr ); + mxRedoDoc->AddUndoTab( *itr, *itr ); } } } |