Bug 162388 - Customizing drawing shape size with "Resize shape to fit text" option enabled
Summary: Customizing drawing shape size with "Resize shape to fit text" option enabled
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Autofit
  Show dependency treegraph
 
Reported: 2024-08-07 14:58 UTC by Gabor Kelemen (allotropia)
Modified: 2024-09-02 12:34 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Manually adjusted box height in an autofit box, from PP 2016 (29.96 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2024-08-07 14:58 UTC, Gabor Kelemen (allotropia)
Details
The example file in PP 2016 and LO master (104.20 KB, image/png)
2024-08-07 15:01 UTC, Gabor Kelemen (allotropia)
Details
Adjusting the box height in the sidebar is not effective (14.17 KB, image/png)
2024-08-07 15:01 UTC, Gabor Kelemen (allotropia)
Details
Adjusting the box height in the P&S dialog is not effective either (26.67 KB, image/png)
2024-08-07 15:02 UTC, Gabor Kelemen (allotropia)
Details
Screencast MSO365 (153.34 KB, image/gif)
2024-08-08 07:06 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2024-08-07 14:58:04 UTC
Created attachment 195754 [details]
Manually adjusted box height in an autofit box, from PP 2016

This is followup to bug 156857

MS Office allows the resizing of text boxes which have the "Resize shape to fit text" property. LO on the other hand does not really support this, this was the source of the PPTX import bug 156857 - LO resizes shapes always, while PP does so only when one types a letter into the textbox.

LO on the other hand has the respective UI elements enabled in the Position and Size dialog and also on the sidebar too, they just don't apply the manually set size to the shape (at least not visibly, maybe the resize option instantly resets it...). Which does not make much sense: either allow the manual resize, or disable the spinboxes.

1. Open attached file (it was made in PP, but inserting a shape and Format - Text box and Shape - Text Attributes -> enabling "Resize shape to fit text" does the same)
2. Click on either blue textboxes
3/a. In the sidebars Position and Size section try to change the Height of the shape
3/b. Press F4 to open the Position and Size dialog and try to change the Height of the shape
-> the values in the spin boxes change, but the shape height stays the same (width on the other hand, can be changed)

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f7197e574cdbd7410fcadab1632bcce2626dca5a
CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

So we have at least an inconsistent UI and a choice to solve the issue:

- Allow the manual resizing of shape height even if the "Resize shape to fit text" attribute is enabled, and apply resizing only when text in the box is actually changed. This is what MSO does.

- Disable the Height box in the sidebar and Position and Size dialog, if the "Resize shape to fit text" attribute of the text box is enabled. This would resolve the inconsistency of ineffective UI elements and not change current behavior.

I don't have a strong opinion this time. UX team please review.
Comment 1 Gabor Kelemen (allotropia) 2024-08-07 15:01:12 UTC
Created attachment 195755 [details]
The example file in PP 2016 and LO master

The boxes are resized manually in PP, but they are resized to fit the text if you type something in the box.
Whether having this feature in LO is desirable or not, is up to debate.
Comment 2 Gabor Kelemen (allotropia) 2024-08-07 15:01:56 UTC
Created attachment 195756 [details]
Adjusting the box height in the sidebar is not effective
Comment 3 Gabor Kelemen (allotropia) 2024-08-07 15:02:23 UTC
Created attachment 195757 [details]
Adjusting the box height in the P&S dialog is not effective either
Comment 4 Heiko Tietze 2024-08-08 07:06:52 UTC
Created attachment 195764 [details]
Screencast MSO365

The Position & Size options "Fit width to text" and "Fit height to text" disable the respective attributes in the dialog and are effective in terms of a minimum size. The text box grows in width/height if content is added (otherwise it overflows). It does not play well together with "[x] Shrink Text on overflow".

With "[x] Fit height to text" checked it is not possible to shrink the textbox height below its content (but you can make it larger). On MSO365 the option is a set of radio buttons with "(o) Do not Autofit", "( ) Shrink text on overflow", and "( ) Resize shape to fit text". If the latter is active, the text box grows with the content (MSO does not . MSO blocks any resizing while in LibreOffice I can do but not shrink below the minimum defined by the content. MSO does not fit the shape to the text width, resizing is always possible and adding content breaks the line.

(In reply to Gabor Kelemen (allotropia) from comment #0)
> - Disable the Height box in the sidebar and Position and Size dialog, if the
> "Resize shape to fit text" attribute of the text box is enabled. This would
> resolve the inconsistency of ineffective UI elements and not change current
> behavior.

This would be the logical consequence. And actually what I see (after reloading the deck). 
Version: 24.2.5.2 (X86_64); UI render: default; VCL: kf6 (cairo+xcb); Locale: de-DE (en_US.UTF-8)

The radio buttons are a much nicer and actually the only correct way to present the options. On the other hand we provide more options to restrict the sizing.

Bug 114924 - FORMATTING - Adapt shape Width/Height to text option not available
Bug 156939 - "Fit height to text" is misleading, only regards growing rather than shrinking
Comment 5 Gabor Kelemen (allotropia) 2024-08-30 21:00:07 UTC
Setting to new due to the comment #4 accepting one of the initially proposed options.