diff options
author | Radek Doulik <rodo@novell.com> | 2011-10-05 17:29:58 +0200 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2011-10-06 13:45:29 +0200 |
commit | d05649c43b41c20a15677982e0942be8ac796753 (patch) | |
tree | 56c805a0767f4dafd0b72f2cb77353891b664f0b /oox/inc | |
parent | 27bd8bf30bfaf5c8d7c3403e5d6adfc04ccc009c (diff) |
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
Diffstat (limited to 'oox/inc')
-rw-r--r-- | oox/inc/oox/drawingml/customshapeproperties.hxx | 17 |
1 files changed, 14 insertions, 3 deletions
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 <boost/shared_ptr.hpp> +#include <boost/unordered_map.hpp> #include <vector> #include <map> #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> @@ -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; }; } } |