diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-08-10 19:07:30 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-08-17 14:08:33 +0200 |
commit | edcdfe5477559ca6c62897f0cad47d4d6149d77a (patch) | |
tree | bf97f0a716e760a3de4d95604483d26d943bd69f /reportdesign/source/ui/misc/RptUndo.cxx | |
parent | 5ad254ed246cf8d11b55e50ed0ccba5736d0cdbb (diff) |
Simplify Sequence iterations in postprocess..sax
Use range-based loops, STL and comphelper functions
Change-Id: If738d8f4e792c4686870183b0c0fdfbb61fd3351
Reviewed-on: https://gerrit.libreoffice.org/77245
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'reportdesign/source/ui/misc/RptUndo.cxx')
-rw-r--r-- | reportdesign/source/ui/misc/RptUndo.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx index 1f53e763207a..121f8e76d3be 100644 --- a/reportdesign/source/ui/misc/RptUndo.cxx +++ b/reportdesign/source/ui/misc/RptUndo.cxx @@ -155,13 +155,11 @@ void OSectionUndo::collectControls(const uno::Reference< report::XSection >& _xS { // copy all properties for restoring uno::Reference< beans::XPropertySetInfo> xInfo = _xSection->getPropertySetInfo(); - uno::Sequence< beans::Property> aSeq = xInfo->getProperties(); - const beans::Property* pIter = aSeq.getConstArray(); - const beans::Property* pEnd = pIter + aSeq.getLength(); - for(;pIter != pEnd;++pIter) + const uno::Sequence< beans::Property> aSeq = xInfo->getProperties(); + for(const beans::Property& rProp : aSeq) { - if ( 0 == (pIter->Attributes & beans::PropertyAttribute::READONLY) ) - m_aValues.emplace_back(pIter->Name,_xSection->getPropertyValue(pIter->Name)); + if ( 0 == (rProp.Attributes & beans::PropertyAttribute::READONLY) ) + m_aValues.emplace_back(rProp.Name,_xSection->getPropertyValue(rProp.Name)); } lcl_collectElements(_xSection,m_aControls); } |