Bug 147884 - Revert deprecation of API service RotationDescriptor
Summary: Revert deprecation of API service RotationDescriptor
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: UNO
  Show dependency treegraph
 
Reported: 2022-03-09 21:59 UTC by Regina Henschel
Modified: 2023-03-17 12:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Document contains macros to rotate a shape (16.53 KB, application/vnd.oasis.opendocument.graphics)
2022-03-09 21:59 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2022-03-09 21:59:30 UTC
Created attachment 178765 [details]
Document contains macros to rotate a shape

Currently the service RotationDescriptor is deprecated with the hint to use the Transformation property instead. But using the Transformationmatrix from the shape is a huge effort, if you only want to rotate a shape around its center.

The attached file contains the macro "impl_zRotation" which uses the deprecated service and the macro "impl_zRotationTransformation" which uses the property Transformation instead. Even if you do not understand the details, you will see how complicated a solution with property Transformation is.

The service RotationDescriptor works fine, only the Description in the API documentation needs to be improved so that it is clear to the user, what he gets.

The problem with property Transformation is, that you do not get the transformed shape, when you apply the Transformation matrix to the shape in unit size. The matrix which you get by property Transformation has a wrong sign in the shear value.

Even if we add a new property for a mathematical correct Transformation matrix (we should do that), rotation around shape center (as done by setting RotateAngle of service RotationDescriptor) is cumbersome. You need to calculate the shape center, apply a translation to origin, rotate, and translate back. That are four matrix multiplication whereas with RotateAngle it is a single assignment.
Comment 1 Mike Kaganski 2022-12-21 13:02:07 UTC
FTR: the deprecation appeared in commit 908f660fae12469cc7f4aa0b31a2f060427a3382.
Comment 2 Buovjaga 2023-03-17 12:49:11 UTC
I'm seeing no objections, so setting to NEW