sc/source/ui/view/cellsh.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
New commits: commit bb9ac80998c1e7cd1ff154903b3c60d3e8636a5e Author: Eike Rathke <er...@redhat.com> Date: Tue Apr 18 13:13:20 2017 +0200 use auto const& over ScMarkData::GetSelectedTabs() Change-Id: Ic3dcc6a99cc2aa5fba8625d6d04cc0dc925ec3be 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; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits