Bug 165329 - FILEOPEN PPT: non-autofit text is being reduced in size
Summary: FILEOPEN PPT: non-autofit text is being reduced in size
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
24.8.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:ppt
Depends on:
Blocks:
 
Reported: 2025-02-19 02:19 UTC by Justin L
Modified: 2025-02-20 16:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
kde240591-1.ppt: slide 2 should basically fill the entire page (143.50 KB, application/vnd.ms-powerpoint)
2025-02-19 02:19 UTC, Justin L
Details
kde240591-1.ppt_import-compare-2.png: slide 2 overlay, where RED=25.2 master, BLUE=25.2 oldest, grayscale=MSO (36.99 KB, image/png)
2025-02-19 12:47 UTC, Justin L
Details
kde240591-1min.ppt: minimized example (75.50 KB, application/vnd.ms-powerpoint)
2025-02-20 15:48 UTC, Justin L
Details
kde247746-1.ppt: another (mild) example - on slide 2 (46.50 KB, application/vnd.ms-powerpoint)
2025-02-20 16:23 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 02:19:34 UTC
Created attachment 199299 [details]
kde240591-1.ppt: slide 2 should basically fill the entire page

The size of the text has become way too small

This started in 25.8 (backported to 24.8.5) with
commit 054c2946a130a1acea91140f4e7c3e4a0f93a170
Author: Oliver Specht on Wed Dec 11 14:24:17 2024 +0100
    tdf#163634 Format empty paragraph if they have a bullet/numbering

Steps to reproduce
1.) open kde240591-1.ppt

On the second slide, the last point - Questions - should be about 1 inch from the bottom of the screen, not only 2/3 of the way down. And the text should be much larger.

Even before the fix, the amount of space between the bullets wasn't quite enough, but at least the font size was correct. Likely the problem is related to auto-fit somehow. This textbox is not auto-fit at all, yet we seem to be doing some kind of auto-sizing.

Found by Collabora's mso-test
Comment 1 m_a_riosv 2025-02-19 09:20:14 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-GB
Calc: CL threaded
Comment 2 Justin L 2025-02-19 12:47:11 UTC
Created attachment 199310 [details]
kde240591-1.ppt_import-compare-2.png: slide 2 overlay, where RED=25.2 master, BLUE=25.2 oldest, grayscale=MSO

Slide 8 is similarly reduced.

My guess is that this has just exposed something existing, and is not a true regression. I didn't notice this for PPTX, so it might just be related to PPT?
Comment 3 Justin L 2025-02-20 14:27:50 UTC
(In reply to Justin L from comment #2)
>. I didn't notice this for PPTX, so it might just be related to PPT?
On import, this file has "AutoFit" enabled in LO, but it is not on in MSO.

AutoFit was being developed in LO 4.0 and 4.1 AFAICS. Bibisect was not very clean or clear, but the button was activated in this range of commits
linux bibisect 41max commit 6166282edeb1a5c44d34d4824eab1f82b6e7b15a

git log 6166282edeb1a5c44d34d4824eab1f82b6e7b15a..d8d55787b81cdc955b73c8befa4ab608f46e32aa

specifically of interest is commit acccf7a13fd0f87e5aecdc7d5412726a76dba275
Author: Armin Le Grand on Fri Oct 5 13:02:31 2012 +0000
    Resolves: #i119885# corrected AutoGrowHeight setting...
Comment 4 Justin L 2025-02-20 15:48:47 UTC
Created attachment 199351 [details]
kde240591-1min.ppt: minimized example

The key part here seems to be filter/source/msfilter/svdfppt.cxx, specifically
                    case TSS_Type::Body :
                    case TSS_Type::HalfBody :
                    case TSS_Type::QuarterBody : bAutoFit = true; break;
and then
if (bAutoFit && !bAutoGrowHeight && !bAutoGrowWidth)
    SetMergedItem(SdrTextFitToSizeTypeItem(drawing::TextFitToSizeType_AUTOFIT));
Comment 5 Justin L 2025-02-20 15:55:55 UTC
mk tried to remove bAutoFit in bug 93124, but that was reverted because "user experience in making changes wants autofit to be enabled".

However, as noted, MSO doesn't follow that "user experience" desire, so we are constantly fighting a battle here between the desire to import correctly and the desire to have a nice editing experience afterwards it seems.

bAutoFit introduced with commit 3550256daa5451c1d51d220d5489c1b20150c374
Author: Thorsten Behrens on Fri Sep 17 10:11:28 2010 +0200
    fit-list-to-size.diff: Shrink font automatically when text overflows.
Comment 6 Justin L 2025-02-20 16:23:06 UTC
Created attachment 199354 [details]
kde247746-1.ppt: another (mild) example - on slide 2

Slide 11 of comment 0's kde240591-1.ppt is another example, which was also provided as a single slide example as kde266631-1.ppt.

Since this is allotropia staff involved in both causing and exposing this bug, I'll let them decide how to move forward. (Note that make sd.check will still pass if you 
    SetMergedItem(SdrTextFitToSizeTypeItem(drawing::TextFitToSizeType_NONE));