diff options
author | Radek Doulik <rodo@novell.com> | 2011-10-05 17:29:58 +0200 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2011-10-05 17:42:03 +0200 |
commit | e36f591dfeb89fded172f4770157bc6cb6dc7454 (patch) | |
tree | bc7af62f6a9f81a6d3cda0c0d927f067a12930e1 /oox/inc/oox/drawingml | |
parent | c9f9b6723b40279716b1e34c1441a33e60cceb58 (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/oox/drawingml')
-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; }; } } |