summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-09 13:43:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-09 14:24:00 +0200
commit027b25ecd54ac97ea2471ca73e3ba89ce052fe76 (patch)
treefe8923a13998a96a865027c897273d0edb4d7c62 /sw/qa/extras/ooxmlimport
parentf59e802478e35e7b6f561f24806bca47b604529b (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/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 2d4804e937af..4f76f5f321cb 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -101,11 +101,9 @@ public:
CPPUNIT_ASSERT_MESSAGE("no desktop", mxDesktop.is());
uno::Reference<frame::XComponentLoader> xLoader(mxDesktop, uno::UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE("no loader", xLoader.is());
- uno::Sequence<beans::PropertyValue> args(1);
- args[0].Name = "DocumentService";
- args[0].Handle = -1;
- args[0].Value <<= OUString("com.sun.star.text.TextDocument");
- args[0].State = beans::PropertyState_DIRECT_VALUE;
+ uno::Sequence<beans::PropertyValue> args( comphelper::InitPropertySequence({
+ { "DocumentService", uno::Any(OUString("com.sun.star.text.TextDocument")) }
+ }));
uno::Reference<lang::XComponent> xComponent = xLoader->loadComponentFromURL(aURL, "_default", 0, args);
OUString sMessage = "loading succeeded: " + aURL;
@@ -1243,11 +1241,10 @@ DECLARE_OOXMLIMPORT_TEST(testTdf100072, "tdf100072.docx")
SvMemoryStream aStream;
uno::Reference<io::XOutputStream> xOutputStream(new utl::OStreamWrapper(aStream));
- uno::Sequence<beans::PropertyValue> aDescriptor =
- {
- beans::PropertyValue("OutputStream", sal_Int32(0), uno::makeAny(xOutputStream), beans::PropertyState_DIRECT_VALUE),
- beans::PropertyValue("FilterName", sal_Int32(0), uno::makeAny(OUString("SVM")), beans::PropertyState_DIRECT_VALUE)
- };
+ uno::Sequence<beans::PropertyValue> aDescriptor( comphelper::InitPropertySequence({
+ { "OutputStream", uno::Any(xOutputStream) },
+ { "FilterName", uno::Any(OUString("SVM")) }
+ }));
xGraphicExporter->filter(aDescriptor);
aStream.Seek(STREAM_SEEK_TO_BEGIN);