summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/frmtool.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/frmtool.cxx')
-rw-r--r--sw/source/core/layout/frmtool.cxx30
1 files changed, 20 insertions, 10 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 9790d77241d1..429a1066044a 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1161,24 +1161,34 @@ void AppendObjs(const SwFrameFormats *const pTable, sal_uLong const nIndex,
{
std::vector<sw::Extent>::const_iterator iterFirst(pMerged->extents.begin());
std::vector<sw::Extent>::const_iterator iter(iterFirst);
- SwTextNode const* pNode(nullptr);
- for ( ; iter != pMerged->extents.end(); ++iter)
+ SwTextNode const* pNode(pMerged->pFirstNode);
+ for ( ; ; ++iter)
{
- if (iter->pNode != pNode)
+ if (iter == pMerged->extents.end()
+ || iter->pNode != pNode)
{
- if (pNode)
+ AppendObjsOfNode(pTable, pNode->GetIndex(), pFrame, pPage, pDoc, &iterFirst, &iter);
+ sal_uLong const until = iter == pMerged->extents.end()
+ ? pMerged->pLastNode->GetIndex() + 1
+ : iter->pNode->GetIndex();
+ for (sal_uLong i = pNode->GetIndex() + 1; i < until; ++i)
{
- AppendObjsOfNode(pTable, pNode->GetIndex(), pFrame, pPage, pDoc, &iterFirst, &iter);
+ // let's show at-para flys on nodes that contain start/end of
+ // redline too, even if there's no text there
+ SwNode const*const pTmp(pNode->GetNodes()[i]);
+ if (pTmp->GetRedlineMergeFlag() == SwNode::Merge::NonFirst)
+ {
+ AppendObjsOfNode(pTable, pTmp->GetIndex(), pFrame, pPage, pDoc, &iter, &iter);
+ }
+ }
+ if (iter == pMerged->extents.end())
+ {
+ break;
}
pNode = iter->pNode;
iterFirst = iter;
}
}
- if (!pNode)
- { // no extents?
- pNode = pMerged->pFirstNode;
- }
- AppendObjsOfNode(pTable, pNode->GetIndex(), pFrame, pPage, pDoc, &iterFirst, &iter);
}
else
{