diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-07-06 17:07:05 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-07-08 21:23:39 +0200 |
commit | 3e8989d47e3116a99d4b9f6d03800464ff235de8 (patch) | |
tree | 5e687f16a46c4fe52d18fdb5d7f856a601c1cc71 /sw/source/core/doc/docglos.cxx | |
parent | 1458d43690684c5ce6ed4409bef34a23cfbab7f2 (diff) |
Simplify Sequence iterations in sw/qa/* and sw/source/core/*
Use range-based loops, STL and comphelper functions
Change-Id: I5bd910a86bd80c553cd4a0c044a8eb61084f77ae
Reviewed-on: https://gerrit.libreoffice.org/75167
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'sw/source/core/doc/docglos.cxx')
-rw-r--r-- | sw/source/core/doc/docglos.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx index e55d9e420871..ea05dac8a66f 100644 --- a/sw/source/core/doc/docglos.cxx +++ b/sw/source/core/doc/docglos.cxx @@ -57,9 +57,9 @@ void SwDoc::ReplaceUserDefinedDocumentProperties( uno::Sequence<beans::Property> tgtprops = xTargetUDSet->getPropertySetInfo()->getProperties(); - for (sal_Int32 i = 0; i < tgtprops.getLength(); ++i) { + for (const auto& rTgtProp : tgtprops) { try { - xTargetUD->removeProperty(tgtprops [i].Name); + xTargetUD->removeProperty(rTgtProp.Name); } catch (uno::Exception &) { // ignore } @@ -69,10 +69,10 @@ void SwDoc::ReplaceUserDefinedDocumentProperties( = xSourceUDSet->getPropertySetInfo(); uno::Sequence<beans::Property> srcprops = xSetInfo->getProperties(); - for (sal_Int32 i = 0; i < srcprops.getLength(); ++i) { + for (const auto& rSrcProp : srcprops) { try { - OUString name = srcprops[i].Name; - xTargetUD->addProperty(name, srcprops[i].Attributes, + OUString name = rSrcProp.Name; + xTargetUD->addProperty(name, rSrcProp.Attributes, xSourceUDSet->getPropertyValue(name)); } catch (uno::Exception &) { // ignore |