From 71b4af858ea698f9c3fcffdfc61e3f70a7b10f63 Mon Sep 17 00:00:00 2001 From: Jacobo Aragunde Pérez Date: Tue, 22 Apr 2014 20:30:24 +0200 Subject: ooxml: Preserve outer shadow effect on shapes. The goal is preserving the shadow effect with all its attributes using the shape grab bag. This is the relevant piece of XML in the document: In first place, we added members to the structure EffectProperties to store the effect name and attributes. Later, when we create the shape, we add them to the shape grab bag together with the shadow color (if it is a theme color we store its name and transformations like in other cases). Finally, we read back all these data from the shape grab bag and write them back to the document. I added a unit test for this shape property. Change-Id: Idda2d5e2970cb8563e2ed13a84b2fa2d4b99aa70 --- include/oox/drawingml/effectproperties.hxx | 7 +++++++ include/oox/export/drawingml.hxx | 1 + 2 files changed, 8 insertions(+) (limited to 'include/oox') diff --git a/include/oox/drawingml/effectproperties.hxx b/include/oox/drawingml/effectproperties.hxx index 83519c0221a7..618c7b90fe38 100644 --- a/include/oox/drawingml/effectproperties.hxx +++ b/include/oox/drawingml/effectproperties.hxx @@ -34,6 +34,10 @@ struct OOX_DLLPUBLIC EffectProperties { EffectShadowProperties maShadow; + /** Store unsupported effect type name and its attributes */ + OptValue< OUString > msUnsupportedEffectName; + std::vector< css::beans::PropertyValue > maUnsupportedEffectAttribs; + /** Overwrites all members that are explicitly set in rSourceProps. */ void assignUsed( const EffectProperties& rSourceProps ); @@ -41,6 +45,9 @@ struct OOX_DLLPUBLIC EffectProperties void pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper ) const; + + void appendUnsupportedEffectAttrib( const OUString& aKey, const css::uno::Any& aValue ); + css::beans::PropertyValue getUnsupportedEffect(); }; diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index 3efcf93bbcb6..7793e6bff2a3 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -173,6 +173,7 @@ public: void WritePolyPolygon( const PolyPolygon& rPolyPolygon ); void WriteFill( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropSet ); void WriteShapeStyle( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet ); + void WriteShapeEffects( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet ); static void ResetCounters(); -- cgit