starmath: m_pTree can be private
Which shows that subclasses only read it, never write it. Change-Id: I90ea4528d4362c068ba02113b1b038a811ea32b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96321 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
This commit is contained in:
parent
a35c18aeff
commit
43bdac0ebd
3 changed files with 8 additions and 5 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue