diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-12-24 15:06:15 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-12-24 15:22:55 +0100 |
commit | 4a507f732d82c188ad81b022cbe3037951e58ac3 (patch) | |
tree | f05afe92f305d3b44ab75888af0f39fa5f4abac8 /writerfilter | |
parent | be safe against invalid cond format cell info, fdo#58686 (diff) | |
download | core-4a507f732d82c188ad81b022cbe3037951e58ac3.tar.gz core-4a507f732d82c188ad81b022cbe3037951e58ac3.zip |
fdo#57678 fix import of RTF_PARD between RTF_CELL and RTF_ROW
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 4ad99cea78f2..e5f9c29764b5 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2078,11 +2078,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(); - if (m_aStates.top().nDestinationState != DESTINATION_SHAPETEXT) - m_pCurrentBuffer = 0; break; case RTF_SECTD: m_aStates.top().aSectionSprms = m_aDefaultState.aSectionSprms; |