Bug 148000 - FILEOPEN PPTX: curved text doesn't line break properly and becomes too wide
Summary: FILEOPEN PPTX: curved text doesn't line break properly and becomes too wide
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Attila Szűcs
URL:
Whiteboard: target:7.6.0 target:7.5.1 target:24.2...
Keywords: filter:pptx
Depends on:
Blocks: PPTX-Shapes
  Show dependency treegraph
 
Reported: 2022-03-15 09:50 UTC by Gerald Pfeifer
Modified: 2024-02-20 06:50 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample slide (PPTX) (34.44 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2022-03-15 09:50 UTC, Gerald Pfeifer
Details
Visual comparison LibreOffice (left) vs Office 365 (right) (351.72 KB, image/png)
2022-03-15 09:51 UTC, Gerald Pfeifer
Details
Compare the distribution of the lines (34.34 KB, application/zip)
2022-08-10 17:48 UTC, Regina Henschel
Details
File to reproduce the crash (44.89 KB, application/zip)
2022-08-16 01:03 UTC, Regina Henschel
Details
Convert line feed to paragraph in import filter (849 bytes, patch)
2023-01-19 19:33 UTC, Regina Henschel
Details
effect of Attila's patch (64.21 KB, image/png)
2023-01-20 09:15 UTC, Andras Timar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2022-03-15 09:50:31 UTC
Created attachment 178893 [details]
Sample slide (PPTX)

How to repeat:

 1. Open sample PPTX document in LibreOffice
 2. Compare with rendering in Office 365 and notice how the "Business..."
    text is too wide and how the "Enterprise..." text fails to line break
    and is too wide.

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: be1aab8632ead65d75c0436005d3cac7d43b9f02
CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Comment 1 Gerald Pfeifer 2022-03-15 09:51:14 UTC
Created attachment 178894 [details]
Visual comparison LibreOffice (left) vs Office 365 (right)
Comment 2 Timur 2022-03-15 15:51:33 UTC
I guess this was created, not some SmartArt. Same if ungrouped. 
Never was fine, improved few times, last time in 6.1. New.
Not sure if there's a similar bug, not easy to find.
Comment 3 Regina Henschel 2022-08-10 17:48:39 UTC
Created attachment 181692 [details]
Compare the distribution of the lines

Your proposed patch #3 at https://gerrit.libreoffice.org/c/core/+/136819 doesn't get the distribution of lines correctly.

An existing odp-document, which has soft line breaks (Shift+Return) included in the path text, will look very different in a version with your patch. How does others judge this incompatibility?

I'm not in principle against such change, but if other agree that we should change the behavior for existing documents, then you will need to be explain the change in the release notes.

The "textButton"-shape is one of the shapes, which are available in MS binary formats too. I have not yet tested the behavior in old MS Office. Have you already tested it?
Comment 4 Regina Henschel 2022-08-16 01:03:47 UTC
Created attachment 181794 [details]
File to reproduce the crash

The attached file crashes for me with your patchset 5.

Problem in addition:
The Shift+Enter problem occurs in all types of WordArt. Why restrict it to the four "Follow Path" types?
Comment 5 Regina Henschel 2023-01-19 19:33:30 UTC
Created attachment 184784 [details]
Convert line feed to paragraph in import filter

I still think, this should be done in the import filter and not in Fontwork rendering. That way existing ODF documents will not change.
Comment 6 Commit Notification 2023-01-20 07:56:54 UTC
Attila Szűcs committed a patch related to this issue.
It has been pushed to "master":

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

tdf#148000 impress: Handle linebreaks on fontwork.

It will be available in 7.6.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 7 Andras Timar 2023-01-20 09:15:12 UTC
Created attachment 184790 [details]
effect of Attila's patch

Before / After screenshot to demonstrate the effect of Attila's patch.
Comment 8 Commit Notification 2023-01-23 12:47:31 UTC
Attila Szűcs committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/497298874961fb335caf4cc91e531667394588bc

tdf#148000 impress: Handle linebreaks on fontwork.

It will be available in 7.5.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.
Comment 9 Commit Notification 2023-11-22 10:11:03 UTC
Attila Szűcs committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3a5cc107efb843b01193230c56dc8d9c0072348a

tdf#148000 impress: improve fontwork text placement.

It will be available in 24.2.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 10 Gerald Pfeifer 2023-11-23 13:23:34 UTC
Happy to confirm this as verified with last night's build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9602f8a9318dd4d3409856e2ae06abe96e72b51b
CPU threads: 12; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Comment 11 Commit Notification 2023-11-26 14:08:29 UTC
Attila Szűcs committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/3d7dad88c409fecd3ba4a3f27f8e2e6e2e5f14d7

tdf#148000 impress: improve fontwork text placement.

It will be available in 7.6.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.