From f17489f80020dfd7a9de66c0d580dcf23f7d3c09 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 13 Apr 2017 09:26:12 +0100 Subject: ofz: fix leak this is still an ugly beast, but at least its new/delete on the same type now Change-Id: I7560eb30c2a43f2cf56a956144fbec66d7d163a6 --- svx/inc/sdr/properties/itemsettools.hxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'svx/inc') diff --git a/svx/inc/sdr/properties/itemsettools.hxx b/svx/inc/sdr/properties/itemsettools.hxx index cef08ef4907f..0e1f760e0777 100644 --- a/svx/inc/sdr/properties/itemsettools.hxx +++ b/svx/inc/sdr/properties/itemsettools.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SVX_INC_SDR_PROPERTIES_ITEMSETTOOLS_HXX #include +#include class SdrObject; class SfxItemSet; @@ -34,14 +35,17 @@ namespace sdr { class ItemChangeBroadcaster { - sal_uInt32 mnCount; + bool mbSingleRect; void* mpData; public: explicit ItemChangeBroadcaster(const SdrObject& rObj); ~ItemChangeBroadcaster(); - sal_uInt32 GetRectangleCount() const { return mnCount; } + sal_uInt32 GetRectangleCount() const + { + return mbSingleRect ? 1 : static_cast(mpData)->size(); + } const tools::Rectangle& GetRectangle(sal_uInt32 nIndex) const; }; } // end of namespace properties -- cgit