Kaydet (Commit) 006a5d5b authored tarafından David Tardon's avatar David Tardon

use MediaDescriptor to get input stream

Change-Id: Iecc7f373d0d352281b53324ef8824c5d7073fe8a
üst a23a51af
...@@ -68,14 +68,9 @@ public: ...@@ -68,14 +68,9 @@ public:
virtual sal_Bool SAL_CALL filter(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > &rDescriptor) 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 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
{ {
sal_Int32 nLength = rDescriptor.getLength(); utl::MediaDescriptor aDescriptor(rDescriptor);
const css::beans::PropertyValue *pValue = rDescriptor.getConstArray();
css::uno::Reference < css::io::XInputStream > xInputStream; css::uno::Reference < css::io::XInputStream > xInputStream;
for (sal_Int32 i = 0 ; i < nLength; i++) aDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream;
{
if (pValue[i].Name == "InputStream")
pValue[i].Value >>= xInputStream;
}
if (!xInputStream.is()) if (!xInputStream.is())
{ {
OSL_ASSERT(false); OSL_ASSERT(false);
...@@ -103,7 +98,6 @@ public: ...@@ -103,7 +98,6 @@ public:
this->doRegisterHandlers(exporter); this->doRegisterHandlers(exporter);
utl::MediaDescriptor aDescriptor(rDescriptor);
return this->doImportDocument(input, exporter, aDescriptor); return this->doImportDocument(input, exporter, aDescriptor);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment