From 43e4ae79f2c09e0fe596a7dc96eb9f2498439490 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 23 Jul 2012 17:40:56 +0200 Subject: implement RTF_MBAR{,PR} Change-Id: Id5acca5c734f69797d5c19fdcfc0ccb4717127f6 --- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 16 +++++++++++++++- writerfilter/source/rtftok/rtfdocumentimpl.hxx | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'writerfilter/source/rtftok') diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 3581f308a17c..8088406fe902 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1400,6 +1400,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) m_aStates.top().nDestinationState = DESTINATION_ATNID; break; case RTF_MMATH: + case RTF_MOMATHPARA: // Nothing to do here (just enter the destination) till RTF_MMATHPR is implemented. break; case RTF_MOMATH: @@ -1437,6 +1438,14 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) m_aMathBuffer.appendOpeningTag(M_TOKEN(accPr)); m_aStates.top().nDestinationState = DESTINATION_MACCPR; break; + case RTF_MBAR: + m_aMathBuffer.appendOpeningTag(M_TOKEN(bar)); + m_aStates.top().nDestinationState = DESTINATION_MBAR; + break; + case RTF_MBARPR: + m_aMathBuffer.appendOpeningTag(M_TOKEN(barPr)); + m_aStates.top().nDestinationState = DESTINATION_MBARPR; + break; case RTF_MCHR: m_aStates.top().nDestinationState = DESTINATION_MCHR; break; @@ -3099,7 +3108,8 @@ int RTFDocumentImpl::pushState() (m_aStates.top().nDestinationState == DESTINATION_FIELDINSTRUCTION && !m_bEq) || m_aStates.top().nDestinationState == DESTINATION_MOMATH || m_aStates.top().nDestinationState == DESTINATION_MNUM || - m_aStates.top().nDestinationState == DESTINATION_MDEN) + m_aStates.top().nDestinationState == DESTINATION_MDEN || + m_aStates.top().nDestinationState == DESTINATION_ME) m_aStates.top().nDestinationState = DESTINATION_NORMAL; else if (m_aStates.top().nDestinationState == DESTINATION_FIELDINSTRUCTION && m_bEq) m_aStates.top().nDestinationState = DESTINATION_EQINSTRUCTION; @@ -3549,6 +3559,10 @@ int RTFDocumentImpl::popState() } else if (m_aStates.top().nDestinationState == DESTINATION_ME) m_aMathBuffer.appendClosingTag(M_TOKEN(e)); + else if (m_aStates.top().nDestinationState == DESTINATION_MBAR) + m_aMathBuffer.appendClosingTag(M_TOKEN(bar)); + else if (m_aStates.top().nDestinationState == DESTINATION_MBARPR) + m_aMathBuffer.appendClosingTag(M_TOKEN(barPr)); // See if we need to end a track change RTFValue::Pointer_t pTrackchange = m_aStates.top().aCharacterSprms.find(NS_ooxml::LN_trackchange); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index dd98a28e0386..6b700c9ec60e 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -130,7 +130,9 @@ namespace writerfilter { DESTINATION_MACC, DESTINATION_MACCPR, DESTINATION_MCHR, - DESTINATION_ME + DESTINATION_ME, + DESTINATION_MBAR, + DESTINATION_MBARPR }; enum RTFBorderState -- cgit