[Libreoffice-commits] core.git: sw/inc sw/source vcl/workben

Caolán McNamara caolanm at redhat.com
Fri Aug 21 00:09:27 PDT 2015


 sw/inc/shellio.hxx              |    4 ++--
 sw/source/filter/ww8/ww8par.cxx |    3 ++-
 vcl/workben/fftester.cxx        |   14 +++++++++++---
 3 files changed, 15 insertions(+), 6 deletions(-)

New commits:
commit 2c387e2018ec56dcec80600bbf50f6c8c43a2b62
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 20 20:58:49 2015 +0100

    allow differentiation between ww6 and ww8
    
    Change-Id: Ia2181b3e9d01661aee521a763b0f87c65e6bad0c

diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 41c4d3e..6736a62 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -187,12 +187,12 @@ protected:
 #define SW_STREAM_READER    1
 #define SW_STORAGE_READER   2
 
-extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDOC(const OUString &rUrl);
+extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDOC(const OUString &rUrl, const OUString &rFltName);
 
 class SW_DLLPUBLIC Reader
 {
     friend class SwReader;
-    friend bool TestImportDOC(const OUString &rUrl);
+    friend bool TestImportDOC(const OUString &rUrl, const OUString &rFltName);
     SwDoc* pTemplate;
     OUString aTemplateNm;
 
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 0d0fb1e..ee603c2 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6048,7 +6048,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC()
     return new WW8Reader();
 }
 
-extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDOC(const OUString &rURL)
+extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDOC(const OUString &rURL, const OUString &rFltName)
 {
     Reader *pReader = ImportDOC();
 
@@ -6057,6 +6057,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDOC(const OUString &rURL
 
     pReader->pStrm = &aFileStream;
     pReader->pStg = xStorage.get();
+    pReader->SetFltName(rFltName);
 
     SwGlobals::ensure();
 
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index b3e0b6a..8de9d18a 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -63,7 +63,7 @@ using namespace cppu;
 
 extern "C" { static void SAL_CALL thisModule() {} }
 
-typedef bool (*WFilterCall)(const OUString &rUrl);
+typedef bool (*WFilterCall)(const OUString &rUrl, const OUString &rFlt);
 
 /* This constant specifies the number of inputs to process before restarting.
  * This is optional, but helps limit the impact of memory leaks and similar
@@ -312,7 +312,10 @@ try_again:
             SvFileStream aFileStream(out, StreamMode::READ);
             ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
         }
-        else if (strcmp(argv[2], "doc") == 0)
+        else if ( (strcmp(argv[2], "doc") == 0) ||
+                  (strcmp(argv[2], "ww8") == 0) ||
+                  (strcmp(argv[2], "ww6") == 0) ||
+                  (strcmp(argv[2], "ww2") == 0) )
         {
             static WFilterCall pfnImport(0);
             if (!pfnImport)
@@ -323,7 +326,12 @@ try_again:
                     aLibrary.getFunctionSymbol("TestImportDOC"));
                 aLibrary.release();
             }
-            ret = (int) (*pfnImport)(out);
+            if (strcmp(argv[2], "ww6") == 0)
+                ret = (int) (*pfnImport)(out, OUString("CWW6"));
+            else if (strcmp(argv[2], "ww2") == 0)
+                ret = (int) (*pfnImport)(out, OUString("WW6"));
+            else
+                ret = (int) (*pfnImport)(out, OUString("CWW8"));
         }
     }
 


More information about the Libreoffice-commits mailing list