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

Caolán McNamara caolanm at redhat.com
Sun Dec 3 09:31:43 UTC 2017


 starmath/source/mathtype.cxx |    7 +++++++
 starmath/source/mathtype.hxx |    2 +-
 vcl/workben/fftester.cxx     |   14 ++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

New commits:
commit a60d7fde5455a4c19ef36411e9f15cbded45175e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 2 20:43:06 2017 +0000

    Add mathtype to fftester
    
    Change-Id: If082fc85d943c5b2537800456dcebbce3cb10791
    Reviewed-on: https://gerrit.libreoffice.org/45730
    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/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 9f58ee1ece4a..3843bc0d1da7 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -3336,4 +3336,11 @@ void MathType::HandleText(SmNode *pNode)
     }
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportMathType(SvStream &rStream)
+{
+    OUString sText;
+    MathType aEquation(sText);
+    return aEquation.Parse(&rStream);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index 577196aac565..25d80de86b8c 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -98,7 +98,7 @@ public:
     }
 
     bool Parse(SotStorage* pStor);
-    bool Parse(SvStream* pStor);
+    bool Parse(SvStream* pStream);
     bool ConvertFromStarMath( SfxMedium& rMedium );
 
 private:
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index 439f2db7702b..db9b8d0f7ca6 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -641,6 +641,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
             SvFileStream aFileStream(out, StreamMode::READ);
             ret = (int) (*pfnImport)(aFileStream);
         }
+        else if (strcmp(argv[2], "mtp") == 0)
+        {
+            static FFilterCall pfnImport(nullptr);
+            if (!pfnImport)
+            {
+                osl::Module aLibrary;
+                aLibrary.loadRelative(&thisModule, "libsmlo.so", SAL_LOADMODULE_LAZY);
+                pfnImport = reinterpret_cast<FFilterCall>(
+                    aLibrary.getFunctionSymbol("TestImportMathType"));
+                aLibrary.release();
+            }
+            SvFileStream aFileStream(out, StreamMode::READ);
+            ret = (int) (*pfnImport)(aFileStream);
+        }
 #endif
     }
     catch (...)


More information about the Libreoffice-commits mailing list