diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-12 11:21:20 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-13 19:43:13 +0200 |
commit | 54afdbd1b442d93313a01e58dba8fe3b84f596d1 (patch) | |
tree | 4564dd8bf6443521622b96b52e22caf65bb87d4d /writerperfect/source/writer/WordPerfectImportFilter.cxx | |
parent | 8b3c861c46ae12d21b7b3a550e2daa21d2006b77 (diff) |
Simplify Sequence iterations in writerfilter, writerperfect, xmlhelp
Use range-based loops or replace with comphelper or STL functions
Change-Id: I9113e04d15ad84d0abac087afc627969e8ebc354
Reviewed-on: https://gerrit.libreoffice.org/73867
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerperfect/source/writer/WordPerfectImportFilter.cxx')
-rw-r--r-- | writerperfect/source/writer/WordPerfectImportFilter.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx index aee0d94f50f0..76baa0f21a92 100644 --- a/writerperfect/source/writer/WordPerfectImportFilter.cxx +++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx @@ -92,16 +92,14 @@ static bool handleEmbeddedWPGImage(const librevenge::RVNGBinaryData& input, bool WordPerfectImportFilter::importImpl(const Sequence<css::beans::PropertyValue>& aDescriptor) { - sal_Int32 nLength = aDescriptor.getLength(); - const PropertyValue* pValue = aDescriptor.getConstArray(); Reference<XInputStream> xInputStream; Reference<XWindow> xDialogParent; - for (sal_Int32 i = 0; i < nLength; i++) + for (const auto& rValue : aDescriptor) { - if (pValue[i].Name == "InputStream") - pValue[i].Value >>= xInputStream; - else if (pValue[i].Name == "ParentWindow") - pValue[i].Value >>= xDialogParent; + if (rValue.Name == "InputStream") + rValue.Value >>= xInputStream; + else if (rValue.Name == "ParentWindow") + rValue.Value >>= xDialogParent; } if (!xInputStream.is()) { |