Bug 165341 - FILEOPEN PPTX: paragraph alignment should be overridden by shape anchorCtr="1" with spAutoFit
Summary: FILEOPEN PPTX: paragraph alignment should be overridden by shape anchorCtr="1...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0 target:25.2.3 target:25...
Keywords: bibisected, bisected, filter:pptx, regression
: 165336 165339 (view as bug list)
Depends on:
Blocks: 165336
  Show dependency treegraph
 
Reported: 2025-02-19 18:54 UTC by Justin L
Modified: 2025-03-20 09:25 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
165336_shapeTextAlignC.pptx: example document (30.14 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2025-02-19 18:54 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-02-19 18:54:13 UTC
Created attachment 199330 [details]
165336_shapeTextAlignC.pptx: example document

This is related to bug 165336, because there we had a bug that could only be seen by PowerPoint. That indicates that LO doesn't display the same as MSO. 

So, the example documents in that bug report could also be used.

It looks like the same 25.2 commit that causes bug 165336 is the one that is breaking the layout on file open.
commit 1d9ce0a67a71e51569cd33c26270eeece587a354
Author: Balazs Varga on Sun Oct 13 20:58:17 2024 +0200
    tdf#162571 - sd: Text box expands or shrinks on left or right or
    both sides, depending on the text alignment. Set the text anchor
    position based on the first paragraph alignment.

These documents have NOT been fixed by bug 165261's
commit 837e2cd1c0d79299f470f747b3216c662584b1d2
    tdf#165261 - PPTX import: fix text in shape is left-aligned
did NOT fix forum-mso-en-11064.pptx, R-L.pptx, or tabs.pptx,

I tried to create my own example to try to find out what makes these documents special, but I didn't succeed.

Found by Collabora/s mso-test
Comment 1 Justin L 2025-02-21 13:39:01 UTC
confirmed that the issue is still seen on master.
Comment 2 Gabor Kelemen (allotropia) 2025-03-04 22:38:06 UTC
Text Anchor setting of the top textbox changed from (H) center, (V) top to (H) Right (V) top.

Bottom textbox is wrong for a different reason (should be rotated 90 degrees right in layout, but Impress does not have a layout with rotated textbox).
Comment 3 Commit Notification 2025-03-07 22:50:56 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/37a99eb4d3489206d9385b9c065c5bb541c17b32

tdf#165341 - FILEOPEN PPTX: fix paragraph alignment for text wrapped shapes

It will be available in 25.8.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 4 Balázs Varga (allotropia) 2025-03-09 18:06:08 UTC
*** Bug 165336 has been marked as a duplicate of this bug. ***
Comment 5 Balázs Varga (allotropia) 2025-03-09 18:07:05 UTC
*** Bug 165339 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2025-03-10 09:02:00 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/7f6eae5eb75a3993cba47608e7f02f9e4ee24a75

tdf#165341 - FILEOPEN PPTX: fix paragraph alignment for text wrapped shapes

It will be available in 25.2.3.

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 7 Justin L 2025-03-10 14:32:43 UTC
Verified. I made "broken" round-tripped versions of R-L.pptx and tabs.pptx, and this time LO noticed that they were broken.
Comment 8 Commit Notification 2025-03-20 09:25:18 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-25-2-2":

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

tdf#165341 - FILEOPEN PPTX: fix paragraph alignment for text wrapped shapes

It will be available in 25.2.2.

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.