Bug 140993 - Description wrong for RotateAngle in service EnhancedCustomShapeExtrusion
Summary: Description wrong for RotateAngle in service EnhancedCustomShapeExtrusion
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL: https://api.libreoffice.org/docs/idl/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-12 22:06 UTC by Regina Henschel
Modified: 2023-01-18 11:03 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Document for testing rotation angles. (15.32 KB, application/vnd.oasis.opendocument.presentation)
2021-03-12 22:06 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
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.