summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-06-15 11:05:44 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-06-15 11:11:39 +0200
commite2e45e25a7bab0bc00a9562bf7e66b328d15a6d3 (patch)
tree7702af39437dc1e79f53e3e578d3984b5eb09350
parent10777b37536be16c6d2e167b59e9e31e37ba3517 (diff)
Related: fdo#58819 VML import: shape types not starting with a hashmark are OK
Change-Id: I2a04aeedd6899eb2717b070fa61a21991bc7be8a
-rw-r--r--oox/source/vml/vmlshape.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 92a026e47ada..2dc40c46605c 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