diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-07 15:40:57 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-05-07 23:07:45 +0200 |
commit | a640676e06bdab3471f5c9f04dd9403bc66ddc22 (patch) | |
tree | 9b85d9b3a2edeb84f689b193e186daed56423183 /oox | |
parent | dcd1795c4934e66378d4b88c914f8e9bb1678ba7 (diff) |
tdf#101181: store glow radius in 100ths of mm instead of EMUs
... as we do for all metric values. This fixes storing values like
"190.5cm" in ODF for 15 pt (should be "0.529cm").
Change-Id: I382756af56464424dcb24ed8801d0a4203658c11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93640
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/shape.cxx | 2 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 959f99ecffb4..92629b2419b5 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1470,7 +1470,7 @@ Reference< XShape > const & Shape::createAndInsert( { uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY); propertySet->setPropertyValue("GlowEffect", makeAny(true)); - propertySet->setPropertyValue("GlowEffectRad", makeAny(static_cast<sal_Int32>(aEffectProperties.maGlow.moGlowRad.get()))); + 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 17b56e8e4f91..aebd6901c864 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3635,7 +3635,7 @@ void DrawingML::WriteShapeEffect( const OUString& sName, const Sequence< Propert } else if( rOuterShdwProp.Name == "rad" ) { - sal_Int32 nVal = 0; + sal_Int64 nVal = 0; rOuterShdwProp.Value >>= nVal; aOuterShdwAttrList->add( XML_rad, OString::number( nVal ).getStr() ); } @@ -3846,9 +3846,11 @@ void DrawingML::WriteGlowEffect(const Reference< XPropertySet >& rXPropSet) if(!hasGlow) return; + sal_Int32 nRad = 0; + rXPropSet->getPropertyValue("GlowEffectRad") >>= nRad; Sequence< PropertyValue > aGlowAttribs(1); aGlowAttribs[0].Name = "rad"; - aGlowAttribs[0].Value = rXPropSet->getPropertyValue("GlowEffectRad"); + aGlowAttribs[0].Value <<= oox::drawingml::convertHmmToEmu(nRad); Sequence< PropertyValue > aGlowProps(3); aGlowProps[0].Name = "Attribs"; aGlowProps[0].Value <<= aGlowAttribs; |