summaryrefslogtreecommitdiff
path: root/include/svx/sdr
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-01-23 09:01:42 +0100
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2017-01-23 13:50:45 +0000
commitabc8057ab1a1189ff7f88d42b13b363ceb228d16 (patch)
tree20145fa90c9a1bf91dea3489d384fe6d28ac2ec0 /include/svx/sdr
parent5f1bc19a9a0dbdf88e11ef81cc8c2f302748632c (diff)
pass ownership by pointer
to show the intend of the code. assert on invalid objects. remove useless OSL_ENSURE. make sure list of owning pointers can't be copied. Change-Id: I3cccf8ea87585ec9fe62921203a4d12e617ce15c Reviewed-on: https://gerrit.libreoffice.org/33393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'include/svx/sdr')
-rw-r--r--include/svx/sdr/overlay/overlayobjectlist.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/svx/sdr/overlay/overlayobjectlist.hxx b/include/svx/sdr/overlay/overlayobjectlist.hxx
index c8e670dee304..b348b3cf3380 100644
--- a/include/svx/sdr/overlay/overlayobjectlist.hxx
+++ b/include/svx/sdr/overlay/overlayobjectlist.hxx
@@ -39,13 +39,15 @@ namespace sdr
public:
OverlayObjectList() {}
+ OverlayObjectList(const OverlayObjectList&) = delete;
+ OverlayObjectList& operator=(const OverlayObjectList&) = delete;
~OverlayObjectList();
// clear list, this includes deletion of all contained objects
void clear();
- // append objects
- void append(OverlayObject& rOverlayObject) { maVector.push_back(&rOverlayObject); }
+ // append objects (takes ownership)
+ void append(OverlayObject* pOverlayObject);
// access to objects
sal_uInt32 count() const { return maVector.size(); }