diff options
author | A_GAN <ganzouri97@gmail.com> | 2020-06-22 23:39:16 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-06-29 18:32:57 +0200 |
commit | 2803b09ec024cb0b8cf25ec6fe08412649f40d5e (patch) | |
tree | a548fde334adfec3435a70a189b97698e5d78d13 /oox | |
parent | cb0c7e26e5708010b1fe941ae2f66134f31ed876 (diff) |
OOXML/ODF Support for Shadow blur radius
Adding export support for OOXML. Adding import/export support for ODF
Changing some values in test cases as convertEMUtoHmm round the fraction.
Add two test functions for OOXML and ODF export.
Change-Id: Ie5d862b46b5264ead4954f407fee2837b5151cd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96907
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 607db7a33ae7..a5a44cc3e7fe 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3618,7 +3618,7 @@ void DrawingML::WriteShapeEffect( const OUString& sName, const Sequence< Propert } else if( rOuterShdwProp.Name == "blurRad" ) { - sal_Int32 nVal = 0; + sal_Int64 nVal = 0; rOuterShdwProp.Value >>= nVal; aOuterShdwAttrList->add( XML_blurRad, OString::number( nVal ).getStr() ); } @@ -3802,16 +3802,20 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet ) if( bHasShadow ) { Sequence< PropertyValue > aShadowGrabBag( 3 ); - Sequence< PropertyValue > aShadowAttribsGrabBag( 2 ); + Sequence< PropertyValue > aShadowAttribsGrabBag( 3 ); double dX = +0.0, dY = +0.0; + sal_Int32 nBlur =0; rXPropSet->getPropertyValue( "ShadowXDistance" ) >>= dX; rXPropSet->getPropertyValue( "ShadowYDistance" ) >>= dY; + rXPropSet->getPropertyValue( "ShadowBlur" ) >>= nBlur; aShadowAttribsGrabBag[0].Name = "dist"; aShadowAttribsGrabBag[0].Value <<= lcl_CalculateDist(dX, dY); aShadowAttribsGrabBag[1].Name = "dir"; aShadowAttribsGrabBag[1].Value <<= lcl_CalculateDir(dX, dY); + aShadowAttribsGrabBag[2].Name = "blurRad"; + aShadowAttribsGrabBag[2].Value <<= oox::drawingml::convertHmmToEmu(nBlur); aShadowGrabBag[0].Name = "Attribs"; aShadowGrabBag[0].Value <<= aShadowAttribsGrabBag; @@ -3836,8 +3840,11 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet ) rOuterShdwProp.Value >>= aAttribsProps; double dX = +0.0, dY = +0.0; + sal_Int32 nBlur =0; rXPropSet->getPropertyValue( "ShadowXDistance" ) >>= dX; rXPropSet->getPropertyValue( "ShadowYDistance" ) >>= dY; + rXPropSet->getPropertyValue( "ShadowBlur" ) >>= nBlur; + for( auto& rAttribsProp : aAttribsProps ) { @@ -3849,6 +3856,10 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet ) { rAttribsProp.Value <<= lcl_CalculateDir(dX, dY); } + else if( rAttribsProp.Name == "blurRad" ) + { + rAttribsProp.Value <<= oox::drawingml::convertHmmToEmu(nBlur); + } } rOuterShdwProp.Value <<= aAttribsProps; |