summaryrefslogtreecommitdiff
path: root/writerperfect/inc
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-09-17 18:53:37 +0200
committerDavid Tardon <dtardon@redhat.com>2014-09-17 19:26:26 +0200
commit006a5d5be6071b27551baa3048c805891a1eae63 (patch)
tree59b73bb0e9c80db6f835af2a15410c29caf8aec9 /writerperfect/inc
parenta23a51af899b31bcf93781637371ffd8ef813bf5 (diff)
use MediaDescriptor to get input stream
Change-Id: Iecc7f373d0d352281b53324ef8824c5d7073fe8a
Diffstat (limited to 'writerperfect/inc')
-rw-r--r--writerperfect/inc/writerperfect/ImportFilter.hxx10
1 files changed, 2 insertions, 8 deletions
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);
}