summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdmark.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-26 11:11:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-27 08:33:58 +0200
commitc0731052db789a876fbc98aceba0f067abba93d1 (patch)
tree08236aaa3c90953c1129362b653e7adde9894e56 /svx/source/svdraw/svdmark.cxx
parent55556a4cebbb35f15e7989bf0a6e276db99944e3 (diff)
loplugin:virtualdead in svx
Change-Id: I8af09a2f0a4a8c7952c5855b2934f2d0a64d9740 Reviewed-on: https://gerrit.libreoffice.org/79638 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdmark.cxx')
-rw-r--r--svx/source/svdraw/svdmark.cxx57
1 files changed, 27 insertions, 30 deletions
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 9001e601ca8c..6f07641c1953 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -745,43 +745,40 @@ namespace sdr
// build transitive hull
ImplCollectCompleteSelection(pCandidate);
- if(pCandidate->IsNode())
+ // travel over broadcaster/listener to access edges connected to the selected object
+ const SfxBroadcaster* pBC = pCandidate->GetBroadcaster();
+
+ if(pBC)
{
- // travel over broadcaster/listener to access edges connected to the selected object
- const SfxBroadcaster* pBC = pCandidate->GetBroadcaster();
+ const size_t nLstCnt(pBC->GetSizeOfVector());
- if(pBC)
+ for(size_t nl=0; nl < nLstCnt; ++nl)
{
- const size_t nLstCnt(pBC->GetSizeOfVector());
+ SfxListener* pLst = pBC->GetListener(nl);
+ SdrEdgeObj* pEdge = dynamic_cast<SdrEdgeObj*>( pLst );
- for(size_t nl=0; nl < nLstCnt; ++nl)
+ if(pEdge && pEdge->IsInserted() && pEdge->getSdrPageFromSdrObject() == pCandidate->getSdrPageFromSdrObject())
{
- SfxListener* pLst = pBC->GetListener(nl);
- SdrEdgeObj* pEdge = dynamic_cast<SdrEdgeObj*>( pLst );
+ SdrMark aM(pEdge, maMarkedObjectList.GetMark(a)->GetPageView());
- if(pEdge && pEdge->IsInserted() && pEdge->getSdrPageFromSdrObject() == pCandidate->getSdrPageFromSdrObject())
+ if(pEdge->GetConnectedNode(true) == pCandidate)
+ {
+ aM.SetCon1(true);
+ }
+
+ if(pEdge->GetConnectedNode(false) == pCandidate)
+ {
+ aM.SetCon2(true);
+ }
+
+ if(SAL_MAX_SIZE == maMarkedObjectList.FindObject(pEdge))
+ {
+ // check if it itself is selected
+ maEdgesOfMarkedNodes.InsertEntry(aM);
+ }
+ else
{
- SdrMark aM(pEdge, maMarkedObjectList.GetMark(a)->GetPageView());
-
- if(pEdge->GetConnectedNode(true) == pCandidate)
- {
- aM.SetCon1(true);
- }
-
- if(pEdge->GetConnectedNode(false) == pCandidate)
- {
- aM.SetCon2(true);
- }
-
- if(SAL_MAX_SIZE == maMarkedObjectList.FindObject(pEdge))
- {
- // check if it itself is selected
- maEdgesOfMarkedNodes.InsertEntry(aM);
- }
- else
- {
- maMarkedEdgesOfMarkedNodes.InsertEntry(aM);
- }
+ maMarkedEdgesOfMarkedNodes.InsertEntry(aM);
}
}
}