summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docnum.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/docnum.cxx')
-rw-r--r--sw/source/core/doc/docnum.cxx39
1 files changed, 31 insertions, 8 deletions
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 852cd0c8ff48..63be0e158b7d 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1440,11 +1440,23 @@ namespace sw {
void
GotoPrevLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const*const pLayout)
{
- if (pLayout && pLayout->IsHideRedlines()
- && rIndex.GetNode().IsTextNode()
- && rIndex.GetNode().GetRedlineMergeFlag() != SwNode::Merge::None)
+ if (pLayout && pLayout->IsHideRedlines())
{
- rIndex = *static_cast<SwTextFrame*>(rIndex.GetNode().GetTextNode()->getLayoutFrame(pLayout))->GetMergedPara()->pFirstNode;
+ if (rIndex.GetNode().IsTextNode())
+ {
+ if (rIndex.GetNode().GetRedlineMergeFlag() != SwNode::Merge::None)
+ {
+ rIndex = *static_cast<SwTextFrame*>(rIndex.GetNode().GetTextNode()->getLayoutFrame(pLayout))->GetMergedPara()->pFirstNode;
+ }
+ }
+ else if (rIndex.GetNode().IsEndNode())
+ {
+ if (rIndex.GetNode().GetRedlineMergeFlag() == SwNode::Merge::Hidden)
+ {
+ rIndex = *rIndex.GetNode().StartOfSectionNode();
+ assert(rIndex.GetNode().IsTableNode());
+ }
+ }
}
--rIndex;
if (pLayout && rIndex.GetNode().IsTextNode())
@@ -1456,11 +1468,22 @@ GotoPrevLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const*const pLayout)
void
GotoNextLayoutTextFrame(SwNodeIndex & rIndex, SwRootFrame const*const pLayout)
{
- if (pLayout && pLayout->IsHideRedlines()
- && rIndex.GetNode().IsTextNode()
- && rIndex.GetNode().GetRedlineMergeFlag() != SwNode::Merge::None)
+ if (pLayout && pLayout->IsHideRedlines())
{
- rIndex = *static_cast<SwTextFrame*>(rIndex.GetNode().GetTextNode()->getLayoutFrame(pLayout))->GetMergedPara()->pLastNode;
+ if (rIndex.GetNode().IsTextNode())
+ {
+ if (rIndex.GetNode().GetRedlineMergeFlag() != SwNode::Merge::None)
+ {
+ rIndex = *static_cast<SwTextFrame*>(rIndex.GetNode().GetTextNode()->getLayoutFrame(pLayout))->GetMergedPara()->pLastNode;
+ }
+ }
+ else if (rIndex.GetNode().IsTableNode())
+ {
+ if (rIndex.GetNode().GetRedlineMergeFlag() == SwNode::Merge::Hidden)
+ {
+ rIndex = *rIndex.GetNode().EndOfSectionNode();
+ }
+ }
}
++rIndex;
if (pLayout && rIndex.GetNode().IsTextNode())