summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-10-06 17:29:54 +0200
committerJulien Nabet <serval2412@yahoo.fr>2023-10-07 09:57:31 +0200
commitcc81d424a29dd4b421bc1775faaa51c58195fadc (patch)
tree95b5f36436ca28ccb08473f531a230aca837906a /svx
parent7d7a34635cd4d7e5d9c3ae123d5adfa071e85da0 (diff)
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 <serval2412@yahoo.fr>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx11
1 files changed, 10 insertions, 1 deletions
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;
}