[Libreoffice-commits] core.git: sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 19 13:20:33 UTC 2020


 sw/source/core/layout/ssfrm.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 69d8e5ce82c20abb8c6a5373114bcd73f97b98d2
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu Nov 19 10:27:04 2020 +0100
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu Nov 19 14:19:52 2020 +0100

    sw_fieldmarkhide: SwTextFrame::RegisterToNode(): presumably...
    
    ... need to check the equivalent condition here, that it's not merged
    by fieldmark, as it is already checked that it's not merged by redline.
    
    Change-Id: I9877ab8efb0cef2ab6bb59df5079586475088873
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106128
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 359711c5b4da..467a60a9d374 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -28,6 +28,7 @@
 #include <editeng/boxitem.hxx>
 #include <editeng/shaditem.hxx>
 #include <IDocumentRedlineAccess.hxx>
+#include <IDocumentMarkAccess.hxx>
 #include <fmtclds.hxx>
 #include <viewimp.hxx>
 #include <sortedobjs.hxx>
@@ -452,6 +453,13 @@ void SwTextFrame::RegisterToNode(SwTextNode & rNode, bool const isForceNodeAsFir
         assert(m_pMergedPara->pFirstNode->GetIndex() + 1 == rNode.GetIndex());
         assert(rNode.GetDoc().getIDocumentRedlineAccess().GetRedlinePos(
             *m_pMergedPara->pFirstNode, RedlineType::Delete) == SwRedlineTable::npos);
+        assert(std::find_if(
+            rNode.GetDoc().getIDocumentMarkAccess()->getFieldmarksBegin(),
+            rNode.GetDoc().getIDocumentMarkAccess()->getFieldmarksEnd(),
+            [this](::sw::mark::IMark const*const pMark) {
+                return pMark->GetMarkStart().nNode == *m_pMergedPara->pFirstNode
+                    && pMark->GetMarkEnd().nNode != *m_pMergedPara->pFirstNode;
+            }) == rNode.GetDoc().getIDocumentMarkAccess()->getFieldmarksEnd());
     }
     assert(&rNode != GetDep());
     assert(!m_pMergedPara


More information about the Libreoffice-commits mailing list