diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-12-13 13:09:06 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-12-18 22:30:15 +0100 |
commit | 859125dae998fd181f3b2704d3c1e49f757fcc69 (patch) | |
tree | cf66432118177735e5c9456a0497314c3087a4c6 /sw | |
parent | 4eca10d8d6d663cce8f978b6cfd66d94dd2a4a60 (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
(cherry picked from commit 8c708b6b1a7f0ee3ba97c0f2270b7f88f0495a15)
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 ) |