From d05649c43b41c20a15677982e0942be8ac796753 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 5 Oct 2011 17:29:58 +0200 Subject: custom shapes import improvements - added new presets generated from definition included in ISO standard - added missing variables (cd3, hd10, ...) - added ifelse shortcut ?: - removed GetAdjAngle because it would make problems with constant vs. equation defined angles, move conversion to the functions using them - implemented arcTo path segment (command) - removed GetTextShapeType as we don't use vml's presets for drawingml anymore - use token number for preset type instead of string, as we don't convert to old vml's preset types anymore - enhanced custom shape properties dump code --- oox/inc/oox/drawingml/customshapeproperties.hxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'oox/inc') diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx index 413b2a76357f..47098dd845dd 100644 --- a/oox/inc/oox/drawingml/customshapeproperties.hxx +++ b/oox/inc/oox/drawingml/customshapeproperties.hxx @@ -30,6 +30,7 @@ #define OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX #include +#include #include #include #include @@ -123,8 +124,9 @@ public: const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet, const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > & xShape) const; - const rtl::OUString& getShapePresetType() const { return maShapePresetType; } - void setShapePresetType( const rtl::OUString& rShapePresetType ){ maShapePresetType = rShapePresetType; }; + sal_Int32 getShapePresetType() const { return mnShapePresetType; } + ::rtl::OUString getShapePresetTypeName() const; + void setShapePresetType( sal_Int32 nShapePresetType ){ mnShapePresetType = nShapePresetType; }; std::vector< CustomShapeGuide >& getAdjustmentGuideList(){ return maAdjustmentGuideList; }; std::vector< CustomShapeGuide >& getGuideList(){ return maGuideList; }; @@ -140,9 +142,11 @@ public: static sal_Int32 SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide ); static sal_Int32 GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, const rtl::OUString& rFormulaName ); + sal_Int32 getArcNum() { return mnArcNum++; } + private: - rtl::OUString maShapePresetType; + sal_Int32 mnShapePresetType; std::vector< CustomShapeGuide > maAdjustmentGuideList; std::vector< CustomShapeGuide > maGuideList; std::vector< AdjustHandle > maAdjustHandleList; @@ -154,6 +158,13 @@ private: maSegments; sal_Bool mbMirroredX; sal_Bool mbMirroredY; + + typedef boost::unordered_map< sal_Int32, PropertyMap > PresetsMap; + + static PresetsMap maPresetsMap; + static void initializePresetsMap(); + + sal_Int32 mnArcNum; }; } } -- cgit