[Libreoffice-commits] core.git: 2 commits - bin/get-bugzilla-attachments-by-mimetype sc/source vcl/workben

Caolán McNamara caolanm at redhat.com
Sat Oct 3 09:04:07 PDT 2015


 bin/get-bugzilla-attachments-by-mimetype |    1 +
 sc/source/filter/excel/excel.cxx         |    8 ++++++--
 vcl/workben/fftester.cxx                 |   11 ++++++-----
 3 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 7e5a7dcc5143911430b19bcb836ab573298cabe6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Oct 3 17:02:31 2015 +0100

    add application/x-qpro to get-bugzilla-attachments-by-mimetype
    
    Change-Id: Ie8350ce999fb6eaad8ba8f790753cfbbc1c8b70a

diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype
index 7f0dfa2..3b253bd 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -434,6 +434,7 @@ mimetypes = {
 # misc
     'text/csv': 'csv',
     'text/spreadsheet': 'slk',
+    'application/x-qpro': 'qpro',
     'application/x-dbase': 'dbf',
     'application/vnd.corel-draw': 'cdr',
     'application/vnd.lotus-wordpro': 'lwp',
commit 0d97aeea052892911f089fdb87f972c02435b127
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Oct 3 16:53:01 2015 +0100

    add QuattroPro support to fftester
    
    Change-Id: I832ab43e2fccf9b2c24e98ae443a9611012ea5a1

diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index b21ca5f..d52069e 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 1143bfc..c04d6d1 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)
             {


More information about the Libreoffice-commits mailing list