[Libreoffice-commits] core.git: svx/source
Michael Stahl
mstahl at redhat.com
Mon Aug 28 15:35:23 UTC 2017
svx/source/svdraw/svdobj.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 90b42251633db498505bc8906aefe5d08edbb5c6
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Aug 28 17:09:06 2017 +0200
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
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)
More information about the Libreoffice-commits
mailing list