diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-12-13 13:09:06 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-12-18 17:55:28 +0100 |
commit | 8c708b6b1a7f0ee3ba97c0f2270b7f88f0495a15 (patch) | |
tree | a9cc0f0121ba8b277feb42ceab3126efd07b4eba /sw | |
parent | c2d87f9f1b078271367d9afc9403a13087e79f5c (diff) |
sw_redlinehide_4b: fix InsertCnt_() iteration of hidden tables
The iteration was stopped as soon as the first start-node of a table
cell was reached, because the SwTableNode case didn't skip over the
table section in the nodes-array. As seen in ooo67621-1.odt.
It looks like the same problem can't happen with sections or flys
because only tables have nested SwStartNodes and the Fly's nodes
can hardly all be in a delete redline.
Change-Id: Ib21a758c588d5dc8193ba171353f872de71bd65a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index dda68bc72473..4cf8effa38e2 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1475,6 +1475,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, if (pLayout->IsHideRedlines() && !pNd->IsCreateFrameWhenHidingRedlines()) { assert(pNd->GetRedlineMergeFlag() == SwNode::Merge::Hidden); + nIndex = pTableNode->EndOfSectionIndex(); continue; // skip it } @@ -1700,6 +1701,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, if (pLayout->IsHideRedlines() && !pNd->IsCreateFrameWhenHidingRedlines()) { assert(pNd->GetRedlineMergeFlag() == SwNode::Merge::Hidden); + assert(false); // actually a fly-section can't be deleted? continue; // skip it } if ( !pTable->empty() && bObjsDirect && !bDontCreateObjects ) @@ -1710,8 +1712,12 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, } } else + { + assert(!pLayout->IsHideRedlines() + || pNd->GetRedlineMergeFlag() != SwNode::Merge::Hidden); // Neither Content nor table nor section, so we are done. break; + } } if ( pActualSection ) |