[Libreoffice-commits] .: oox/source

Radek Doulík rodo at kemper.freedesktop.org
Tue Apr 19 02:19:52 PDT 2011


 oox/source/drawingml/shape.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f06c1927f2074f24fafa66df638663e49990ce28
Author: Radek Doulik <rodo at novell.com>
Date:   Tue Apr 19 10:19:19 2011 +0200

    clean a bit the patch for fdo#36203, reset the text body pointer
    
     - it also fixes n#593611

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 1864125..601cb36 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -198,7 +198,10 @@ void Shape::addShape(
 
 void Shape::applyShapeReference( const Shape& rReferencedShape )
 {
-    mpTextBody = TextBodyPtr( rReferencedShape.mpTextBody.get() ? new TextBody( *rReferencedShape.mpTextBody.get() ) : new TextBody() );
+    if ( rReferencedShape.mpTextBody.get() )
+        mpTextBody = TextBodyPtr( new TextBody( *rReferencedShape.mpTextBody.get() ) );
+    else
+        mpTextBody.reset();
     maShapeProperties = rReferencedShape.maShapeProperties;
     mpLinePropertiesPtr = LinePropertiesPtr( new LineProperties( *rReferencedShape.mpLinePropertiesPtr.get() ) );
     mpFillPropertiesPtr = FillPropertiesPtr( new FillProperties( *rReferencedShape.mpFillPropertiesPtr.get() ) );


More information about the Libreoffice-commits mailing list