summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 9a348b84f7f2..5529703cba29 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1933,10 +1933,15 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
case RTF_PARD:
if (m_bHadPicture)
dispatchSymbol(RTF_PAR);
- m_aStates.top().aParagraphSprms = m_aDefaultState.aParagraphSprms;
- m_aStates.top().aParagraphAttributes = m_aDefaultState.aParagraphAttributes;
+ // \pard is allowed between \cell and \row, but in that case it should not reset the fact that we're inside a table.
+ if (m_aStates.top().nCells == 0)
+ {
+ m_aStates.top().aParagraphSprms = m_aDefaultState.aParagraphSprms;
+ m_aStates.top().aParagraphAttributes = m_aDefaultState.aParagraphAttributes;
+ if (m_aStates.top().nDestinationState != DESTINATION_SHAPETEXT)
+ m_pCurrentBuffer = 0;
+ }
m_aStates.top().resetFrame();
- m_pCurrentBuffer = 0;
break;
case RTF_SECTD:
m_aStates.top().aSectionSprms = m_aDefaultState.aSectionSprms;