diff options
author | Eike Rathke <erack@redhat.com> | 2017-04-11 14:27:53 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-04-11 14:28:41 +0200 |
commit | e7b1c70ea9cd13e229014191cb82775723e7f48d (patch) | |
tree | 40ae61777aa7b2a46f3d10d8d66d2d5e6b10aa6d /sc | |
parent | c8e2ae1b915477c76d38352298570af309a36d85 (diff) |
nitpicks, tdf#84837 follow-up
* follow naming conventions (nSelTab vs. aTab for integer variable (nTab
already used throughout function))
* if and for keywords followed by one blank
* checking bHasNotes / breaking twice is unnecessary, move the check into the
loop condition instead
Change-Id: Ib48afbce7c75d146ecf4b674ef92e3b5f6cf063e
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/cellsh.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index ed5389bcf9b6..6a915c575f25 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -1050,19 +1050,13 @@ void ScCellShell::GetState(SfxItemSet &rSet) SCTAB nFirstSelected = rMark.GetFirstSelected(); SCTAB nLastSelected = rMark.GetLastSelected(); - for( SCTAB aTab = nFirstSelected; aTab<=nLastSelected; aTab++ ) + for ( SCTAB nSelTab = nFirstSelected; nSelTab <= nLastSelected && !bHasNotes; nSelTab++ ) { - if (rMark.GetTableSelect(aTab) ) + if (rMark.GetTableSelect( nSelTab )) { - if (pDoc->HasTabNotes( aTab )) - { + if (pDoc->HasTabNotes( nSelTab )) bHasNotes = true; - break; - } } - - if( bHasNotes ) //for break nested loop - break; } if ( !bHasNotes ) |