diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-10-17 11:17:14 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-12-28 16:07:42 +0000 |
commit | be09d157c3dc114e4933c85499baa41bfa0510a7 (patch) | |
tree | a3dffbb5d0801af5674f7ad42cb3d58f6f9de060 | |
parent | e4fc7017ec672be095f1bc98c4f957de3c8ddae1 (diff) |
fdo#57678 fix import of RTF_PARD between RTF_CELL and RTF_ROW
(cherry picked from commits 6fc868c6535932bedfa0fc51d8dd5a1814d73ee8 and
c58981ca3dbf65c998acf979fb104534991b08c4)
Change-Id: I3e3d0de98c9df1a5f9041f6a7dd03b92efb5d0f5
Reviewed-on: https://gerrit.libreoffice.org/1482
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 11 |
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; |