summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/ooxmlexport.cxx6
-rw-r--r--starmath/source/rtfexport.cxx4
-rw-r--r--starmath/source/wordexportbase.hxx3
3 files changed, 8 insertions, 5 deletions
diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index fff9cd7c598c..a915596b67a2 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -28,7 +28,7 @@ SmOoxmlExport::SmOoxmlExport(const SmNode *const pIn, OoxmlVersion const v,
void SmOoxmlExport::ConvertFromStarMath( const ::sax_fastparser::FSHelperPtr& serializer, const sal_Int8 nAlign )
{
- if( m_pTree == nullptr )
+ if( GetTree() == nullptr )
return;
m_pSerializer = serializer;
@@ -66,7 +66,7 @@ void SmOoxmlExport::ConvertFromStarMath( const ::sax_fastparser::FSHelperPtr& se
m_pSerializer->singleElementNS(XML_m, XML_jc, FSNS(XML_m, XML_val), "right");
m_pSerializer->endElementNS(XML_m, XML_oMathParaPr);
m_pSerializer->startElementNS(XML_m, XML_oMath);
- HandleNode(m_pTree, 0);
+ HandleNode(GetTree(), 0);
m_pSerializer->endElementNS(XML_m, XML_oMath);
m_pSerializer->endElementNS(XML_m, XML_oMathPara);
}
@@ -74,7 +74,7 @@ void SmOoxmlExport::ConvertFromStarMath( const ::sax_fastparser::FSHelperPtr& se
{
m_pSerializer->startElementNS(XML_m, XML_oMath,
FSNS(XML_xmlns, XML_m), "http://schemas.openxmlformats.org/officeDocument/2006/math");
- HandleNode( m_pTree, 0 );
+ HandleNode( GetTree(), 0 );
m_pSerializer->endElementNS( XML_m, XML_oMath );
}
}
diff --git a/starmath/source/rtfexport.cxx b/starmath/source/rtfexport.cxx
index 87e51a3b9374..90a13f3ce1f4 100644
--- a/starmath/source/rtfexport.cxx
+++ b/starmath/source/rtfexport.cxx
@@ -24,12 +24,12 @@ SmRtfExport::SmRtfExport(const SmNode* pIn)
void SmRtfExport::ConvertFromStarMath(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding)
{
- if (!m_pTree)
+ if (!GetTree())
return;
m_pBuffer = &rBuffer;
m_nEncoding = nEncoding;
m_pBuffer->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE LO_STRING_SVTOOLS_RTF_MOMATH " ");
- HandleNode(m_pTree, 0);
+ HandleNode(GetTree(), 0);
m_pBuffer->append("}"); // moMath
}
diff --git a/starmath/source/wordexportbase.hxx b/starmath/source/wordexportbase.hxx
index 4f191df2aa4e..af66167a17fb 100644
--- a/starmath/source/wordexportbase.hxx
+++ b/starmath/source/wordexportbase.hxx
@@ -49,6 +49,9 @@ protected:
virtual void HandleBrace(const SmBraceNode* pNode, int nLevel) = 0;
virtual void HandleVerticalBrace(const SmVerticalBraceNode* pNode, int nLevel) = 0;
virtual void HandleBlank() = 0;
+ const SmNode* GetTree() const { return m_pTree; }
+
+private:
const SmNode* const m_pTree;
};