[Libreoffice-commits] core.git: sc/source vcl/workben
Caolán McNamara
caolanm at redhat.com
Fri Jul 28 19:37:59 UTC 2017
sc/source/filter/excel/excel.cxx | 9 +++++++++
vcl/workben/fftester.cxx | 14 ++++++++++++++
2 files changed, 23 insertions(+)
New commits:
commit ff4a22b003f836b9f5c8d5526d733d9d86871de0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jul 28 15:06:41 2017 +0100
add calc rtf filter test hook
Change-Id: Ib15f1094929e1670537657b4c19cc1e0bfd39bbd
Reviewed-on: https://gerrit.libreoffice.org/40537
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index b6087bf30715..8abbd30a71b5 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -227,6 +227,15 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportQPW(SvStream &rStream)
return ScFormatFilter::Get().ScImportQuattroPro(&rStream, &aDocument) == ERRCODE_NONE;
}
+extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportCalcRTF(SvStream &rStream)
+{
+ ScDLL::Init();
+ ScDocument aDocument;
+ aDocument.MakeTable(0);
+ ScRange aRange;
+ return ScFormatFilter::Get().ScImportRTF(rStream, OUString(), &aDocument, aRange) == ERRCODE_NONE;
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportXLS(const OUString &rURL)
{
ScDLL::Init();
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index 48e17858a231..85c7e6368999 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -490,6 +490,20 @@ try_again:
SvFileStream aFileStream(out, StreamMode::READ);
ret = (int) (*pfnImport)(aFileStream);
}
+ else if (strcmp(argv[2], "sc-rtf") == 0)
+ {
+ static FFilterCall pfnImport(nullptr);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libscfiltlo.so", SAL_LOADMODULE_LAZY);
+ pfnImport = reinterpret_cast<FFilterCall>(
+ aLibrary.getFunctionSymbol("TestImportCalcRTF"));
+ aLibrary.release();
+ }
+ SvFileStream aFileStream(out, StreamMode::READ);
+ ret = (int) (*pfnImport)(aFileStream);
+ }
else if (strcmp(argv[2], "slk") == 0)
{
static FFilterCall pfnImport(nullptr);
More information about the Libreoffice-commits
mailing list