[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Tue Apr 11 12:29:17 UTC 2017
sc/source/ui/view/cellsh.cxx | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
New commits:
commit e7b1c70ea9cd13e229014191cb82775723e7f48d
Author: Eike Rathke <erack at redhat.com>
Date: Tue Apr 11 14:27:53 2017 +0200
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
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 )
More information about the Libreoffice-commits
mailing list