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

add dif support to fftester

Change-Id: I1428dcaea579c73712f5228dd6de73c7369a7948
Reviewed-on: https://gerrit.libreoffice.org/44457Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 657ead3c
...@@ -280,4 +280,15 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportWKS(SvStream& rStream) ...@@ -280,4 +280,15 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportWKS(SvStream& rStream)
return ScFormatFilter::Get().ScImportLotus123(aMedium, &aDocument, RTL_TEXTENCODING_ASCII_US) == ERRCODE_NONE; return ScFormatFilter::Get().ScImportLotus123(aMedium, &aDocument, RTL_TEXTENCODING_ASCII_US) == ERRCODE_NONE;
} }
extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDIF(SvStream &rStream)
{
ScDLL::Init();
ScDocument aDocument;
ScDocOptions aDocOpt = aDocument.GetDocOptions();
aDocOpt.SetLookUpColRowNames(false);
aDocument.SetDocOptions(aDocOpt);
aDocument.MakeTable(0);
return ScFormatFilter::Get().ScImportDif(rStream, &aDocument, ScAddress(0, 0, 0), RTL_TEXTENCODING_IBM_850) == ERRCODE_NONE;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -514,6 +514,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) ...@@ -514,6 +514,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
SvFileStream aFileStream(out, StreamMode::READ); SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream); ret = (int) (*pfnImport)(aFileStream);
} }
else if (strcmp(argv[2], "dif") == 0)
{
static FFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
aLibrary.loadRelative(&thisModule, "libscfiltlo.so", SAL_LOADMODULE_LAZY);
pfnImport = reinterpret_cast<FFilterCall>(
aLibrary.getFunctionSymbol("TestImportDIF"));
aLibrary.release();
}
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream);
}
else if (strcmp(argv[2], "sc-rtf") == 0) else if (strcmp(argv[2], "sc-rtf") == 0)
{ {
static FFilterCall pfnImport(nullptr); static FFilterCall pfnImport(nullptr);
......
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