summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/inc/mathml/mathmlexport.hxx35
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/mathml/mathmlexport.cxx20
3 files changed, 28 insertions, 29 deletions
diff --git a/starmath/inc/mathml/mathmlexport.hxx b/starmath/inc/mathml/mathmlexport.hxx
index 3a32a6e164f5..eae2dd4d7423 100644
--- a/starmath/inc/mathml/mathmlexport.hxx
+++ b/starmath/inc/mathml/mathmlexport.hxx
@@ -57,22 +57,25 @@ public:
bool Export(SfxMedium& rMedium);
void SetFlat(bool bIn) { bFlat = bIn; }
- void useHTMLMLEntities(bool bUseHTMLMLEntities) { m_bUseHTMLMLEntities = bUseHTMLMLEntities; }
-
- static bool
- WriteThroughComponent(const css::uno::Reference<css::io::XOutputStream>& xOutputStream,
- const css::uno::Reference<css::lang::XComponent>& xComponent,
- css::uno::Reference<css::uno::XComponentContext> const& rxContext,
- css::uno::Reference<css::beans::XPropertySet> const& rPropSet,
- const char* pComponentName, bool bUseHTMLMLEntities);
-
- static bool
- WriteThroughComponent(const css::uno::Reference<css::embed::XStorage>& xStor,
- const css::uno::Reference<css::lang::XComponent>& xComponent,
- const char* pStreamName,
- css::uno::Reference<css::uno::XComponentContext> const& rxContext,
- css::uno::Reference<css::beans::XPropertySet> const& rPropSet,
- const char* pComponentName, bool bUseHTMLMLEntities);
+
+ bool IsUseHTMLMLEntities() const { return m_bUseHTMLMLEntities; }
+ void SetUseHTMLMLEntities(bool bUseHTMLMLEntities)
+ {
+ m_bUseHTMLMLEntities = bUseHTMLMLEntities;
+ }
+
+ bool WriteThroughComponent(const css::uno::Reference<css::io::XOutputStream>& xOutputStream,
+ const css::uno::Reference<css::lang::XComponent>& xComponent,
+ css::uno::Reference<css::uno::XComponentContext> const& rxContext,
+ css::uno::Reference<css::beans::XPropertySet> const& rPropSet,
+ const char* pComponentName);
+
+ bool WriteThroughComponent(const css::uno::Reference<css::embed::XStorage>& xStor,
+ const css::uno::Reference<css::lang::XComponent>& xComponent,
+ const char* pStreamName,
+ css::uno::Reference<css::uno::XComponentContext> const& rxContext,
+ css::uno::Reference<css::beans::XPropertySet> const& rPropSet,
+ const char* pComponentName);
};
class SmXMLExport final : public SvXMLExport
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 67e216611e57..0b908d00fc76 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -862,7 +862,7 @@ bool SmDocShell::ConvertTo( SfxMedium &rMedium )
Reference<css::frame::XModel> xModel(GetModel());
SmXMLExportWrapper aEquation(xModel);
aEquation.SetFlat(true);
- aEquation.useHTMLMLEntities(true);
+ aEquation.SetUseHTMLMLEntities(true);
bRet = aEquation.Export(rMedium);
}
else if (pFlt->GetFilterName() == "MathType 3.x")
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;
}