[Libreoffice-commits] core.git: sfx2/source
Mike Kaganski
mike.kaganski at collabora.com
Mon Feb 12 10:16:16 UTC 2018
sfx2/source/control/unoctitm.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit a377db06eaf76d222c0e116a4c0f62a7e7736a26
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date: Mon Feb 12 09:47:38 2018 +0100
Use range-based for
Change-Id: I7ec311255a571fc19360b7cb6d3885f433f42426
Reviewed-on: https://gerrit.libreoffice.org/49577
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 1ebb919fbab7..31364d8f84a3 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -970,12 +970,10 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
InterceptLOKStateChangeEvent(pDispatcher->GetFrame(), aEvent, pState);
}
- Sequence< OUString > seqNames = pDispatch->GetListeners().getContainedTypes();
- sal_Int32 nLength = seqNames.getLength();
- for (sal_Int32 i = 0; i < nLength; ++i)
+ for (const OUString& rName: pDispatch->GetListeners().getContainedTypes())
{
- if (seqNames[i] == aDispatchURL.Main || seqNames[i] == aDispatchURL.Complete)
- sendStatusChanged(seqNames[i], aEvent);
+ if (rName == aDispatchURL.Main || rName == aDispatchURL.Complete)
+ sendStatusChanged(rName, aEvent);
}
}
}
More information about the Libreoffice-commits
mailing list