summaryrefslogtreecommitdiff
path: root/svx/source/sdr/properties
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2017-04-24 16:37:46 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2017-05-06 18:08:16 +0200
commit3908064e9034074c82ed62bf60f5107f27ca4061 (patch)
tree138ad8ceb58228f93eff11a48c9a675b142f64b8 /svx/source/sdr/properties
parent3be7c158184b1b9fd60d71a59a02c8738bdf977e (diff)
Simplify sdr::properties::ItemChangeBroadcaster
Change-Id: Ie731294b6490165cf208335e7ec404a35f8a6a95
Diffstat (limited to 'svx/source/sdr/properties')
-rw-r--r--svx/source/sdr/properties/itemsettools.cxx34
1 files changed, 3 insertions, 31 deletions
diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx
index c11c54dcf445..6e7d990ef781 100644
--- a/svx/source/sdr/properties/itemsettools.cxx
+++ b/svx/source/sdr/properties/itemsettools.cxx
@@ -38,8 +38,7 @@ namespace sdr
if (const SdrObjGroup* pGroupObj = dynamic_cast<const SdrObjGroup*>(&rObj))
{
SdrObjListIter aIter(*pGroupObj, SdrIterMode::DeepNoGroups);
- mpRectangleVector = new RectangleVector;
- mpRectangleVector->reserve(aIter.Count());
+ maRectangles.reserve(aIter.Count());
while(aIter.IsMore())
{
@@ -47,40 +46,13 @@ namespace sdr
if(pObj)
{
- mpRectangleVector->push_back(pObj->GetLastBoundRect());
+ maRectangles.push_back(pObj->GetLastBoundRect());
}
}
-
- mbSingleRect = false;
- }
- else
- {
- mpRectangle = new tools::Rectangle(rObj.GetLastBoundRect());
- mbSingleRect = true;
- }
- }
-
- ItemChangeBroadcaster::~ItemChangeBroadcaster()
- {
- if (!mbSingleRect)
- {
- delete mpRectangleVector;
- }
- else
- {
- delete mpRectangle;
- }
- }
-
- const tools::Rectangle& ItemChangeBroadcaster::GetRectangle(sal_uInt32 nIndex) const
- {
- if (!mbSingleRect)
- {
- return (*mpRectangleVector)[nIndex];
}
else
{
- return *mpRectangle;
+ maRectangles.push_back(rObj.GetLastBoundRect());
}
}
} // end of namespace properties