Bug 126060 - PPTX: FILEOPEN: Vertical text shown horizontally
Summary: PPTX: FILEOPEN: Vertical text shown horizontally
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.2.4.2 release
Hardware: All All
: medium enhancement
Assignee: Gülşah Köse
URL:
Whiteboard: target:6.4.0 target:6.3.4
Keywords: filter:pptx
Depends on:
Blocks:
 
Reported: 2019-06-23 23:17 UTC by Gerald Pfeifer
Modified: 2019-12-03 14:36 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple sample slide (PPTX) (2.65 MB, application/vnd.ms-powerpoint)
2019-06-23 23:17 UTC, Gerald Pfeifer
Details
How it should look (e.g., Office 365) (36.77 KB, image/png)
2019-06-23 23:18 UTC, Gerald Pfeifer
Details
How it actually looks (LibreOffice 6.2.4.2) (34.59 KB, image/png)
2019-06-23 23:19 UTC, Gerald Pfeifer
Details
File Text3DzRotation.pptx shows difference between ordinary rotation and 3D rotation (281.64 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-10-10 14:38 UTC, Regina Henschel
Details
Simple sample slide plus screenshots (2.75 MB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-10-10 16:14 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2019-06-23 23:17:15 UTC
Description:
Opening the sample PPTX document, there is text that appears vertically
in Office 365 (and originally Microsoft Office from what I've been told),
alas horizontally in LibreOffice.

Steps to Reproduce:
1. Open sample document.
2. Watch for text "vertical it should be!" on the slide
3. Notice how it renders incorrectly.

Actual Results:
Text renders horizontally.

Expected Results:
Text renders vertically.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.2.4.2.0+
Build ID: 20(Build:2)
CPU threads: 4; OS: Linux 5.1; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Gerald Pfeifer 2019-06-23 23:17:50 UTC
Created attachment 152363 [details]
Simple sample slide (PPTX)
Comment 2 Gerald Pfeifer 2019-06-23 23:18:25 UTC
Created attachment 152364 [details]
How it should look (e.g., Office 365)
Comment 3 Gerald Pfeifer 2019-06-23 23:19:05 UTC
Created attachment 152365 [details]
How it actually looks (LibreOffice 6.2.4.2)
Comment 4 Regina Henschel 2019-06-24 17:26:09 UTC
The rotation is done as 3D-effect. LibreOffice is currently not able to show these effects. It stores it only, so that it can be written back on saving.

Workaround: Use an ordinary shape rotation instead.

So for me it is an enhancement request.
Comment 5 Gerald Pfeifer 2019-09-11 11:14:29 UTC
(In reply to Regina Henschel from comment #4)
> Workaround: Use an ordinary shape rotation instead.

Unfortunately this is about documents I receive, and it's not really
possible to ask the sender to redo their presentation (and they probably
would not even think they did something special).
Comment 6 Regina Henschel 2019-10-10 14:38:18 UTC
Created attachment 154903 [details]
File Text3DzRotation.pptx shows difference between ordinary rotation and 3D rotation

@Gülşah Köse: 3D z-rotation is really complex. The attached file compares a 3D z-rotation with the ordinary text rotation. The problem is, that the ordinary text rotation uses the 'text area' and the 3D z-rotation uses the text bounding box. The difference becomes visible, if you use asymmetric insets.

I don't know, how that can be considered in the text decomposition.

The attached file contains screenshots of the rendering in PowerPoint in addition to the drawing objects for the case that you have no access to PowerPoint.
Comment 7 Gülşah Köse 2019-10-10 15:10:14 UTC
(In reply to Regina Henschel from comment #6)

> 
> The problem is, that the
> ordinary text rotation uses the 'text area' and the 3D z-rotation uses the
> text bounding box.

When i open that bug's sample file on Powerpoint i see
*a textbox (x position is negative, a little out of the slide page)
*a text inside the textbox (overflows right side not bottom)
*it has a 3D rotation value

And it looks that 3D rotation uses the text center not text bounding box. If it use the textbox as a rotation center we should see the test out of the slide.

So are you sure about comment you've wrote below?
Comment 8 Regina Henschel 2019-10-10 16:03:58 UTC
Slide 1 has the unrotated text. The green dashed rectangle shows the text area (<rect> element in OOXML, draw:text-areas in ODF, and TextFrames in API/core). It has a right inset of 3cm. The blue dashed rectangle is the bounding box of the text.
Slide 2 has the text rotated by the "rot" attribute of <bodyPr>. That corresponds to the draw:text-rotate-angle in ODF and TextRotateAngle in API/core. The solid green rectangle is the dashed green rectangle rotated around its center. The solid blue rectangle is the dashed blue rectangle rotated around its center. You can see, that the rotated text is inside the green rectangle. The "rot" rotation uses the text area, not the bounding box.
Slide 3 is the screenshot of slide 2.
Slide 4 has the text rotated by the 3D z-Rotation. There you can see, that the text is inside the blue rectangle. That means, that it has used the bounding box of the text.
Slide 5 is the screenshot of slide 4.
Slide 6 is unrotated text. This time the text is so large, that it does not fit in the area and overflows in bottom direction. The red dashed rectangle is the bounding box of this text.
Slide 7 has the text rotated by the 3D z-Rotation. The solid red rectangle is the dashed red rectangle rotated around its center. You can see again, that the rotated text is inside the red rectangle. That means, the bounding box of the text was used.
Slide 8 is the screenshot of slide 7.

I have used PowerPoint from MS Office 365, Version 1909, Build 120.26.20264.
Comment 9 Gülşah Köse 2019-10-10 16:12:35 UTC
 I am talking about "Simple sample slide (PPTX)" at the attachment of that bug(tdf#126060)
Comment 10 Regina Henschel 2019-10-10 16:14:11 UTC
Created attachment 154904 [details]
Simple sample slide plus screenshots

I have added screenshots to "Simple sample slide".
The left screenshot is edit mode. The red rectangle is the bounding box of the text. It is rotated by 90° around its center.
The right screenshot is view mode. The same rectangle is placed at the same place. You see, that it contains the text.
Comment 11 Gülşah Köse 2019-10-10 16:23:22 UTC
Your last slide is exactly what i did in my patch. There was just concept confusion about text bound and box. I am detecting the "Text bound" and rotate it for z angle. Patch didn't completed for now. Many thanks for helpfull comments. I am considering all of them.
Comment 12 Regina Henschel 2019-10-10 17:28:44 UTC
(In reply to Gülşah Köse from comment #11)
> Many thanks for
> helpfull comments. I am considering all of them.

Oh, not 'all'. Sometimes I'm totally wrong, as you can see at my own patches. But take them as 'Are you sure?' hints.

Please ask me, if you need more test documents. For example a document with 3D z-rotation combined with shape rotation would be needed too. And make sure your solution does not only work with the special value 90°.
Comment 13 Commit Notification 2019-10-16 08:44:57 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c50e44b270bc3048ff9c1a000c3afed1dab9e0bf

tdf#126060 Handle text camera z rotation while pptx import.

It will be available in 6.4.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.
Comment 14 Regina Henschel 2019-10-17 13:02:12 UTC
You have preferred to push it without addressing my concerns. So I have now written new bug reports with examples, what still goes wrong with z-rotation of text: bug 128206, bug 128212, bug 128213
Comment 15 Commit Notification 2019-10-30 08:43:10 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/96d3c1ad905e4c694df4dccba51079b8f0a54d32

tdf#126060 Handle text camera z rotation while pptx import.

It will be available in 6.3.4.

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.
Comment 16 Xisco Faulí 2019-12-03 10:48:55 UTC
A polite ping to Gülşah Köse:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Thanks