summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo/undotab.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-07 19:57:02 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-07 19:57:02 +0100
commit5b805de10a1b05647b616e726f0a8b88ff30ae77 (patch)
treef002e284ad4c0a0231cdfef504b59b5c29cec1f5 /sc/source/ui/undo/undotab.cxx
parentf583e8a8dccc1fb02dc7549ff364f9a8530a4f6b (diff)
loplugin:loopvartoosmall
Change-Id: I81b56ad2a32ef61a514d5e6e9f45c3f956126040
Diffstat (limited to 'sc/source/ui/undo/undotab.cxx')
-rw-r--r--sc/source/ui/undo/undotab.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 0e5416638173..49129b128b9b 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -295,15 +295,13 @@ static SCTAB lcl_GetVisibleTabBefore( ScDocument& rDoc, SCTAB nTab )
void ScUndoDeleteTab::Undo()
{
BeginUndo();
- unsigned int i=0;
ScDocument& rDoc = pDocShell->GetDocument();
bool bLink = false;
OUString aName;
- for(i=0; i<theTabs.size(); ++i)
+ for(SCTAB nTab: theTabs)
{
- SCTAB nTab = theTabs[i];
pRefUndoDoc->GetName( nTab, aName );
bDrawIsInUndo = true;
@@ -355,9 +353,9 @@ void ScUndoDeleteTab::Undo()
if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
- for(i=0; i<theTabs.size(); ++i)
+ for(SCTAB nTab: theTabs)
{
- pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, theTabs[i]) );
+ pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab) );
}
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );