summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-08-16 12:07:05 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-08-16 14:46:01 +0200
commitc3852d41a419331277d0b98b02792f0bbf704d5b (patch)
tree19813ebd0eb52dfadbea21d632892a59ba961d6c /svx
parent5ea5c5a53815a8157adc19f5aedbfddab02dc6c2 (diff)
fdo#37403: Adding proper assignment operator to SdrRectObj
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/svdorect.hxx2
-rw-r--r--svx/source/svdraw/svdorect.cxx13
2 files changed, 15 insertions, 0 deletions
diff --git a/svx/inc/svx/svdorect.hxx b/svx/inc/svx/svdorect.hxx
index 2e9f938e330d..cb99a3d5775c 100644
--- a/svx/inc/svx/svdorect.hxx
+++ b/svx/inc/svx/svdorect.hxx
@@ -81,6 +81,8 @@ public:
SdrRectObj();
SdrRectObj(const Rectangle& rRect);
+ SdrRectObj& operator=(const SdrRectObj& rCopy);
+
// Konstruktion eines Textrahmens
SdrRectObj(SdrObjKind eNewTextKind);
SdrRectObj(SdrObjKind eNewTextKind, const Rectangle& rRect);
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index 06815740fde4..789622961e2d 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -117,6 +117,19 @@ SdrRectObj::~SdrRectObj()
}
}
+SdrRectObj& SdrRectObj::operator=(const SdrRectObj& rCopy)
+{
+ if ( this == &rCopy )
+ return *this;
+
+ SdrTextObj::operator=( rCopy );
+
+ if ( rCopy.mpXPoly )
+ mpXPoly = new XPolygon( *rCopy.mpXPoly );
+
+ return *this;
+}
+
void SdrRectObj::SetXPolyDirty()
{
if(mpXPoly)