[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source

Michael Stahl mstahl at redhat.com
Tue Jan 23 08:58:03 UTC 2018


 sw/source/filter/html/htmlctxt.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 01f4bfdc21dbee3599943b82c96266d5f9aa6a2a
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 18 17:31:22 2018 +0100

    ofz#4754 sw: HTML import: fix invalid tables being created
    
    This 75-byte horror creates 2 nested tables, where one SwTableBox is in
    the SwTableLine of the inner SwTable but in the SwSortBoxes of the outer
    table, which is of course invalid.
    
    The root cause is that in SwHTMLParser::SplitAttrTab(), we move the
    m_pPam backward once and forward twice, moving it ouside the inner
    table.
    
    Change-Id: I63f6508afe1270ccdeb05da6f222b0aba5259889
    (cherry picked from commit e1a4a8c180f98aac0ab21a22a6a03d2109c712be)
    Reviewed-on: https://gerrit.libreoffice.org/48146
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 423f2b670155..421dcead0afc 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -160,6 +160,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
             {
                 m_pPam->Move( fnMoveForward );
                 nOldEndCnt = m_pPam->GetPoint()->nContent.GetIndex();
+                bMoveBack = false;
             }
 
             if( (RES_PARATR_BEGIN <= nWhich && bMoveBack) ||


More information about the Libreoffice-commits mailing list