[Libreoffice-commits] core.git: lotuswordpro/source vcl/workben
Caolán McNamara
caolanm at redhat.com
Fri Aug 21 12:10:33 PDT 2015
lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 7 +++++++
vcl/workben/fftester.cxx | 14 ++++++++++++++
2 files changed, 21 insertions(+)
New commits:
commit ade2c591ec0877af2a1e274f26da4b93e13e3a88
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Aug 21 20:09:52 2015 +0100
add lwp to fftester
Change-Id: I1b31d486de3964a1198fe34e355e9c9542c16c00
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index 3d78063..d0bc268 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 9c9ee1b..cb41af9 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
More information about the Libreoffice-commits
mailing list