diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-03 16:53:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-03 17:03:27 +0100 |
commit | 0d97aeea052892911f089fdb87f972c02435b127 (patch) | |
tree | f6358d8fe0f952c28c000b0fde2d20016204248d | |
parent | c4da74ba1a9ece585a86a03664f79b333bfee0bb (diff) |
add QuattroPro support to fftester
Change-Id: I832ab43e2fccf9b2c24e98ae443a9611012ea5a1
-rw-r--r-- | sc/source/filter/excel/excel.cxx | 8 | ||||
-rw-r--r-- | vcl/workben/fftester.cxx | 11 |
2 files changed, 12 insertions, 7 deletions
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index b21ca5f6f8dd..d52069ec1e4b 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -218,13 +218,17 @@ FltError ScFormatFilterPluginImpl::ScExportExcel5( SfxMedium& rMedium, ScDocumen return eRet; } -extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportXLS(const OUString &rURL) +extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportSpreadsheet(const OUString &rURL, const OUString &rFlt) { ScDLL::Init(); SfxMedium aMedium(rURL, StreamMode::READ); ScDocument aDocument; aDocument.MakeTable(0); - FltError eError = ScFormatFilter::Get().ScImportExcel(aMedium, &aDocument, EIF_AUTO); + FltError eError(eERR_OK); + if (rFlt == "xls") + eError = ScFormatFilter::Get().ScImportExcel(aMedium, &aDocument, EIF_AUTO); + else if (rFlt == "wb2") + eError = ScFormatFilter::Get().ScImportQuattroPro(aMedium, &aDocument); return eError == eERR_OK; } diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index 1143bfcbe521..c04d6d187499 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -335,18 +335,19 @@ try_again: else ret = (int) (*pfnImport)(out, OUString("CWW8")); } - else if (strcmp(argv[2], "xls") == 0) + else if ( (strcmp(argv[2], "xls") == 0) || + (strcmp(argv[2], "wb2") == 0) ) { - static HFilterCall pfnImport(0); + static WFilterCall pfnImport(0); if (!pfnImport) { osl::Module aLibrary; aLibrary.loadRelative(&thisModule, "libscfiltlo.so", SAL_LOADMODULE_LAZY); - pfnImport = reinterpret_cast<HFilterCall>( - aLibrary.getFunctionSymbol("TestImportXLS")); + pfnImport = reinterpret_cast<WFilterCall>( + aLibrary.getFunctionSymbol("TestImportSpreadsheet")); aLibrary.release(); } - ret = (int) (*pfnImport)(out); + ret = (int) (*pfnImport)(out, OUString(argv[2], strlen(argv[2]), RTL_TEXTENCODING_UTF8)); } else if (strcmp(argv[2], "hwp") == 0) { |