Bug 140993

Summary: Description wrong for RotateAngle in service EnhancedCustomShapeExtrusion
Product: LibreOffice Reporter: Regina Henschel <rb.henschel>
Component: sdkAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal    
Priority: medium    
Version: 7.2.0.0.alpha0+   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
URL: https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1drawing_1_1EnhancedCustomShapeExtrusion.html#aae0ca020131b3f0a18d17dc81bb5278e
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=147884
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: Document for testing rotation angles.

Description Regina Henschel 2021-03-12 22:06:22 UTC
Created attachment 170448 [details]
Document for testing rotation angles.

The current text is:
RotateAngle
::com::sun::star::drawing::EnhancedCustomShapeParameterPair RotateAngle
	optional property

This attributes specifies the rotation angle about the x-axis in grad.

The order of rotation is: z-axis, y-axis and then x-axis. The z-axis is specified by the draw:rotate-angle.


Errors:
A) The Attribute is a pair of parameters and determines the angle for rotation about x-axis and about y-axis.
B) The unit is 'degree' not 'grad'. For 'grad' see https://en.wikipedia.org/wiki/Gradian
C) 'draw:rotate-angle' does not exist.
D) Inside the API, an API attribute should be referenced for the rotation about the z-axis, no ODF XML.

Proposed text:
This attribute specifies rotation angles. The first parameter specifies the rotation angle about the x-axis in degree. The second parameter specifies the rotation angle about the y-axis in degree. Rotation about the z-axis is specified via Transformation attribute of service Shape.
The order of rotation is z-axis, y-axis and then x-axis.

Remark:
There exists in addition the attribute RotateAngle of service RotationDescriptor for the rotation about the z-axis with unit 1/100 degree. But that is deprecated. Perhaps add it nevertheless, because the usage is easier? The angle for the rotation about the z-axis is not directly given in the transformation matrix, but you need to decompose the matrix.


I have attached a document with macro, so that you can examine an object which has extrusion.
Tools > Macros > Edit Macros
Go to macro examineShape_inDraw and set a break point at 'dummy=1'. Back to document.
Select object, press Alt+F11 and run macro examineShape_inDraw.
Go to Basic IDE and look at oShape in Watch-window.

Rotations about x- and y-axis are in toolbar "3D-Settings". Rotation about z-axis is in Position&Size dialog.
Comment 1 Regina Henschel 2023-01-18 11:03:00 UTC
The request for reverting deprecation of RotateAngle is in bug 147884. It should be considered when making a new text.