From 006a5d5be6071b27551baa3048c805891a1eae63 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 17 Sep 2014 18:53:37 +0200 Subject: use MediaDescriptor to get input stream Change-Id: Iecc7f373d0d352281b53324ef8824c5d7073fe8a --- writerperfect/inc/writerperfect/ImportFilter.hxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'writerperfect/inc') diff --git a/writerperfect/inc/writerperfect/ImportFilter.hxx b/writerperfect/inc/writerperfect/ImportFilter.hxx index 294dd46d312d..ec59c09c0b8b 100644 --- a/writerperfect/inc/writerperfect/ImportFilter.hxx +++ b/writerperfect/inc/writerperfect/ImportFilter.hxx @@ -68,14 +68,9 @@ public: virtual sal_Bool SAL_CALL filter(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &rDescriptor) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { - sal_Int32 nLength = rDescriptor.getLength(); - const css::beans::PropertyValue *pValue = rDescriptor.getConstArray(); + utl::MediaDescriptor aDescriptor(rDescriptor); css::uno::Reference < css::io::XInputStream > xInputStream; - for (sal_Int32 i = 0 ; i < nLength; i++) - { - if (pValue[i].Name == "InputStream") - pValue[i].Value >>= xInputStream; - } + aDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; if (!xInputStream.is()) { OSL_ASSERT(false); @@ -103,7 +98,6 @@ public: this->doRegisterHandlers(exporter); - utl::MediaDescriptor aDescriptor(rDescriptor); return this->doImportDocument(input, exporter, aDescriptor); } -- cgit