[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Tue Apr 18 11:05:57 UTC 2017


 sc/source/ui/view/cellsh1.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 87a53b75f9e520820e815ca275ea3d629630bf6b
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Apr 18 13:04:02 2017 +0200

    use auto const& over ScMarkData::GetSelectedTabs()
    
    Change-Id: Ica0192c589f0a262369480106557f679297a7468

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 1903df9fda74..f16b182ba4b3 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2340,13 +2340,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                  OUString aUndo = ScGlobal::GetRscString( bShowNote ? STR_UNDO_SHOWALLNOTES : STR_UNDO_HIDEALLNOTES );
                  pData->GetDocShell()->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pData->GetViewShell()->GetViewShellId() );
 
-                 SCTAB nFirstSelected = rMark.GetFirstSelected();
-                 SCTAB nLastSelected = rMark.GetLastSelected();
-
-                 for( SCTAB aTab = nFirstSelected; aTab<=nLastSelected; aTab++ )
+                 for (auto const& rTab : rMark.GetSelectedTabs())
                  {
-                     if (rMark.GetTableSelect(aTab))
-                         pDoc->GetAllNoteEntries(aTab, aNotes);
+                     pDoc->GetAllNoteEntries(rTab, aNotes);
                  }
 
                  for(std::vector<sc::NoteEntry>::const_iterator itr = aNotes.begin(),


More information about the Libreoffice-commits mailing list