summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-01-18 17:31:22 +0100
committerAndras Timar <andras.timar@collabora.com>2018-03-06 14:50:46 +0100
commit7ea0a4095af92e2cb9bc4cdcf3b1e28018596aac (patch)
tree48e2195a5883317a60dd2d10fbc8f958cbca3b47
parentRelated: tdf#114251 disable vectorization of svDoubleRef (diff)
downloadcore-7ea0a4095af92e2cb9bc4cdcf3b1e28018596aac.tar.gz
core-7ea0a4095af92e2cb9bc4cdcf3b1e28018596aac.zip
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@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 01f4bfdc21dbee3599943b82c96266d5f9aa6a2a)
-rw-r--r--sw/source/filter/html/htmlctxt.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index afdf468bec81..6f40d68142d3 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -167,6 +167,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) ||