[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Dec 3 20:17:42 UTC 2018


 sw/source/core/txtnode/ndtxt.cxx |    2 --
 1 file changed, 2 deletions(-)

New commits:
commit 5f2d61fff542b0732bf2d764be32fe809a11377b
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Dec 3 13:26:12 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Dec 3 21:17:21 2018 +0100

    Revert "sw_redlinehide_3: apparently a live SwNodeNum always has a parent"
    
    This reverts commit 6eebecf39a9e634cccad50ede29d281a6bfd24c8.
    
    The problem is that *during* RemoveFromList(), the IsInList() is called
    after the parent pointer is reset to null.
    
    e.g. during export of ooo67907-1.doc to .doc.
    
    SwTextNode::IsInList() const (this=0x57a3b30) at sw/source/core/txtnode/ndtxt.cxx:4352
    SwTextNode::NumRuleChgd() (this=0x57a3b30) at sw/source/core/txtnode/ndtxt.cxx:2863
    SwNodeNum::NotifyNode() (this=0x5804f80) at sw/source/core/SwNumberTree/SwNodeNum.cxx:211
    SwNumberTreeNode::Notify() (this=0x5804f80) at sw/source/core/SwNumberTree/SwNumberTree.cxx:1068
    SwNumberTreeNode::NotifyInvalidChildren() (this=0x52f1820) at sw/source/core/SwNumberTree/SwNumberTree.cxx:1088
    SwNumberTreeNode::NotifyInvalidChildren() (this=0x57e4ab0) at sw/source/core/SwNumberTree/SwNumberTree.cxx:1111
    SwNumberTreeNode::RemoveChild(SwNumberTreeNode*) (this=0x52f1820, pChild=0x5804f80) at sw/source/core/SwNumberTree/SwNumberTree.cxx:618
    SwNumberTreeNode::RemoveMe() (this=0x5804f80) at sw/source/core/SwNumberTree/SwNumberTree.cxx:648
    SwListImpl::RemoveListItem(SwNodeNum&) (rNodeNum=...) at sw/source/core/doc/list.cxx:151
    SwList::RemoveListItem(SwNodeNum&) (rNodeNum=...) at sw/source/core/doc/list.cxx:251
    SwTextNode::RemoveFromList() (this=0x57a3b30) at sw/source/core/txtnode/ndtxt.cxx:4328
    (anonymous namespace)::HandleSetAttrAtTextNode::HandleSetAttrAtTextNode(SwTextNode&, SfxItemSet const&) (this=0x7ffffcc90aa0, rTextNode=..., rItemSet=SfxItemSet of pool 0x51799b0 with parent 0x0 and Which ranges: [(72, 72)] = {...}) at sw/source/core/txtnode/ndtxt.cxx:4751
    SwTextNode::SetAttr(SfxItemSet const&) (this=0x57a3b30, rSet=SfxItemSet of pool 0x51799b0 with parent 0x0 and Which ranges: [(72, 72)] = {...}) at sw/source/core/txtnode/ndtxt.cxx:4917
    
    Change-Id: I5a2775f397da171cde23cbf42f7e95da958987e8
    Reviewed-on: https://gerrit.libreoffice.org/64448
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit b3e77dd93f2305f09e89d9a23a9b4404d7c796ba)
    Reviewed-on: https://gerrit.libreoffice.org/64450
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index d4e30e17c05c..3ac590b16784 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -4342,8 +4342,6 @@ void SwTextNode::RemoveFromListRLHidden()
 
 bool SwTextNode::IsInList() const
 {
-    // it looks like an unconnected Num can't happen, except in the undo-array
-    assert(!GetNum() || GetNum()->GetParent() || !GetNodes().IsDocNodes());
     return GetNum() != nullptr && GetNum()->GetParent() != nullptr;
 }
 


More information about the Libreoffice-commits mailing list