summaryrefslogtreecommitdiff
path: root/starmath/source/mathml
diff options
context:
space:
mode:
authordante <dante19031999@gmail.com>2021-03-07 12:30:57 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-07 15:50:19 +0100
commit4e57d6a51c5d619ff41e1a2990267fdc67b0e53a (patch)
tree9170214ab57667bb8e1de41f22c50554fb775455 /starmath/source/mathml
parent57c8f13d176cccf913573dafaf10a870619822fc (diff)
Simplify the use of custom hmtl/mathml entities on matmlexport
This patch also serves as a base for further improvements. Change-Id: I72967e3c9739576fb74d16e656f41c440af3a4ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112127 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source/mathml')
-rw-r--r--starmath/source/mathml/mathmlexport.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/starmath/source/mathml/mathmlexport.cxx b/starmath/source/mathml/mathmlexport.cxx
index f1952b5057cc..d125e49be6a2 100644
--- a/starmath/source/mathml/mathmlexport.cxx
+++ b/starmath/source/mathml/mathmlexport.cxx
@@ -185,8 +185,7 @@ bool SmXMLExportWrapper::Export(SfxMedium& rMedium)
bRet = WriteThroughComponent(xStg, xModelComp, "meta.xml", xContext, xInfoSet,
(bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaExporter"
- : "com.sun.star.comp.Math.XMLMetaExporter"),
- m_bUseHTMLMLEntities);
+ : "com.sun.star.comp.Math.XMLMetaExporter"));
}
if (bRet)
{
@@ -194,8 +193,7 @@ bool SmXMLExportWrapper::Export(SfxMedium& rMedium)
xStatusIndicator->setValue(nSteps++);
bRet = WriteThroughComponent(xStg, xModelComp, "content.xml", xContext, xInfoSet,
- "com.sun.star.comp.Math.XMLContentExporter",
- m_bUseHTMLMLEntities);
+ "com.sun.star.comp.Math.XMLContentExporter");
}
if (bRet)
@@ -205,8 +203,7 @@ bool SmXMLExportWrapper::Export(SfxMedium& rMedium)
bRet = WriteThroughComponent(xStg, xModelComp, "settings.xml", xContext, xInfoSet,
(bOASIS ? "com.sun.star.comp.Math.XMLOasisSettingsExporter"
- : "com.sun.star.comp.Math.XMLSettingsExporter"),
- m_bUseHTMLMLEntities);
+ : "com.sun.star.comp.Math.XMLSettingsExporter"));
}
}
else
@@ -218,8 +215,7 @@ bool SmXMLExportWrapper::Export(SfxMedium& rMedium)
xStatusIndicator->setValue(nSteps++);
bRet = WriteThroughComponent(xOut, xModelComp, xContext, xInfoSet,
- "com.sun.star.comp.Math.XMLContentExporter",
- m_bUseHTMLMLEntities);
+ "com.sun.star.comp.Math.XMLContentExporter");
}
if (xStatusIndicator.is())
@@ -233,7 +229,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<io::XOutputStream
const Reference<XComponent>& xComponent,
Reference<uno::XComponentContext> const& rxContext,
Reference<beans::XPropertySet> const& rPropSet,
- const char* pComponentName, bool bUseHTMLMLEntities)
+ const char* pComponentName)
{
OSL_ENSURE(xOutputStream.is(), "I really need an output stream!");
OSL_ENSURE(xComponent.is(), "Need component!");
@@ -244,7 +240,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<io::XOutputStream
// connect XML writer to output stream
xSaxWriter->setOutputStream(xOutputStream);
- if (bUseHTMLMLEntities)
+ if (m_bUseHTMLMLEntities)
xSaxWriter->setCustomEntityNames(starmathdatabase::icustomMathmlHtmlEntitiesExport);
// prepare arguments (prepend doc handler to given arguments)
@@ -279,7 +275,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<embed::XStorage>&
const char* pStreamName,
Reference<uno::XComponentContext> const& rxContext,
Reference<beans::XPropertySet> const& rPropSet,
- const char* pComponentName, bool bUseHTMLMLEntities)
+ const char* pComponentName)
{
OSL_ENSURE(xStorage.is(), "Need storage!");
OSL_ENSURE(nullptr != pStreamName, "Need stream name!");
@@ -312,7 +308,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<embed::XStorage>&
// write the stuff
bool bRet = WriteThroughComponent(xStream->getOutputStream(), xComponent, rxContext, rPropSet,
- pComponentName, bUseHTMLMLEntities);
+ pComponentName);
return bRet;
}