summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/cellsh.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-04-18 13:13:20 +0200
committerEike Rathke <erack@redhat.com>2017-04-18 13:13:29 +0200
commitbb9ac80998c1e7cd1ff154903b3c60d3e8636a5e (patch)
treea71ea1b1aa489099aabfec1f12474473c9b18b23 /sc/source/ui/view/cellsh.cxx
parent87a53b75f9e520820e815ca275ea3d629630bf6b (diff)
use auto const& over ScMarkData::GetSelectedTabs()
Change-Id: Ic3dcc6a99cc2aa5fba8625d6d04cc0dc925ec3be
Diffstat (limited to 'sc/source/ui/view/cellsh.cxx')
-rw-r--r--sc/source/ui/view/cellsh.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 6a915c575f25..ca710f4376c5 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -1047,15 +1047,12 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case FID_HIDE_ALL_NOTES:
{
bool bHasNotes = false;
- SCTAB nFirstSelected = rMark.GetFirstSelected();
- SCTAB nLastSelected = rMark.GetLastSelected();
-
- for ( SCTAB nSelTab = nFirstSelected; nSelTab <= nLastSelected && !bHasNotes; nSelTab++ )
+ for (auto const& rTab : rMark.GetSelectedTabs())
{
- if (rMark.GetTableSelect( nSelTab ))
+ if (pDoc->HasTabNotes( rTab ))
{
- if (pDoc->HasTabNotes( nSelTab ))
- bHasNotes = true;
+ bHasNotes = true;
+ break;
}
}