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/inc/oox/drawingml/fillproperties.hxx | 55 ++------------------------------ 1 file changed, 2 insertions(+), 53 deletions(-) (limited to 'oox/inc/oox/drawingml/fillproperties.hxx') diff --git a/oox/inc/oox/drawingml/fillproperties.hxx b/oox/inc/oox/drawingml/fillproperties.hxx index d62651ebdc20..9f0271e418e8 100644 --- a/oox/inc/oox/drawingml/fillproperties.hxx +++ b/oox/inc/oox/drawingml/fillproperties.hxx @@ -36,7 +36,6 @@ namespace oox { class GraphicHelper; - class ModelObjectHelper; class PropertyMap; class PropertySet; } @@ -44,38 +43,7 @@ namespace oox { namespace oox { namespace drawingml { -// ============================================================================ - -enum FillPropertyId -{ - FillStyleId, - FillColorId, - FillTransparenceId, - FillGradientId, - FillBitmapUrlId, - FillBitmapModeId, - FillBitmapSizeXId, - FillBitmapSizeYId, - FillBitmapOffsetXId, - FillBitmapOffsetYId, - FillBitmapRectanglePointId, - FillId_END -}; - -struct FillPropertyIds -{ - const sal_Int32* mpnPropertyIds; - bool mbNamedFillGradient; - bool mbNamedFillBitmap; - - explicit FillPropertyIds( - const sal_Int32* pnPropertyIds, - bool bNamedFillGradient, - bool bNamedFillBitmap ); - - inline bool has( FillPropertyId ePropId ) const { return mpnPropertyIds[ ePropId ] >= 0; } - inline sal_Int32 operator[]( FillPropertyId ePropId ) const { return mpnPropertyIds[ ePropId ]; } -}; +class ShapePropertyMap; // ============================================================================ @@ -147,8 +115,6 @@ struct FillProperties PatternFillProperties maPatternProps; /// Properties for pattern fills. BlipFillProperties maBlipProps; /// Properties for bitmap fills. - static FillPropertyIds DEFAULT_IDS; /// Default fill property identifiers for shape fill. - /** Overwrites all members that are explicitly set in rSourceProps. */ void assignUsed( const FillProperties& rSourceProps ); @@ -158,19 +124,8 @@ struct FillProperties /** Writes the properties to the passed property map. */ void pushToPropMap( - PropertyMap& rPropMap, - ModelObjectHelper& rModelObjHelper, + ShapePropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, - const FillPropertyIds& rPropIds = DEFAULT_IDS, - sal_Int32 nShapeRotation = 0, - sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const; - - /** Writes the properties to the passed property set. */ - void pushToPropSet( - PropertySet& rPropSet, - ModelObjectHelper& rModelObjHelper, - const GraphicHelper& rGraphicHelper, - const FillPropertyIds& rPropIds = DEFAULT_IDS, sal_Int32 nShapeRotation = 0, sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const; }; @@ -189,12 +144,6 @@ struct GraphicProperties PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const; - - /** Writes the properties to the passed property set. */ - void pushToPropSet( - PropertySet& rPropSet, - const GraphicHelper& rGraphicHelper, - sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const; }; // ============================================================================ -- cgit v1.2.3