summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-01-18 17:31:22 +0100
committerMichael Stahl <mstahl@redhat.com>2018-01-18 18:07:16 +0100
commite1a4a8c180f98aac0ab21a22a6a03d2109c712be (patch)
tree51dd4fa327dfdbb975b27bd86f9201642a717c5a
parentcda2d47fd556e0593bf415a69cc8dc18abcd1701 (diff)
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
-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 19657967268f..93e8c5f57f0c 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -163,6 +163,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) ||