summaryrefslogtreecommitdiff
path: root/oox/source/drawingml
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r--oox/source/drawingml/effectproperties.cxx6
-rw-r--r--oox/source/drawingml/effectproperties.hxx8
-rw-r--r--oox/source/drawingml/effectpropertiescontext.cxx8
-rw-r--r--oox/source/drawingml/shape.cxx9
4 files changed, 28 insertions, 3 deletions
diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx
index dd5fdd0693f9..4d0c7c334ab5 100644
--- a/oox/source/drawingml/effectproperties.cxx
+++ b/oox/source/drawingml/effectproperties.cxx
@@ -22,6 +22,11 @@ void EffectGlowProperties ::assignUsed(const EffectGlowProperties& rSourceProps)
moGlowColor.assignIfUsed( rSourceProps.moGlowColor );
}
+void EffectSoftEdgeProperties::assignUsed(const EffectSoftEdgeProperties& rSourceProps)
+{
+ moRad.assignIfUsed(rSourceProps.moRad);
+}
+
void EffectShadowProperties::assignUsed(const EffectShadowProperties& rSourceProps)
{
moShadowDist.assignIfUsed( rSourceProps.moShadowDist );
@@ -35,6 +40,7 @@ void EffectProperties::assignUsed( const EffectProperties& rSourceProps )
{
maShadow.assignUsed(rSourceProps.maShadow);
maGlow.assignUsed(rSourceProps.maGlow);
+ maSoftEdge.assignUsed(rSourceProps.maSoftEdge);
if (!rSourceProps.m_Effects.empty())
{
m_Effects.clear();
diff --git a/oox/source/drawingml/effectproperties.hxx b/oox/source/drawingml/effectproperties.hxx
index e1e42d485789..2d2b20e2e8e5 100644
--- a/oox/source/drawingml/effectproperties.hxx
+++ b/oox/source/drawingml/effectproperties.hxx
@@ -29,6 +29,13 @@ struct EffectGlowProperties
void assignUsed( const EffectGlowProperties& rSourceProps );
};
+struct EffectSoftEdgeProperties
+{
+ OptValue<sal_Int64> moRad; // size of effect
+
+ void assignUsed(const EffectSoftEdgeProperties& rSourceProps);
+};
+
struct EffectShadowProperties
{
OptValue< sal_Int64 > moShadowDist;
@@ -54,6 +61,7 @@ struct EffectProperties
{
EffectShadowProperties maShadow;
EffectGlowProperties maGlow;
+ EffectSoftEdgeProperties maSoftEdge;
/** Stores all effect properties, including those not supported by core yet */
std::vector<std::unique_ptr<Effect>> m_Effects;
diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx
index 28fdd8ea4fcf..afd00d2dd097 100644
--- a/oox/source/drawingml/effectpropertiescontext.cxx
+++ b/oox/source/drawingml/effectpropertiescontext.cxx
@@ -106,12 +106,14 @@ ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement,
}
case A_TOKEN( softEdge ):
+ {
+ mrEffectProperties.maSoftEdge.moRad = rAttribs.getInteger(XML_rad, 0);
+ return this; // no inner elements
+ }
case A_TOKEN( reflection ):
case A_TOKEN( blur ):
{
- if( nElement == A_TOKEN( softEdge ) )
- mrEffectProperties.m_Effects[nPos]->msName = "softEdge";
- else if( nElement == A_TOKEN( reflection ) )
+ if (nElement == A_TOKEN(reflection))
mrEffectProperties.m_Effects[nPos]->msName = "reflection";
else if( nElement == A_TOKEN( blur ) )
mrEffectProperties.m_Effects[nPos]->msName = "blur";
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 92629b2419b5..92e145fbe1da 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1474,6 +1474,15 @@ Reference< XShape > const & Shape::createAndInsert(
propertySet->setPropertyValue("GlowEffectColor", makeAny(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper)));
propertySet->setPropertyValue("GlowEffectTransparency", makeAny(aEffectProperties.maGlow.moGlowColor.getTransparency()));
}
+
+ // Set soft edge effect properties
+ if (aEffectProperties.maSoftEdge.moRad.has())
+ {
+ uno::Reference<beans::XPropertySet> propertySet(mxShape, uno::UNO_QUERY);
+ propertySet->setPropertyValue("SoftEdge", makeAny(true));
+ propertySet->setPropertyValue(
+ "SoftEdgeRad", makeAny(convertEmuToHmm(aEffectProperties.maSoftEdge.moRad.get())));
+ }
}
if( mxShape.is() )