From 9939ffb9b87e536b3217232b732218e82126ad6c Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 1 Dec 2022 16:30:28 +0100 Subject: [PATCH] tdf#151842: Revert "Connect new import / export to starmath" Will create a unittest in a follow-up commit This reverts commit 9b7600f547cec9ed1bacca3a1b995b3c33fd5723. Change-Id: I10b28c3ae15f60da41a16136f3969ed6917d8a93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143534 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- starmath/source/document.cxx | 27 ++++++++++++++------------- starmath/util/sm.component | 24 ------------------------ 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index b6d0c7193e5f..e7c5dee90c4d 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -70,8 +70,8 @@ #include "ooxmlexport.hxx" #include "ooxmlimport.hxx" #include "rtfexport.hxx" -#include -#include +#include +#include #include #include #include @@ -596,7 +596,8 @@ bool SmDocShell::ConvertFrom(SfxMedium &rMedium) InvalidateCursor(); } Reference xModel(GetModel()); - SmMLImportWrapper aEquation(xModel); + SmXMLImportWrapper aEquation(xModel); + aEquation.useHTMLMLEntities(true); bSuccess = ( ERRCODE_NONE == aEquation.Import(rMedium) ); } else @@ -656,7 +657,7 @@ bool SmDocShell::Load( SfxMedium& rMedium ) { // is this a fabulous math package ? Reference xModel(GetModel()); - SmMLImportWrapper aEquation(xModel); + SmXMLImportWrapper aEquation(xModel); auto nError = aEquation.Import(rMedium); bRet = ERRCODE_NONE == nError; SetError(nError); @@ -687,8 +688,8 @@ bool SmDocShell::Save() ArrangeFormula(); Reference xModel(GetModel()); - SmMLExportWrapper aEquation(xModel); - aEquation.setFlat(false); + SmXMLExportWrapper aEquation(xModel); + aEquation.SetFlat(false); return aEquation.Export(*GetMedium()); } @@ -747,8 +748,8 @@ bool SmDocShell::SaveAs( SfxMedium& rMedium ) ArrangeFormula(); Reference xModel(GetModel()); - SmMLExportWrapper aEquation(xModel); - aEquation.setFlat(false); + SmXMLExportWrapper aEquation(xModel); + aEquation.SetFlat(false); bRet = aEquation.Export(rMedium); } return bRet; @@ -769,16 +770,16 @@ bool SmDocShell::ConvertTo( SfxMedium &rMedium ) if(rFltName == STAROFFICE_XML) { Reference xModel(GetModel()); - SmMLExportWrapper aEquation(xModel); - aEquation.setFlat(false); + SmXMLExportWrapper aEquation(xModel); + aEquation.SetFlat(false); bRet = aEquation.Export(rMedium); } else if(rFltName == MATHML_XML) { Reference xModel(GetModel()); - SmMLExportWrapper aEquation(xModel); - aEquation.setFlat(true); - aEquation.setUseHTMLMLEntities(true); + SmXMLExportWrapper aEquation(xModel); + aEquation.SetFlat(true); + aEquation.SetUseHTMLMLEntities(true); bRet = aEquation.Export(rMedium); } else if (pFlt->GetFilterName() == "MathType 3.x") diff --git a/starmath/util/sm.component b/starmath/util/sm.component index 29eb7c9b4168..2b84a17c429c 100644 --- a/starmath/util/sm.component +++ b/starmath/util/sm.component @@ -67,28 +67,4 @@ constructor="org_libreoffice_comp_Math_sidebar_SmPanelFactory"> - - - - - - - - - - - - - - - - - -