summaryrefslogtreecommitdiff
path: root/oox/source/vml/vmlshape.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/vml/vmlshape.cxx')
-rw-r--r--oox/source/vml/vmlshape.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index db12f3d91e0b..5e1a9a8d3e1d 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -36,9 +36,9 @@
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
#include "oox/core/xmlfilterbase.hxx"
+#include "oox/drawingml/shapepropertymap.hxx"
#include "oox/helper/containerhelper.hxx"
#include "oox/helper/graphichelper.hxx"
-#include "oox/helper/propertymap.hxx"
#include "oox/helper/propertyset.hxx"
#include "oox/ole/axcontrol.hxx"
#include "oox/ole/axcontrolfragment.hxx"
@@ -274,9 +274,10 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS
xShape = implConvertAndInsert( rxShapes, aShapeRect );
if( xShape.is() )
{
- // set shape name (imported or generated)
+ // set imported or generated shape name (not supported by form controls)
PropertySet aShapeProp( xShape );
- aShapeProp.setProperty( PROP_Name, getShapeName() );
+ if( aShapeProp.hasProperty( PROP_Name ) )
+ aShapeProp.setProperty( PROP_Name, getShapeName() );
/* Notify the drawing that a new shape has been inserted. For
convenience, pass the rectangle that contains position and
@@ -322,15 +323,11 @@ Rectangle ShapeBase::calcShapeRectangle( const ShapeParentAnchor* pParentAnchor
void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) const
{
- ModelObjectHelper& rModelObjectHelper = mrDrawing.getFilter().getModelObjectHelper();
+ ::oox::drawingml::ShapePropertyMap aPropMap( mrDrawing.getFilter().getModelObjectHelper() );
const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
-
- PropertyMap aPropMap;
- maTypeModel.maStrokeModel.pushToPropMap( aPropMap, rModelObjectHelper, rGraphicHelper );
- maTypeModel.maFillModel.pushToPropMap( aPropMap, rModelObjectHelper, rGraphicHelper );
-
- PropertySet aPropSet( rxShape );
- aPropSet.setProperties( aPropMap );
+ maTypeModel.maStrokeModel.pushToPropMap( aPropMap, rGraphicHelper );
+ maTypeModel.maFillModel.pushToPropMap( aPropMap, rGraphicHelper );
+ PropertySet( rxShape ).setProperties( aPropMap );
}
// ============================================================================