summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-16 09:56:58 +0200
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-05-16 14:11:22 +0200
commitbe415a0f9a65d44d1042b313141f49c617bedd93 (patch)
treeb1aa4442f415ffb70d9f419d0c5f69a2d177237f /include
parenta5835285068c1b03171b7953c2fea185111f4da2 (diff)
ooxml: Preserve shape effects when there's more than one
Transformed the preservation process of shape effects to be able to store more than one effect. For that we: * Created the Effect struct and added a vector member to the EffectProperties struct. * Changed the shadow effect to use the new Effect struct, EffectShadowProperties struct is preserved because the direction field still has some use but we should remove it. * Changed the structure of the grab bag to store more than one effect. * Modified an existing unit test to check shapes with several effects. Change-Id: I0dd908fa1d9578827c02ef6272fc9e2b914391be
Diffstat (limited to 'include')
-rw-r--r--include/oox/drawingml/effectproperties.hxx19
-rw-r--r--include/oox/drawingml/effectpropertiescontext.hxx3
-rw-r--r--include/oox/export/drawingml.hxx1
3 files changed, 16 insertions, 7 deletions
diff --git a/include/oox/drawingml/effectproperties.hxx b/include/oox/drawingml/effectproperties.hxx
index 618c7b90fe38..a25aa121fa43 100644
--- a/include/oox/drawingml/effectproperties.hxx
+++ b/include/oox/drawingml/effectproperties.hxx
@@ -30,13 +30,23 @@ struct EffectShadowProperties
+struct Effect
+{
+ OUString msName;
+ std::map< OUString, css::uno::Any > maAttribs;
+ Color moColor;
+
+ css::beans::PropertyValue getEffect();
+};
+
+
+
struct OOX_DLLPUBLIC EffectProperties
{
EffectShadowProperties maShadow;
- /** Store unsupported effect type name and its attributes */
- OptValue< OUString > msUnsupportedEffectName;
- std::vector< css::beans::PropertyValue > maUnsupportedEffectAttribs;
+ /** Stores all effect properties, including those not supported by core yet */
+ std::vector< Effect* > maEffects;
/** Overwrites all members that are explicitly set in rSourceProps. */
void assignUsed( const EffectProperties& rSourceProps );
@@ -45,9 +55,6 @@ 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/drawingml/effectpropertiescontext.hxx b/include/oox/drawingml/effectpropertiescontext.hxx
index f81396d15483..6106254d5bcc 100644
--- a/include/oox/drawingml/effectpropertiescontext.hxx
+++ b/include/oox/drawingml/effectpropertiescontext.hxx
@@ -12,6 +12,7 @@
#include <oox/core/contexthandler2.hxx>
#include <oox/dllapi.h>
+#include <oox/drawingml/effectproperties.hxx>
namespace oox { namespace drawingml {
@@ -33,7 +34,7 @@ protected:
EffectProperties& mrEffectProperties;
private:
- void saveUnsupportedAttribs( const AttributeList& rAttribs );
+ void saveUnsupportedAttribs( Effect& rEffect, const AttributeList& rAttribs );
};
} }
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 9153196a3fef..86e3d0769449 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -174,6 +174,7 @@ public:
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 );
+ void WriteShapeEffect( const OUString& sName, const css::uno::Sequence< css::beans::PropertyValue >& aEffectProps );
void WriteShape3DEffects( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet );
static void ResetCounters();