From d4c7fa84b7856918328bee20a5387cb32442bec3 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Tue, 11 Jan 2011 13:26:59 +0100 Subject: dr78: oox - encapsulate shape property handling in own class ShapePropertyMap --- oox/source/vml/vmlshape.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'oox/source/vml/vmlshape.cxx') diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index d557a7f50354..52b2217b290d 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -36,8 +36,8 @@ #include #include #include "properties.hxx" +#include "oox/drawingml/shapepropertymap.hxx" #include "oox/helper/graphichelper.hxx" -#include "oox/helper/propertymap.hxx" #include "oox/helper/propertyset.hxx" #include "oox/core/xmlfilterbase.hxx" #include "oox/ole/axcontrol.hxx" @@ -313,15 +313,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 ); } // ============================================================================ -- cgit From 7a5084f1acacb0858588d4d0c82651e47ca9914f Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 7 Feb 2011 17:18:11 +0100 Subject: dr78: rework of stream handling, improve handling of very large streams (prevent loading entire stream into array or string, esp. dumper and VML import), full support of XComponentContext --- oox/source/vml/vmlshape.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'oox/source/vml/vmlshape.cxx') diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index d266e054691f..5e1a9a8d3e1d 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -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 -- cgit