diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-09 13:43:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-09 14:24:00 +0200 |
commit | 027b25ecd54ac97ea2471ca73e3ba89ce052fe76 (patch) | |
tree | fe8923a13998a96a865027c897273d0edb4d7c62 /linguistic | |
parent | f59e802478e35e7b6f561f24806bca47b604529b (diff) |
use comphelper::InitPropertySequence in more places
Change-Id: I72d7b13a23ce306b752b39187a0e9fbb7028643a
Reviewed-on: https://gerrit.libreoffice.org/38606
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/gciterator.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index 6b2540ab18ab..9d853dc567c8 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -54,6 +54,7 @@ #include <cppuhelper/supportsservice.hxx> #include <i18nlangtag/languagetag.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/propertysequence.hxx> #include <comphelper/extract.hxx> #include <deque> @@ -490,16 +491,12 @@ uno::Reference< linguistic2::XProofreader > GrammarCheckingIterator::GetGrammarC static uno::Sequence<beans::PropertyValue> lcl_makeProperties(uno::Reference<text::XFlatParagraph> const& xFlatPara) { - uno::Sequence<beans::PropertyValue> ret(2); uno::Reference<beans::XPropertySet> const xProps( xFlatPara, uno::UNO_QUERY_THROW); - ret[0] = beans::PropertyValue("FieldPositions", -1, - xProps->getPropertyValue("FieldPositions"), - beans::PropertyState_DIRECT_VALUE); - ret[1] = beans::PropertyValue("FootnotePositions", -1, - xProps->getPropertyValue("FootnotePositions"), - beans::PropertyState_DIRECT_VALUE); - return ret; + return comphelper::InitPropertySequence({ + { "FieldPositions", xProps->getPropertyValue("FieldPositions") }, + { "FootnotePositions", xProps->getPropertyValue("FootnotePositions") } + }); } void GrammarCheckingIterator::DequeueAndCheck() |