summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-01-14 20:10:24 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-01-16 17:59:55 +0100
commit092f1a810d5b10aa8d6d8455491f7ae42caf3a08 (patch)
treeacf2dc91298d02b2339077746637b11d921844c4 /sw
parent1b5ff41ae250ccd6b0e73b412ab7bd655f489d74 (diff)
tdf#135014 sw_redlinehide: fix missing frames when removing fieldmark
A fieldmark was deleted. UpdateFramesForRemoveDeleteRedline() deleted the MergedPara but its start node was before the start node of the fieldmark, and then MakeFrames() didn't find a frame on the preceding node and did nothing. Similar problem likely possible with redline. Change-Id: I532f9a67c0268f3287736a61da4cc9fefec7b8e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109307 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 32e104c1d6be0ffe6ed6c4e08af868c87b3c258c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109347 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx2
2 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index f3aaa13a60d1..90d957bab92f 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -301,6 +301,8 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam)
pFrame->SetMergedPara(sw::CheckParaRedlineMerge(
*pFrame, rFirstNode, eMode));
eMode = sw::FrameMode::New; // Existing is not idempotent!
+ // update pNode so MakeFrames starts on 2nd node
+ pNode = &rFirstNode;
}
}
if (pLast != pNode)
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 2d585994ec05..ec1957dbaaaf 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1278,6 +1278,8 @@ void SwTextFrame::SetMergedPara(std::unique_ptr<sw::MergedPara> p)
pFirst->Add(this); // must register at node again
}
}
+ // postcondition: frame must be listening somewhere
+ assert(m_pMergedPara || GetDep());
}
const OUString& SwTextFrame::GetText() const