Bug 137803 - EDITING “Resize shape to fit text” setting has no effect in Writer textframes
Summary: EDITING “Resize shape to fit text” setting has no effect in Writer textframes
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Attila Bakos (NISZ)
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: Shape-Textbox
  Show dependency treegraph
 
Reported: 2020-10-27 14:26 UTC by NISZ LibreOffice Team
Modified: 2021-02-20 16:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer with shapes containing text; textframe+text (13.66 KB, application/vnd.oasis.opendocument.text)
2020-10-27 14:26 UTC, NISZ LibreOffice Team
Details
Same example file with Resize option enabled. (14.10 KB, application/vnd.oasis.opendocument.text)
2020-10-27 14:26 UTC, NISZ LibreOffice Team
Details
Screenshot of the file before enabling Resize option (41.45 KB, image/png)
2020-10-27 14:26 UTC, NISZ LibreOffice Team
Details
The original file after enabling the Resize option (42.28 KB, image/png)
2020-10-27 14:26 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-10-27 14:26:00 UTC
Created attachment 166777 [details]
Example file from Writer with shapes containing text; textframe+text

Attached document contains some shapes with text on them and similar shapes with textframes added and the same text inside. Left side shapes have more text, right side ones have less.

In the Format – Text Box and Shape – Text Attributes dialog the “Resize shape to fit text” works in case of the shapes without textframe: the left side one grows to fit the text, the right side one shrinks.

The same setting is however ineffective for the bottom shapes with textframes, they are not resized.

Steps to reproduce:
    1. Open attached document
    2. Select all the shapes, go to Format – Text Box and Shape – Text Attributes and enable “Resize shape to fit text” 

Actual results:
Shape size does not change for the two bottom shapes with textframes.

Expected results:
Shapes with textframes are resized.
Also after saving and reloading the shapes and textframes seem to be resized correctly, but they also separate.

LibreOffice details:
Version: 7.1.0.0.alpha1+ (x64)
Build ID: b61bf7c7cfcf97a5ade6d130873af146670bc2ee
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-10-27 14:26:20 UTC
Created attachment 166778 [details]
Same example file with Resize option enabled.
Comment 2 NISZ LibreOffice Team 2020-10-27 14:26:38 UTC
Created attachment 166779 [details]
Screenshot of the file before enabling Resize option
Comment 3 NISZ LibreOffice Team 2020-10-27 14:26:57 UTC
Created attachment 166780 [details]
The original file after enabling the Resize option
Comment 4 Dieter 2020-11-14 06:46:51 UTC
I confirm it with

Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded
Comment 5 Commit Notification 2021-01-26 13:00:21 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/26bd8f5a1d39801f69232c22673cb0da7c76d3d5

tdf#137803 sw: fix AutoSize and Wrap of textboxes

It will be available in 7.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 6 Dieter 2021-02-20 16:11:50 UTC
VERIFIED with

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 28555fc345ac2ccdda0e4e0f3c812c646befe68b
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Attila, thanks for fixing it.

Additional observation: Space between textframe and edges of the shape decreases. But that might be a different bug.