Kaydet (Commit) ade2c591 authored tarafından Caolán McNamara's avatar Caolán McNamara

add lwp to fftester

Change-Id: I1b31d486de3964a1198fe34e355e9c9542c16c00
üst 7c473eb7
...@@ -90,6 +90,13 @@ bool SAL_CALL LotusWordProImportFilter::importImpl( const Sequence< ::com::sun:: ...@@ -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 ) sal_Bool SAL_CALL LotusWordProImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
......
...@@ -347,6 +347,20 @@ try_again: ...@@ -347,6 +347,20 @@ try_again:
} }
ret = (int) (*pfnImport)(out); 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 /* To signal successful completion of a run, we need to deliver
......
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