svx/source/customshapes/EnhancedCustomShape3d.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
New commits: commit cc81d424a29dd4b421bc1775faaa51c58195fadc Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Fri Oct 6 17:29:54 2023 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Sat Oct 7 09:57:31 2023 +0200 Related tdf#157532: deal "ShadeMode" for extruded custom shapes via BASIC macro Change-Id: I9ff65f58d48c2b61819533f62c42e2ab07ad4fb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157655 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index e543f490ca8a..a401246277cc 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -141,7 +141,16 @@ drawing::ShadeMode GetShadeMode( const SdrCustomShapeGeometryItem& rItem, const drawing::ShadeMode eRet( eDefault ); const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", "ShadeMode" ); if ( pAny ) - *pAny >>= eRet; + { + if (!(*pAny >>= eRet)) + { + sal_Int32 nEnum = 0; + if(*pAny >>= nEnum) + { + eRet = static_cast<drawing::ShadeMode>(nEnum); + } + } + } return eRet; }