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

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 28 08:58:53 UTC 2020


 sw/source/core/text/txtfrm.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit b33034e7faee2cb8a602ed3342803bf731da8a8b
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Jul 27 18:12:19 2020 +0200
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Tue Jul 28 10:58:07 2020 +0200

    tdf#133967 sw_redlinehide: fix assert on undo-redo-undo
    
    Assertion `pNode->GetRedlineMergeFlag() != SwNode::Merge::Hidden' failed.
    
    4  IsAnchoredObjShown(SwTextFrame const&, SwFormatAnchor const&) (rFrame=..., rAnchor=...) at sw/source/core/layout/frmtool.cxx:1284
    5  SwFlyFrameFormat::MakeFrames() (this=0x7a97860) at sw/source/core/layout/atrfrm.cxx:3001
    6  AppendAllObjs(SwFrameFormats const*, SwFrame const*) (pTable=0x72457e0, pSib=0x4002800) at sw/source/core/layout/frmtool.cxx:1337
    7  InsertCnt_(SwLayoutFrame*, SwDoc*, unsigned long, bool, unsigned long, SwFrame*, sw::FrameMode) (pLay=0x8e86ce0, pDoc=0x7242220, nIndex=854, bPages=true, nEndIndex=854, pPrv=0x7a79850, eMode=sw::FrameMode::Existing) at sw/source/core/layout/frmtool.cxx:1892
    8  MakeFrames(SwDoc*, SwNodeIndex const&, SwNodeIndex const&) (pDoc=0x7242220, rSttIdx=SwNodeIndex (node 372), rEndIdx=SwNodeIndex (node 854)) at sw/source/core/layout/frmtool.cxx:2055
    9  sw::UpdateFramesForRemoveDeleteRedline(SwDoc&, SwPaM const&) (rDoc=..., rPam=SwPaM = {...}) at sw/source/core/doc/DocumentRedlineManager.cxx:292
    
    because this added an extent for the node but it still had its flag set
    to Hidden:
    
    11 sw::UpdateMergedParaForInsert(sw::MergedPara&, bool, SwTextNode const&, sal_Int32, sal_Int32) (rMerged=..., isRealInsert=false, rNode=..., nIndex=0, nLen=279) at sw/source/core/text/txtfrm.cxx:1002
    12 SwTextFrame::SwClientNotify(SwModify const&, SfxHint const&) (this=0x7337940, rModify=..., rHint=...) at sw/source/core/text/txtfrm.cxx:2076
    17 SwRangeRedline::InvalidateRange(SwRangeRedline::Invalidation) (this=0x8b3a120, eWhy=SwRangeRedline::Invalidation::Remove) at sw/source/core/doc/docredln.cxx:1261
    18 sw::DocumentRedlineManager::DeleteRedline(SwPaM const&, bool, RedlineType) (this=0x7250b60, rRange=SwPaM = {...}, bSaveInUndo=true, nDelType=-1) at sw/source/core/doc/DocumentRedlineManager.cxx:2386
    19 SwUndoRedlineDelete::UndoRedlineImpl(SwDoc&, SwPaM&) (this=0x8a65a00, rDoc=..., rPam=SwPaM = {...}) at sw/source/core/undo/unredln.cxx:198
    
    Change-Id: I7f36705f1abb2df97a00b359e40534aef0e10d93
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99524
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 6aa977013384..00f73d4faafb 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1009,6 +1009,11 @@ static TextFrameIndex UpdateMergedParaForInsert(MergedPara & rMerged,
             rMerged.pParaPropsNode = &const_cast<SwTextNode&>(rNode);
             rMerged.pParaPropsNode->AddToListRLHidden();
         }
+        // called from SwRangeRedline::InvalidateRange()
+        if (rNode.GetRedlineMergeFlag() == SwNode::Merge::Hidden)
+        {
+            const_cast<SwTextNode&>(rNode).SetRedlineMergeFlag(SwNode::Merge::NonFirst);
+        }
     }
     rMerged.mergedText = text.makeStringAndClear();
     return TextFrameIndex(nInserted);


More information about the Libreoffice-commits mailing list