Kaydet (Commit) 28e2f6dc authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: make members private in RTFMathSymbol

Change-Id: I5c63c28ba4c63e17b74e656d5382d45c9fcc6baa
Reviewed-on: https://gerrit.libreoffice.org/67428
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst d3e888cf
......@@ -1900,7 +1900,7 @@ int nRTFMathControlWords = SAL_N_ELEMENTS(aRTFMathControlWords);
bool RTFMathSymbol::operator<(const RTFMathSymbol& rOther) const
{
return eKeyword < rOther.eKeyword;
return m_eKeyword < rOther.m_eKeyword;
}
} // namespace rtftok
......
......@@ -2024,11 +2024,25 @@ extern RTFSymbol const aRTFControlWords[];
extern int nRTFControlWords;
/// Represents an RTF Math Control Word
struct RTFMathSymbol
class RTFMathSymbol
{
RTFKeyword eKeyword;
int nToken; ///< This is the OOXML token equivalent.
Destination eDestination;
RTFKeyword m_eKeyword;
int m_nToken; ///< This is the OOXML token equivalent.
Destination m_eDestination;
public:
RTFMathSymbol(RTFKeyword eKeyword, int nToken = 0,
Destination eDestination = Destination::NORMAL)
: m_eKeyword(eKeyword)
, m_nToken(nToken)
, m_eDestination(eDestination)
{
}
int GetToken() const { return m_nToken; }
Destination GetDestination() const { return m_eDestination; }
bool operator<(const RTFMathSymbol& rOther) const;
};
......
......@@ -635,12 +635,11 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
default:
{
// Check if it's a math token.
RTFMathSymbol aSymbol;
aSymbol.eKeyword = nKeyword;
RTFMathSymbol aSymbol(nKeyword);
if (RTFTokenizer::lookupMathKeyword(aSymbol))
{
m_aMathBuffer.appendOpeningTag(aSymbol.nToken);
m_aStates.top().eDestination = aSymbol.eDestination;
m_aMathBuffer.appendOpeningTag(aSymbol.GetToken());
m_aStates.top().eDestination = aSymbol.GetDestination();
return RTFError::OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment