[Libreoffice] [REVIEW] Cherry-pick in 3.4.2?

Lubos Lunak l.lunak at suse.cz
Tue Aug 16 06:23:08 PDT 2011


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 at suse.cz


More information about the LibreOffice mailing list