Bug 157059 - Styles: Space below paragraph not respected when reducing height of an image anchored as character
Summary: Styles: Space below paragraph not respected when reducing height of an image ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2023-09-01 17:20 UTC by MasterGone
Modified: 2024-04-28 15:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (496.28 KB, application/vnd.oasis.opendocument.text)
2023-09-17 09:29 UTC, MasterGone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MasterGone 2023-09-01 17:20:55 UTC
Description:
When an image is inserted with an anchor "As character" with a style applied on the paragraph, the space with the following style is not respected if the dimensions of the image are reduced.

Steps to Reproduce:
1) Create a paragraph style and set a space below the paragraph (like 0,2 cm) => this will be for an image

2) Create a second paragraph style which will be the next style of the first style => this will be for the image caption

3) Insert an image with an anchor "As character" and apply the 1st style

4) Write a caption with the second style

5) Resize the image with the image with smaller dimensions

Actual Results:
The caption stays in the same place and the space between the image and the caption gets bigger.

Expected Results:
The space defined in the first style should be applied.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL threaded
Comment 1 MasterGone 2023-09-01 17:29:18 UTC
Note this bug occurs when the image in step 3 is inserted with copy/paste.
Comment 2 Dieter 2023-09-16 09:21:08 UTC
MasterGone, please add a sample document, as this makes it easier for us to reproduce the bug. Thank you. A second thing: It seems to me, that you don't use the caption feature of LO: Click in image -> context menu -> insert caption (or you use presettings in tools -> options -> LibreOffice Writer -> AutoCaption. Can you explain why?
=> NEEDINFO
Comment 3 MasterGone 2023-09-17 09:29:48 UTC
Created attachment 189648 [details]
Test file

A file where you can reproduce this bug. Simply resize the photo with lower dimensions. The caption stays in the same position instead of being repositioned below the image with the correct margin.
Comment 4 MasterGone 2023-09-17 21:01:57 UTC
(In reply to Dieter from comment #2)
> A second thing: It seems to me, that you don't
> use the caption feature of LO: Click in image -> context menu -> insert
> caption (or you use presettings in tools -> options -> LibreOffice Writer ->
> AutoCaption. Can you explain why?
> => NEEDINFO

I find that formatting the legend is not intuitive this way, even using the styles. This is especially true when the caption is larger than the photo.
Comment 5 sdc.blanco 2023-09-17 21:40:00 UTC
(In reply to MasterGone from comment #3)
> Simply resize the photo with lower dimensions. 
Isn't the issue really only when image height is reduced?
Image width changes do not give a problem, because both image (as character) and caption are in centered paragraphs. Also, when image height is increased, no problem. But when image height is decreased, it looks like the canvas is not repainted/updated.

Two different workarounds.

Workaround 1:
1. Right-click image, select Anchor -> To Character.
2. Right-click image, select Anchor -> As Character.

Workaround 2:
1. Place cursor before or after the image, press Spacebar.
2. Delete inserted space.

I think either method will give you want you want, but I agree that the "updating"/"repainting" should happen when the height is reduced, without having to use a workaround.
Comment 6 MasterGone 2023-09-18 07:32:29 UTC
Absolutely, this only happens when the height of the image is reduced. I have already used these workaround methods, but it is not practical.
Comment 7 Stéphane Guillou (stragu) 2023-09-28 16:27:42 UTC
Reproduced with:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2902ab24ecc5ffbf4907ea83b2028508b9de6364
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: es-MX (en_AU.UTF-8); UI: fr-FR
Calc: threaded

... as well as 5.4.0.3.

Regression as not reproduced in OOo 3.3.
Comment 8 raal 2024-04-28 15:02:14 UTC
Reproducible with Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)