summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-10-06 17:19:28 +0200
committerJulien Nabet <serval2412@yahoo.fr>2023-10-06 20:04:01 +0200
commitf1aa554cd0b471e0c9424ece7ab3d9b3d7723a1d (patch)
tree10e17b13e8ae2eb9fccf4736796e279be18abf2c
parent835dc57c205b84f16484184434a903291f4b6eee (diff)
tdf#157532: deal "ProjectionMode" for extruded custom shapes via BASIC macro
I took example on SdrTextAniDirectionItem::PutValue from svx/source/svdraw/svdattr.cxx Change-Id: I9165b9a310ff6bee287e7fb817502c0c99f0747b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157654 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index 468a1c66fa93..e543f490ca8a 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -332,8 +332,17 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
drawing::ProjectionMode eProjectionMode( drawing::ProjectionMode_PARALLEL );
const Any* pAny = rGeometryItem.GetPropertyValueByName( "Extrusion", "ProjectionMode" );
- if ( pAny )
- *pAny >>= eProjectionMode;
+ if (pAny)
+ {
+ if(!(*pAny >>= eProjectionMode))
+ {
+ sal_Int32 nEnum = 0;
+ if(*pAny >>= nEnum)
+ {
+ eProjectionMode = static_cast<drawing::ProjectionMode>(nEnum);
+ }
+ }
+ }
// pShape2d Convert in scenes which include 3D Objects
E3dDefaultAttributes a3DDefaultAttr;
a3DDefaultAttr.SetDefaultLatheCharacterMode( true );