diff options
author | David Tardon <dtardon@redhat.com> | 2014-09-17 10:24:01 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-09-17 19:26:25 +0200 |
commit | 10572dbff870228e802b08da6728a5e28d1928b5 (patch) | |
tree | 5431300daf193f0a8700bb62bbe362842f809a23 /writerperfect | |
parent | 3c8af5367de69ea74506f6f630276e9dfd8ff51f (diff) |
pass media descriptor to import functions
Change-Id: I0c3e9c7ba83ef886958789706929b2eede30c343
Diffstat (limited to 'writerperfect')
24 files changed, 30 insertions, 24 deletions
diff --git a/writerperfect/source/calc/ImportFilterBase.cxx b/writerperfect/source/calc/ImportFilterBase.cxx index 330cb6eb5c36..1f9ede0390aa 100644 --- a/writerperfect/source/calc/ImportFilterBase.cxx +++ b/writerperfect/source/calc/ImportFilterBase.cxx @@ -97,7 +97,8 @@ throw (RuntimeException, std::exception) doRegisterHandlers(exporter); - return doImportDocument(input, exporter); + utl::MediaDescriptor aMediaDescriptor(aDescriptor); + return doImportDocument(input, exporter, aMediaDescriptor); } void SAL_CALL ImportFilterImpl::cancel() diff --git a/writerperfect/source/calc/ImportFilterBase.hxx b/writerperfect/source/calc/ImportFilterBase.hxx index dafeffcb083c..4b9d11da7af1 100644 --- a/writerperfect/source/calc/ImportFilterBase.hxx +++ b/writerperfect/source/calc/ImportFilterBase.hxx @@ -20,6 +20,8 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase4.hxx> +#include <unotools/mediadescriptor.hxx> + namespace com { namespace sun @@ -91,7 +93,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) = 0; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator) = 0; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator, utl::MediaDescriptor &) = 0; virtual void doRegisterHandlers(OdsGenerator &rGenerator); private: diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx index 6c9e316ef73d..fb3878720507 100644 --- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx +++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx @@ -24,7 +24,7 @@ using com::sun::star::uno::Exception; using com::sun::star::uno::RuntimeException; using com::sun::star::uno::XComponentContext; -bool MSWorksCalcImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator) +bool MSWorksCalcImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator, utl::MediaDescriptor &) { return libwps::WPS_OK == libwps::WPSDocument::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.hxx b/writerperfect/source/calc/MSWorksCalcImportFilter.hxx index dfe43d117487..c719d71ba8bf 100644 --- a/writerperfect/source/calc/MSWorksCalcImportFilter.hxx +++ b/writerperfect/source/calc/MSWorksCalcImportFilter.hxx @@ -34,7 +34,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; virtual void doRegisterHandlers(OdsGenerator &rGenerator) SAL_OVERRIDE; }; diff --git a/writerperfect/source/calc/MWAWCalcImportFilter.cxx b/writerperfect/source/calc/MWAWCalcImportFilter.cxx index e7a7e3ed2e23..435fc98683e7 100644 --- a/writerperfect/source/calc/MWAWCalcImportFilter.cxx +++ b/writerperfect/source/calc/MWAWCalcImportFilter.cxx @@ -39,7 +39,7 @@ static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData return MWAWDocument::decodeSpreadsheet(data, &exporter); } -bool MWAWCalcImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator) +bool MWAWCalcImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator, utl::MediaDescriptor &) { return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/calc/MWAWCalcImportFilter.hxx b/writerperfect/source/calc/MWAWCalcImportFilter.hxx index 2624fe2ab1fc..97714e7ee7c9 100644 --- a/writerperfect/source/calc/MWAWCalcImportFilter.hxx +++ b/writerperfect/source/calc/MWAWCalcImportFilter.hxx @@ -34,7 +34,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGSpreadsheetInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; virtual void doRegisterHandlers(OdsGenerator &rGenerator) SAL_OVERRIDE; }; diff --git a/writerperfect/source/draw/CDRImportFilter.cxx b/writerperfect/source/draw/CDRImportFilter.cxx index c5fa26939b46..8bb8fe8da95f 100644 --- a/writerperfect/source/draw/CDRImportFilter.cxx +++ b/writerperfect/source/draw/CDRImportFilter.cxx @@ -27,7 +27,7 @@ using com::sun::star::uno::Sequence; using com::sun::star::uno::XComponentContext; using com::sun::star::uno::XInterface; -bool CDRImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) +bool CDRImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) { return libcdr::CDRDocument::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/draw/CDRImportFilter.hxx b/writerperfect/source/draw/CDRImportFilter.hxx index 2b8526af2ac7..f2a4d45987e1 100644 --- a/writerperfect/source/draw/CDRImportFilter.hxx +++ b/writerperfect/source/draw/CDRImportFilter.hxx @@ -34,7 +34,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; }; OUString CDRImportFilter_getImplementationName() diff --git a/writerperfect/source/draw/CMXImportFilter.cxx b/writerperfect/source/draw/CMXImportFilter.cxx index 6b6d5a864d31..120e98555ab4 100644 --- a/writerperfect/source/draw/CMXImportFilter.cxx +++ b/writerperfect/source/draw/CMXImportFilter.cxx @@ -27,7 +27,7 @@ using com::sun::star::uno::Sequence; using com::sun::star::uno::XComponentContext; using com::sun::star::uno::XInterface; -bool CMXImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) +bool CMXImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) { return libcdr::CMXDocument::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/draw/CMXImportFilter.hxx b/writerperfect/source/draw/CMXImportFilter.hxx index 0c7f0b207411..dcb43e8cb7ad 100644 --- a/writerperfect/source/draw/CMXImportFilter.hxx +++ b/writerperfect/source/draw/CMXImportFilter.hxx @@ -34,7 +34,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; }; OUString CMXImportFilter_getImplementationName() diff --git a/writerperfect/source/draw/FreehandImportFilter.cxx b/writerperfect/source/draw/FreehandImportFilter.cxx index 86002f3a20ae..c977db3e82e1 100644 --- a/writerperfect/source/draw/FreehandImportFilter.cxx +++ b/writerperfect/source/draw/FreehandImportFilter.cxx @@ -23,7 +23,7 @@ using com::sun::star::uno::Sequence; using com::sun::star::uno::XComponentContext; using com::sun::star::uno::XInterface; -bool FreehandImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) +bool FreehandImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) { return libfreehand::FreeHandDocument::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/draw/FreehandImportFilter.hxx b/writerperfect/source/draw/FreehandImportFilter.hxx index 6b1c94dcb797..e6dd231c2108 100644 --- a/writerperfect/source/draw/FreehandImportFilter.hxx +++ b/writerperfect/source/draw/FreehandImportFilter.hxx @@ -31,7 +31,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; }; OUString FreehandImportFilter_getImplementationName() diff --git a/writerperfect/source/draw/ImportFilterBase.cxx b/writerperfect/source/draw/ImportFilterBase.cxx index 9d2258c79b50..cc8da909ffca 100644 --- a/writerperfect/source/draw/ImportFilterBase.cxx +++ b/writerperfect/source/draw/ImportFilterBase.cxx @@ -97,7 +97,8 @@ throw (RuntimeException, std::exception) doRegisterHandlers(exporter); - return doImportDocument(input, exporter); + utl::MediaDescriptor aMediaDescriptor(aDescriptor); + return doImportDocument(input, exporter, aMediaDescriptor); } void SAL_CALL ImportFilterImpl::cancel() diff --git a/writerperfect/source/draw/ImportFilterBase.hxx b/writerperfect/source/draw/ImportFilterBase.hxx index 4b7e9170f56b..1701af118cb1 100644 --- a/writerperfect/source/draw/ImportFilterBase.hxx +++ b/writerperfect/source/draw/ImportFilterBase.hxx @@ -20,6 +20,8 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase4.hxx> +#include <unotools/mediadescriptor.hxx> + namespace com { namespace sun @@ -91,7 +93,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) = 0; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) = 0; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) = 0; virtual void doRegisterHandlers(OdgGenerator &rGenerator); private: diff --git a/writerperfect/source/draw/MSPUBImportFilter.cxx b/writerperfect/source/draw/MSPUBImportFilter.cxx index 4a09651bb252..97231de01435 100644 --- a/writerperfect/source/draw/MSPUBImportFilter.cxx +++ b/writerperfect/source/draw/MSPUBImportFilter.cxx @@ -25,7 +25,7 @@ using com::sun::star::uno::Sequence; using com::sun::star::uno::XComponentContext; using com::sun::star::uno::XInterface; -bool MSPUBImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) +bool MSPUBImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) { return libmspub::MSPUBDocument::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/draw/MSPUBImportFilter.hxx b/writerperfect/source/draw/MSPUBImportFilter.hxx index c0e702c8e297..8fe58ba5cbc9 100644 --- a/writerperfect/source/draw/MSPUBImportFilter.hxx +++ b/writerperfect/source/draw/MSPUBImportFilter.hxx @@ -31,7 +31,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; }; OUString MSPUBImportFilter_getImplementationName() diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.cxx b/writerperfect/source/draw/MWAWDrawImportFilter.cxx index 96b007f572c3..694bb3fc8bcc 100644 --- a/writerperfect/source/draw/MWAWDrawImportFilter.cxx +++ b/writerperfect/source/draw/MWAWDrawImportFilter.cxx @@ -39,7 +39,7 @@ static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData return MWAWDocument::decodeSpreadsheet(data, &exporter); } -bool MWAWDrawImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) +bool MWAWDrawImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) { return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.hxx b/writerperfect/source/draw/MWAWDrawImportFilter.hxx index 2a23e6b36f54..84a562b1431c 100644 --- a/writerperfect/source/draw/MWAWDrawImportFilter.hxx +++ b/writerperfect/source/draw/MWAWDrawImportFilter.hxx @@ -34,7 +34,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; virtual void doRegisterHandlers(OdgGenerator &rGenerator) SAL_OVERRIDE; }; diff --git a/writerperfect/source/draw/PageMakerImportFilter.cxx b/writerperfect/source/draw/PageMakerImportFilter.cxx index bb836d342076..fa08c7632d30 100644 --- a/writerperfect/source/draw/PageMakerImportFilter.cxx +++ b/writerperfect/source/draw/PageMakerImportFilter.cxx @@ -25,7 +25,7 @@ using com::sun::star::uno::Sequence; using com::sun::star::uno::XComponentContext; using com::sun::star::uno::XInterface; -bool PageMakerImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) +bool PageMakerImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) { return libpagemaker::PMDocument::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/draw/PageMakerImportFilter.hxx b/writerperfect/source/draw/PageMakerImportFilter.hxx index e69474e1fee5..5665759afec7 100644 --- a/writerperfect/source/draw/PageMakerImportFilter.hxx +++ b/writerperfect/source/draw/PageMakerImportFilter.hxx @@ -31,7 +31,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; }; OUString PageMakerImportFilter_getImplementationName() diff --git a/writerperfect/source/draw/VisioImportFilter.cxx b/writerperfect/source/draw/VisioImportFilter.cxx index deae25afcc87..d68e4139cc4d 100644 --- a/writerperfect/source/draw/VisioImportFilter.cxx +++ b/writerperfect/source/draw/VisioImportFilter.cxx @@ -23,7 +23,7 @@ using com::sun::star::uno::Sequence; using com::sun::star::uno::XComponentContext; using com::sun::star::uno::XInterface; -bool VisioImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) +bool VisioImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) { return libvisio::VisioDocument::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/draw/VisioImportFilter.hxx b/writerperfect/source/draw/VisioImportFilter.hxx index 5f2120fd98e1..175dfa3082bc 100644 --- a/writerperfect/source/draw/VisioImportFilter.hxx +++ b/writerperfect/source/draw/VisioImportFilter.hxx @@ -31,7 +31,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; }; OUString VisioImportFilter_getImplementationName() diff --git a/writerperfect/source/draw/WPGImportFilter.cxx b/writerperfect/source/draw/WPGImportFilter.cxx index 7c7ff885b358..fbf06b3ecbea 100644 --- a/writerperfect/source/draw/WPGImportFilter.cxx +++ b/writerperfect/source/draw/WPGImportFilter.cxx @@ -30,7 +30,7 @@ using com::sun::star::uno::Sequence; using com::sun::star::uno::XComponentContext; using com::sun::star::uno::XInterface; -bool WPGImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) +bool WPGImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) { return libwpg::WPGraphics::parse(&rInput, &rGenerator); } diff --git a/writerperfect/source/draw/WPGImportFilter.hxx b/writerperfect/source/draw/WPGImportFilter.hxx index b55c9fecfb58..98bbf656611f 100644 --- a/writerperfect/source/draw/WPGImportFilter.hxx +++ b/writerperfect/source/draw/WPGImportFilter.hxx @@ -36,7 +36,7 @@ public: private: virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE; - virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator) SAL_OVERRIDE; + virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE; }; OUString WPGImportFilter_getImplementationName() |