summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 135550178289..aa58eaa9650a 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3411,7 +3411,8 @@ int RTFDocumentImpl::popState()
bFaltEnd = true;
}
else if (m_aStates.top().nDestinationState == DESTINATION_FLYMAINCONTENT
- || m_aStates.top().nDestinationState == DESTINATION_SHPPICT)
+ || m_aStates.top().nDestinationState == DESTINATION_SHPPICT
+ || aState.nDestinationState == DESTINATION_SHAPE)
bPopFrame = true;
else if (m_aStates.top().nDestinationState == DESTINATION_DRAWINGOBJECT && m_aStates.top().aDrawingObject.xShape.is())
{
@@ -3436,6 +3437,8 @@ int RTFDocumentImpl::popState()
{
m_aStates.top().resetFrame();
parBreak();
+ // Save this state for later use, so we only reset frame status only for the first shape inside a frame.
+ aState = m_aStates.top();
m_bNeedPap = true;
}