[Libreoffice-commits] .: Branch 'libreoffice-3-6' - writerfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Dec 28 08:08:01 PST 2012


 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit be09d157c3dc114e4933c85499baa41bfa0510a7
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Wed Oct 17 11:17:14 2012 +0200

    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 at gmail.com>
    Tested-by: Muthu Subramanian K <muthusuba at gmail.com>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 9a348b8..5529703 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;


More information about the Libreoffice-commits mailing list