diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-08-28 17:09:06 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-08-28 17:30:11 +0200 |
commit | 90b42251633db498505bc8906aefe5d08edbb5c6 (patch) | |
tree | 5f1e23c603e924c7c66d1e134e6a4e5b8a4ed942 /svx | |
parent | efa8e32389ddd1db4e7b5b88856436fdc7061733 (diff) |
svx: fix assert in SdrEdgeObj::ConnectToNode()
When loading ooo68143-1.sxw we get an assert:
Assertion `!(bListeningAlready && !bPreventDuplicates) && "duplicate
listener, try building with DBG_UTIL to find the other insert site."'
The connector is connected to the same SdrObject on both ends:
<draw:connector ...
draw:start-shape="id13" draw:start-glue-point="2"
draw:end-shape="id13" draw:end-glue-point="2">
Change-Id: Ia0dd140b7c2ca948ace3fbf93d8c4abd4331399d
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 947f70a29f4e..e1257be84517 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -585,7 +585,11 @@ void SdrObject::AddListener(SfxListener& rListener) { ImpForcePlusData(); if (pPlusData->pBroadcast==nullptr) pPlusData->pBroadcast=new SfxBroadcaster; - rListener.StartListening(*pPlusData->pBroadcast); + + // SdrEdgeObj may be connected to same SdrObject on both ends so allow it + // to listen twice + SdrEdgeObj const*const pEdge(dynamic_cast<SdrEdgeObj const*>(&rListener)); + rListener.StartListening(*pPlusData->pBroadcast, pEdge != nullptr); } void SdrObject::RemoveListener(SfxListener& rListener) |