Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Tuesday 16 of August 2011, cbosdonnat wrote:
Caolán McNamara wrote:
On Thu, 2011-08-11 at 15:36 +0200, Cedric Bosdonnat wrote:
Indeed that remembers me of a discussion like that with Lubos... though I'm
not good enough in C++ to see those subtleties. I reverted the above
mentioned patch and replaced it by

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c3852d41a419331277d
0b98b02792f0bbf704d5b

+SdrRectObj& SdrRectObj::operator=(const SdrRectObj& rCopy)
+{
+    if ( this == &rCopy )
+        return *this;
+
+    SdrTextObj::operator=( rCopy );
+
+    if ( rCopy.mpXPoly )
+        mpXPoly = new XPolygon( *rCopy.mpXPoly );

 This is not completely correct. This is not copy ctor, so mpXPoly does not 
have any default value, but instead whatever was there before the assignment. 
You need to handle the else case as well.

 If this is fixed, you have my ACK.

+
+    return *this;
+}


All is now working fine, and that later commit could be applied to 3.4
safely.
-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.