Bug 144876 - Width of image properties dialog box is displayed incorrectly
Summary: Width of image properties dialog box is displayed incorrectly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Image-Dialog
  Show dependency treegraph
 
Reported: 2021-10-02 16:49 UTC by Leandro Martín Drudi
Modified: 2023-05-20 12:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Long description (24.22 KB, image/jpeg)
2021-10-02 16:50 UTC, Leandro Martín Drudi
Details
Short description (25.03 KB, image/jpeg)
2021-10-02 16:51 UTC, Leandro Martín Drudi
Details
Text with spaces (37.90 KB, image/png)
2021-10-02 16:52 UTC, Leandro Martín Drudi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leandro Martín Drudi 2021-10-02 16:49:16 UTC
Description:
The width of the image properties dialog box is displayed adapted to the content of the description.

Steps to Reproduce:
1. Right click on an image.
2. Properties
3. Options tab
4. Type a multi-line description.
5. Confirm changes.
6. Click back in.

Actual Results:
Width of the image properties dialog box is displayed adapted to the content

Expected Results:
Normal width dialog box with the description displayed on several lines.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
It happens since several versions ago but I don't remember when it started happening (if I remember correctly, since 7.0 or even earlier).
Comment 1 Leandro Martín Drudi 2021-10-02 16:50:13 UTC
Created attachment 175461 [details]
Long description
Comment 2 Leandro Martín Drudi 2021-10-02 16:51:16 UTC
Created attachment 175462 [details]
Short description

NOTE: It does not matter if the text has spaces or not. It adapts to the length of a certain number of characters and then makes a line break.
Comment 3 Leandro Martín Drudi 2021-10-02 16:52:56 UTC
Created attachment 175463 [details]
Text with spaces

Since instead of proving it they will say that it is because the first capture has no spaces, I show that it does not depend on the spaces between the words.
Comment 4 raal 2021-10-03 11:43:49 UTC
I can confirm with 7.3, it works in 6.0
Comment 5 raal 2021-10-03 11:56:27 UTC
This seems to have begun at the below commit.
Adding Cc: to Matteo Casalin ; Could you possibly take a look at this one?
Thanks
 cd6651803f018ec6334c7079ec1c10e8691a4996 is the first bad commit
commit cd6651803f018ec6334c7079ec1c10e8691a4996
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Jun 5 08:15:12 2018 +0200

    source 565340d457f41197474a75ba1b036bdc3d569041

https://git.libreoffice.org/core/+/565340d457f41197474a75ba1b036bdc3d569041
Fix tdf#100937: LO Freezed when I insert a very long text in...

... the Description box

The issue was triggered by ImpVclMEdit::Resize initially calling
TextEngine::SetMaxTextWidth() with a negative width (due to an initial
empty area, further "reduced" to take into account a vertical scroll
bar) and then with positive values in following iterations.
I preferred to consider such negative widths a no-op instead of
extending them to the "maximum" possible width.