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 /sw/source/filter/rtf/swparrtf.cxx | |
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 'sw/source/filter/rtf/swparrtf.cxx')
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index d1186a7f9755..4f8ff64906f5 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -30,6 +30,7 @@ #include <unotools/streamwrap.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/propertysequence.hxx> #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/document/XImporter.hpp> @@ -79,14 +80,11 @@ sal_uLong SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rP SwXTextRange::CreateXTextRange(rDoc, *rPam.GetPoint(), nullptr); uno::Reference<document::XFilter> xFilter(xInterface, uno::UNO_QUERY_THROW); - uno::Sequence<beans::PropertyValue> aDescriptor(3); - aDescriptor[0].Name = "InputStream"; - uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pStrm)); - aDescriptor[0].Value <<= xStream; - aDescriptor[1].Name = "InsertMode"; - aDescriptor[1].Value <<= true; - aDescriptor[2].Name = "TextInsertModeRange"; - aDescriptor[2].Value <<= xInsertTextRange; + uno::Sequence<beans::PropertyValue> aDescriptor( comphelper::InitPropertySequence({ + { "InputStream", uno::Any(uno::Reference<io::XStream>(new utl::OStreamWrapper(*pStrm))) }, + { "InsertMode", uno::Any(true) }, + { "TextInsertModeRange", uno::Any(xInsertTextRange) } + })); sal_uLong ret(0); try { @@ -173,10 +171,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportRTF(SvStream& rStream) xImporter->setTargetDocument(xDstDoc); uno::Reference<document::XFilter> xFilter(xInterface, uno::UNO_QUERY_THROW); - uno::Sequence<beans::PropertyValue> aDescriptor(1); - aDescriptor[0].Name = "InputStream"; - uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(rStream)); - aDescriptor[0].Value <<= xStream; + uno::Sequence<beans::PropertyValue> aDescriptor( comphelper::InitPropertySequence({ + { "InputStream", uno::Any(uno::Reference<io::XStream>(new utl::OStreamWrapper(rStream))) } + })); bool bRet = true; try { |