diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-21 20:09:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-21 20:10:09 +0100 |
commit | ade2c591ec0877af2a1e274f26da4b93e13e3a88 (patch) | |
tree | 0c9478d2ef23bf5d89760e78a79c24c4ec27a434 | |
parent | 7c473eb7892c29fd43a6693b3e44de824532209b (diff) |
add lwp to fftester
Change-Id: I1b31d486de3964a1198fe34e355e9c9542c16c00
-rw-r--r-- | lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 7 | ||||
-rw-r--r-- | vcl/workben/fftester.cxx | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx index 3d780637ef8f..d0bc26821801 100644 --- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx +++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx @@ -90,6 +90,13 @@ bool SAL_CALL LotusWordProImportFilter::importImpl( const Sequence< ::com::sun:: } +extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportLWP(const OUString &rURL) +{ + SvFileStream aFileStream(rURL, StreamMode::READ); + uno::Reference< XDocumentHandler > xHandler; + return ( ReadWordproFile(aFileStream, xHandler) == 0 ); +} + sal_Bool SAL_CALL LotusWordProImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) throw (RuntimeException, std::exception) { diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index 9c9ee1bfe5b6..cb41af952cc1 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -347,6 +347,20 @@ try_again: } ret = (int) (*pfnImport)(out); } + else if (strcmp(argv[2], "lwp") == 0) + { + static HFilterCall pfnImport(0); + if (!pfnImport) + { + osl::Module aLibrary; + aLibrary.loadRelative(&thisModule, "liblwpftlo.so", SAL_LOADMODULE_LAZY); + pfnImport = reinterpret_cast<HFilterCall>( + aLibrary.getFunctionSymbol("TestImportLWP")); + aLibrary.release(); + } + ret = (int) (*pfnImport)(out); + } + } /* To signal successful completion of a run, we need to deliver |