Bug 156857 - FILEOPEN PPTX: text boxes (with more text) expand vertically to fit text (when they don't in PowerPoint)
Summary: FILEOPEN PPTX: text boxes (with more text) expand vertically to fit text (whe...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.4 all versions
Hardware: All All
: medium normal
Assignee: Balázs Varga (allotropia)
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: PPTX-Textbox
  Show dependency treegraph
 
Reported: 2023-08-22 10:03 UTC by Gerald Pfeifer
Modified: 2024-08-13 08:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample slide (PPTX) (2.40 MB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2023-08-22 10:03 UTC, Gerald Pfeifer
Details
Visual comparison Impress (left) vs PowerPoint (right) (23.33 KB, image/png)
2023-08-22 10:10 UTC, Gerald Pfeifer
Details
Visual comparison PowerPoint (left) vs Impress (right) (21.35 KB, image/png)
2023-08-23 16:08 UTC, Gerald Pfeifer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2023-08-22 10:03:54 UTC
Created attachment 189092 [details]
Sample slide (PPTX)

1. Open document
2. Observe how the two blue text boxes to the right are taller than
   the other two (when they are not in PowerPoint).

Interestingly in the "Position & Size" dialog, the "Fit height to 
text" attribute is checked and greyed, that is, I cannot deselect it.

(That applies even after I remove the two levels of grouping.)


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

...and all the way back to version 6.4.
Comment 1 Gerald Pfeifer 2023-08-22 10:10:09 UTC
Created attachment 189093 [details]
Visual comparison Impress (left) vs PowerPoint (right)

> Interestingly in the "Position & Size" dialog, the "Fit height to 
> text" attribute is checked and greyed, that is, I cannot deselect it.

I tried to play a bit editing styles and still could not affect that.
Comment 2 MM 2023-08-22 10:17:01 UTC
Unconfirmed on windows 10 x64 with Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Calc: CL threaded

Maybe already fixed in a newer version ?!
Comment 3 Gabor Kelemen (allotropia) 2023-08-22 18:57:38 UTC
Repro in 
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4403b4e6bac19d89afded080d80de049aaa294ca
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

from bibisect-242 repo. But for me only the "Global Events" is two lines, the Web/Organic fits in one line (even back to bibisect-6.0). The font is also called "Poppins Light" which is something I don't have locally, but may be substituted differently under Linux/fontconfig and Windows.

Also under Windows it is all one line. I'm not sure if this is a plain pptx import issue, I don't see anything weird with the textboxes settings.
Comment 4 Hossein 2023-08-23 13:12:47 UTC
I don't reproduce the problem on Windows:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5534c0ab539d4784a76d29f73d2df0d13ac67d20
CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_DE); UI: en-US
Calc: CL threaded

Is it possible that it is a font issue? For example lack of specific font on Linux?
Comment 5 Gerald Pfeifer 2023-08-23 16:08:39 UTC
Created attachment 189110 [details]
Visual comparison PowerPoint (left) vs Impress (right)

(In reply to Gabor Kelemen (allotropia) from comment #3)
> But for me only the "Global Events" is two lines, the Web/Organic
> fits in one line (even back to bibisect-6.0). The font is also 
> called "Poppins Light" which is something I don't have locally

Indeed, now that I tried again the "Global Events" box looks like
the one to focus on.

(In reply to Hossein from comment #4)
> Is it possible that it is a font issue? For example lack of specific
> font on Linux?

I originally wondered about that, too, but seeing how in PowerPoint
"Events" is not shown, whereas Impress shows "Events" in a second
line and increases the height of the box accordingly makes me think
it's not merely a font issue? 

Let me share a screenshot comparing PowerPoint (online) vs Impress.
The former shows "Global", drops "Events", and leave the box' height.
The latter shows "Global Event" spread over two lines and grows the box.
Comment 6 Gabor Kelemen (allotropia) 2023-08-24 14:15:25 UTC
Found that this font is actually a free one: https://fonts.google.com/specimen/Poppins 

With this installed I see the same layout under Linux as originally reported: two boxes are taller, text is broken to two lines.

However, I see now in PP that the "Resize shape to fit text" option is also enabled for the blue rectangles, which are grouped. 
This is a problematic area... several bugs in the pptx-textbox meta revolve around this. But I have not seen one yet that is platform-dependent, so NEW.
Comment 7 Commit Notification 2024-08-12 11:25:23 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

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

tdf#156857: sd ooxml import: fix shape size if spAutofit is set

It will be available in 25.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 8 Gerald Pfeifer 2024-08-13 08:13:38 UTC
Happy to confirm as fixed in last night's snapshot:

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