Bug 127437 - FILEOPEN PPTX Rotated text in shape is imported wrongly
Summary: FILEOPEN PPTX Rotated text in shape is imported wrongly
Status: RESOLVED DUPLICATE of bug 149551
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.4.7.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pptx
: 127439 (view as bug list)
Depends on:
Blocks: PPTX-Textbox
  Show dependency treegraph
 
Reported: 2019-09-08 10:17 UTC by Regina Henschel
Modified: 2023-01-26 13:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
TextBoxRotation.pptx demonstrates the error (46.80 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-09-08 10:17 UTC, Regina Henschel
Details
AnalyseError.odt contains the mathematical reason of the error (80.79 KB, application/vnd.oasis.opendocument.text)
2019-10-02 10:47 UTC, Regina Henschel
Details
Comparison MSO 2010 and LibreOffice 7.0 master (171.64 KB, image/png)
2020-05-11 11:05 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2019-09-08 10:17:23 UTC
Created attachment 154013 [details]
TextBoxRotation.pptx demonstrates the error

Open attached document. It contains an arrow with text at the left and a screenshot from PowerPoint365 on the right. The text is rotated with 20 degree by the attribute "rot" of the bodyPr element. The blue dashed rectangle illustrates the unrotated text area, the green rectangle the rotated text area.

Error: The text is sheared.
Comment 1 Regina Henschel 2019-10-01 22:08:08 UTC
The rotation angle is put into TextPreRotateAngle. That results in a matrix-multiplication order scale-matrix * rotation-matrix in ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence().
The decompose algorithm in B2DHomMatrix::decompose uses the column-vectors to detect shear. With this multiplication order the column-vectors are not orthogonal, and thus results in a shear angle.

If the rotation angle is put into TextRotateAngle, then the matrix-multiplication order is rotation-matrix * scale-matrix. Then the column-vectors are orthogonal and shear angle is zero.
Comment 2 Regina Henschel 2019-10-02 07:41:48 UTC
*** Bug 127439 has been marked as a duplicate of this bug. ***
Comment 3 Regina Henschel 2019-10-02 10:47:17 UTC
Created attachment 154695 [details]
AnalyseError.odt contains the mathematical reason of the error
Comment 4 Xisco Faulí 2020-05-11 11:05:16 UTC
Created attachment 160657 [details]
Comparison MSO 2010 and LibreOffice 7.0 master
Comment 5 QA Administrators 2023-01-26 03:23:42 UTC Comment hidden (obsolete)
Comment 6 Regina Henschel 2023-01-26 12:50:38 UTC
The error is fixed in Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f1830bff71847a9c17715cff52383956719847fe
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL threaded
Comment 7 Xisco Faulí 2023-01-26 13:14:17 UTC
Issue fixed by https://cgit.freedesktop.org/libreoffice/core/commit/?id=7e23cbdbb6ec0247a29ed8a8f744c01e10963ea0

Closing as DUPLICATED of bug 149551

*** This bug has been marked as a duplicate of bug 149551 ***