summaryrefslogtreecommitdiff
path: root/svx/source/sdr/contact/viewcontact.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sdr/contact/viewcontact.cxx')
-rw-r--r--svx/source/sdr/contact/viewcontact.cxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx
index d3f09bcffdfe..fa9bc88d8f73 100644
--- a/svx/source/sdr/contact/viewcontact.cxx
+++ b/svx/source/sdr/contact/viewcontact.cxx
@@ -73,7 +73,12 @@ namespace sdr
ViewContact::~ViewContact()
{
- // get rid of all contacts
+ deleteAllVOCs();
+ }
+
+ void ViewContact::deleteAllVOCs()
+ {
+ // get rid of all VOCs
// #i84257# To avoid that each 'delete pCandidate' again uses
// the local RemoveViewObjectContact with a search and removal in the
// vector, simply copy and clear local vector.
@@ -301,6 +306,24 @@ namespace sdr
// default returns empty reference
return drawinglayer::primitive2d::Primitive2DSequence();
}
+
+ void ViewContact::flushViewObjectContacts(bool bWithHierarchy)
+ {
+ if(bWithHierarchy)
+ {
+ // flush DrawingLayer hierarchy
+ const sal_uInt32 nCount(GetObjectCount());
+
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ ViewContact& rChild = GetViewContact(a);
+ rChild.flushViewObjectContacts(bWithHierarchy);
+ }
+ }
+
+ // delete local VOCs
+ deleteAllVOCs();
+ }
} // end of namespace contact
} // end of namespace sdr