[Libreoffice-commits] core.git: oox/source

Miklos Vajna vmiklos at suse.cz
Sat Jun 15 02:10:02 PDT 2013


 oox/source/vml/vmlshape.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit e2e45e25a7bab0bc00a9562bf7e66b328d15a6d3
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Sat Jun 15 11:05:44 2013 +0200

    Related: fdo#58819 VML import: shape types not starting with a hashmark are OK
    
    Change-Id: I2a04aeedd6899eb2717b070fa61a21991bc7be8a

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 92a026e..2dc40c4 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -263,10 +263,14 @@ ShapeBase::ShapeBase( Drawing& rDrawing ) :
 
 void ShapeBase::finalizeFragmentImport()
 {
-    // resolve shape template reference
-    if( (maShapeModel.maType.getLength() > 1) && (maShapeModel.maType[ 0 ] == '#') )
-        if( const ShapeType* pShapeType = mrDrawing.getShapes().getShapeTypeById( maShapeModel.maType.copy( 1 ), true ) )
+    if( maShapeModel.maType.getLength() > 1 )
+    {
+        OUString aType = maShapeModel.maType;
+        if (aType[ 0 ] == '#')
+            aType = aType.copy(1);
+        if( const ShapeType* pShapeType = mrDrawing.getShapes().getShapeTypeById( aType, true ) )
             maTypeModel.assignUsed( pShapeType->getTypeModel() );
+    }
 }
 
 OUString ShapeBase::getShapeName() const


More information about the Libreoffice-commits mailing list