summaryrefslogtreecommitdiff
path: root/reportdesign/source/core/sdr/RptObject.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-08-10 19:07:30 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-08-17 14:08:33 +0200
commitedcdfe5477559ca6c62897f0cad47d4d6149d77a (patch)
treebf97f0a716e760a3de4d95604483d26d943bd69f /reportdesign/source/core/sdr/RptObject.cxx
parent5ad254ed246cf8d11b55e50ed0ccba5736d0cdbb (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/core/sdr/RptObject.cxx')
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 7a77b212e25e..0c132a93be48 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -1218,14 +1218,15 @@ uno::Reference< style::XStyle> getUsedStyle(const uno::Reference< report::XRepor
uno::Reference<container::XNameAccess> xPageStyles(xStyles->getByName("PageStyles"),uno::UNO_QUERY);
uno::Reference< style::XStyle> xReturn;
- uno::Sequence< OUString> aSeq = xPageStyles->getElementNames();
- const OUString* pIter = aSeq.getConstArray();
- const OUString* pEnd = pIter + aSeq.getLength();
- for(;pIter != pEnd && !xReturn.is() ;++pIter)
+ const uno::Sequence< OUString> aSeq = xPageStyles->getElementNames();
+ for(const OUString& rName : aSeq)
{
- uno::Reference< style::XStyle> xStyle(xPageStyles->getByName(*pIter),uno::UNO_QUERY);
+ uno::Reference< style::XStyle> xStyle(xPageStyles->getByName(rName),uno::UNO_QUERY);
if ( xStyle->isInUse() )
+ {
xReturn = xStyle;
+ break;
+ }
}
return xReturn;
}