diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-23 19:54:14 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-24 07:25:07 +0200 |
commit | ebd391767d70903e6a4ea7e213f475af94e183ec (patch) | |
tree | 45528ea8619cf1a6786f8158f8f8d957a1c00223 /oox | |
parent | 0e5e935deb0527c64865cfcc53a0421e56b74b6f (diff) |
tdf#101181: drop useless "GlowEffect" boolean property
Just use GlowEffectRad to indicate effect presense: radius of 0 means
effect is disabled.
Change-Id: Ic06bba34f5a851f120d3d00cb7e20c429ead9ee1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94732
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/shape.cxx | 1 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 16 |
2 files changed, 9 insertions, 8 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index cd7c289e9efa..b7e855058e6a 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1470,7 +1470,6 @@ Reference< XShape > const & Shape::createAndInsert( if ( aEffectProperties.maGlow.moGlowRad.has() ) { uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY); - propertySet->setPropertyValue("GlowEffect", makeAny(true)); propertySet->setPropertyValue("GlowEffectRad", makeAny(convertEmuToHmm(aEffectProperties.maGlow.moGlowRad.get()))); propertySet->setPropertyValue("GlowEffectColor", makeAny(aEffectProperties.maGlow.moGlowColor.getColor(rGraphicHelper))); propertySet->setPropertyValue("GlowEffectTransparency", makeAny(aEffectProperties.maGlow.moGlowColor.getTransparency())); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 63fec0d6d18c..0be37c8748f0 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3756,8 +3756,12 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet ) if( GetProperty( rXPropSet, "Shadow" ) ) mAny >>= bHasShadow; bool bHasEffects = bHasShadow; - if (!bHasEffects && GetProperty(rXPropSet, "GlowEffect")) - mAny >>= bHasEffects; + if (!bHasEffects && GetProperty(rXPropSet, "GlowEffectRad")) + { + sal_Int32 rad = 0; + mAny >>= rad; + bHasEffects = rad > 0; + } if (!bHasEffects && GetProperty(rXPropSet, "SoftEdgeRad")) { sal_Int32 rad = 0; @@ -3867,13 +3871,11 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet ) void DrawingML::WriteGlowEffect(const Reference< XPropertySet >& rXPropSet) { - bool hasGlow = false; - rXPropSet->getPropertyValue("GlowEffect") >>= hasGlow; - if(!hasGlow) - return; - sal_Int32 nRad = 0; rXPropSet->getPropertyValue("GlowEffectRad") >>= nRad; + if (!nRad) + return; + Sequence< PropertyValue > aGlowAttribs(1); aGlowAttribs[0].Name = "rad"; aGlowAttribs[0].Value <<= oox::drawingml::convertHmmToEmu(nRad); |