Created attachment 189907 [details] document with macro to force projection mode PERSPECTIVE Open attached document. It contains a macro to change the projection mode to PERSPECTIVE. But the shape stays in projection mode PARALLEL. To run the macro press Alt+F11. Expand the library of the attached document and run "ForcePerspective" macro. The dialog has also an "Edit" button to inspect the macro. I see the same problem in AOO. Thus I have set 'Inherited from OOo'. The problem is described in https://ask.libreoffice.org/t/basic-macro-api-extrusion-perspective/96284/5 The problem is also mentioned in https://forum.openoffice.org/en/forum/viewtopic.php?t=83526
On pc Debian x86-64 with master sources updated today, I could reproduce this. I noticed this part: Thread 1 "soffice.bin" hit Breakpoint 1, EnhancedCustomShape3d::Create3DObject (pShape2d=0x557c2f557360, rSdrObjCustomShape=...) at svx/source/customshapes/EnhancedCustomShape3d.cxx:333 333 drawing::ProjectionMode eProjectionMode( drawing::ProjectionMode_PARALLEL ); (gdb) n 334 const Any* pAny = rGeometryItem.GetPropertyValueByName( "Extrusion", "ProjectionMode" ); (gdb) n 335 if ( pAny ) (gdb) n 336 *pAny >>= eProjectionMode; (gdb) p *pAny $1 = uno::Any("byte": 1 '\001') Also, I noticed there's ProjectionMode defined here: https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/drawing/ProjectionMode.idl?r=5687eba4 27 published enum ProjectionMode 28 { 29 /** the 3D objects are drawn in the parallel projection. 30 */ 31 PARALLEL, 32 /** the 3D objects are drawn in the perspective projection. 33 */ 34 PERSPECTIVE 35 36 }; and "ProjectionType" enum class ProjectionType { Parallel, Perspective }; (see https://opengrok.libreoffice.org/xref/core/include/svx/viewpt3d.hxx?r=ff546a5d&mo=1414&fi=38#38) It seems there's some redundancy here and wonder if we should remove ProjectionType to make this clearer.
I wanted to compare with ShadeMode (see https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/drawing/ShadeMode.idl?r=5687eba4) but it seems we got the same pb.
https://gerrit.libreoffice.org/c/core/+/157654
For ShadeMode: https://gerrit.libreoffice.org/c/core/+/157655
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f1aa554cd0b471e0c9424ece7ab3d9b3d7723a1d tdf#157532: deal "ProjectionMode" for extruded custom shapes via BASIC macro It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Patch for 7.6 waiting for review: https://gerrit.libreoffice.org/c/core/+/157623
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/cc81d424a29dd4b421bc1775faaa51c58195fadc Related tdf#157532: deal "ShadeMode" for extruded custom shapes via BASIC macro It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/03d40c7e9cb377a1aa93a431f8f670f78aa6fe38 Related tdf#157532: deal "ShadeMode" for extruded custom shapes via BASIC macro It will be available in 7.6.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/249751d2bc4c6c6704c00c83a807a3a0c0a31288 tdf#157532: deal "ProjectionMode" for extruded custom shapes via BASIC macro It will be available in 7.6.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.