diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index c1680c7b03cb..8f5a2f8dd5af 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -985,7 +985,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) { if (!m_pCurrentBuffer) parBreak(); - else + else if (m_aStates.top().nDestinationState != DESTINATION_SHAPETEXT) { RTFValue::Pointer_t pValue; m_pCurrentBuffer->push_back(make_pair(BUFFER_PAR, pValue)); @@ -2145,7 +2145,8 @@ int RTFDocumentImpl::pushState() m_aStates.top().nDestinationState = DESTINATION_FONTENTRY; else if (m_aStates.top().nDestinationState == DESTINATION_STYLESHEET) m_aStates.top().nDestinationState = DESTINATION_STYLEENTRY; - else if (m_aStates.top().nDestinationState == DESTINATION_FIELDRESULT) + else if (m_aStates.top().nDestinationState == DESTINATION_FIELDRESULT || + m_aStates.top().nDestinationState == DESTINATION_SHAPETEXT) m_aStates.top().nDestinationState = DESTINATION_NORMAL; else if (m_aStates.top().nDestinationState == DESTINATION_REVISIONTABLE) m_aStates.top().nDestinationState = DESTINATION_REVISIONENTRY;