Bug 165261 - FILEOPEN PPTX Text in shape is left-aligned instead of being centered
Summary: FILEOPEN PPTX Text in shape is left-aligned instead of being centered
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
25.2.0.3 release
Hardware: All All
: medium normal
Assignee: Balázs Varga (allotropia)
URL:
Whiteboard: target:25.8.0 target:25.2.2 target:25...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: PPTX-Shapes
  Show dependency treegraph
 
Reported: 2025-02-15 16:46 UTC by Aron Budea
Modified: 2025-02-20 16:00 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample PPTX (31.05 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2025-02-15 16:46 UTC, Aron Budea
Details
Impress vs PowerPoint comparison (78.63 KB, image/png)
2025-02-15 16:47 UTC, Aron Budea
Details
forum-mso-en-11064.pptx: "Click these to see the options" now centered, not right aligned (85.55 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2025-02-18 18:10 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2025-02-15 16:46:36 UTC
Created attachment 199213 [details]
Sample PPTX

The attached PPTX has a triangle shape from slide 4 of attachment 199209 [details] (a PPT from bug 165258) that was copied into a new presentation in PowerPoint, and saved as PPTX.

Open in Impress, and note how the text is left-aligned, compared to PowerPoint's center alignment.
(the colors are also different compared to the original PPT, which is expected, and only due to the theme being the default, it's the same in PowerPoint)

Oberved using LO 25.8.0.0.alpha0+ (60b64338c2a1236cdc98f3834cc77fc3006fc241) / Windows.

This is a regression from the following commit in 25.2. Adding CC: to Balazs Varga.
https://cgit.freedesktop.org/libreoffice/core/commit/?id=1d9ce0a67a71e51569cd33c26270eeece587a354
author		Balazs Varga <balazs.varga.extern@allotropia.de>	2024-10-13 20:58:17 +0200
committer	Gabor Kelemen <gabor.kelemen.extern@allotropia.de>	2024-10-16 20:19:58 +0200

"tdf#162571 - sd: Text box expands or shrinks on left or right or"
Comment 1 Aron Budea 2025-02-15 16:47:25 UTC
Created attachment 199214 [details]
Impress vs PowerPoint comparison
Comment 2 m_a_riosv 2025-02-16 00:35:50 UTC
Reproducible
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b4059c4b9ae2230d9c6d722d457dca2216ddd581
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: en-US (es_ES); UI: en-US
Calc: CL threaded
Comment 3 Justin L 2025-02-18 18:10:38 UTC
Created attachment 199289 [details]
forum-mso-en-11064.pptx: "Click these to see the options" now centered, not right aligned

I'm seeing LOTS of examples where content is shifted when using PowerPoint as the viewer of the round-tripped file. It is often in the footers - master slide, but in this example it is part of the main slide.

In one example, it was "shape properties - Textbox vertical alignment" which was set to Top-Centered (according to Powerpoint). In that case it worked properly when just set to "Top".

In this example that I am providing, it is "Picture properties" and the textbox vertical alignment is blank (an unknown display value I guess), but similarly when set back to "Top" it moves back to the expected place.

Since it bibisects to the same commit, I assume it is the same problem. However it manifests itself very differently, because it is NOT seen in LibreOffice, only in PowerPoint.

It appears to me that the textbox properties optionally override the paragraph alignment properties.
Comment 4 Justin L 2025-02-18 19:25:16 UTC
Also seen only in PowerPoint (I was testing with PP 2010)
- Thomas carte.pptx (attachment 130416 [details] from bug 105329) "It is my birthday"
- tabs.pptx (attachment 129920 [details] from bug 104909)
- R-L.pptx (attachment 114856 [details] from bug 90673)
Comment 5 Commit Notification 2025-02-18 21:21:51 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

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

tdf#165261 - PPTX import: fix text in shape is left-aligned

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 6 Commit Notification 2025-02-19 10:49:23 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/837e2cd1c0d79299f470f747b3216c662584b1d2

tdf#165261 - PPTX import: fix text in shape is left-aligned

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.
Comment 7 Gerald Pfeifer 2025-02-19 14:07:30 UTC
Fixed in last nights snapshot:

  Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
  Build ID: f9b9bf030618f66eccf9168413f1935ac521f161
  CPU threads: 12; OS: Linux 6.13; UI render: default; VCL: gtk3
  Locale: en-US (en_US.UTF-8); UI: en-US

And, to make sure, broken in one from eight days ago I still had:

  Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
  Build ID: e2c08c31cf29e53ffc22f18424f108302728cd21
  CPU threads: 12; OS: Linux 6.13; UI render: default; VCL: gtk3
  Locale: en-US (en_US.UTF-8); UI: en-US

Which means, happy to VERIFY. :-)
Comment 8 Gerald Pfeifer 2025-02-19 14:09:14 UTC
Shout out to Balázs: Thank you for including those regression tests!
Comment 9 Justin L 2025-02-19 15:09:14 UTC
It turns out that my comment 3 problems are not a duplicate of OPs issue, so I have opened a new ticket as bug 165336.
Comment 10 Commit Notification 2025-02-20 16:00:49 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-25-2-1":

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

tdf#165261 - PPTX import: fix text in shape is left-aligned

It will be available in 25.2.1.

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.