Bug 145802 - Frame that is anchored to paragraph should need no additional space for its newline character
Summary: Frame that is anchored to paragraph should need no additional space for its n...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-20 22:56 UTC by jsv
Modified: 2022-11-21 15:51 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
test file (10.45 KB, application/vnd.oasis.opendocument.text)
2021-11-20 22:58 UTC, jsv
Details
how it works (19.41 KB, image/png)
2021-11-20 22:59 UTC, jsv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jsv 2021-11-20 22:56:34 UTC
Description:
Create a frame anchored to a paragraph and set its width as relative to paragraph area, 100% of its width (menu bar > Insert > Frame > Frame > Type > Relative to = True > Width = 100%).

Put the cursor on the line below the frame and press the Enter key. You can see that the frame will move down.

(1) This happens because the frame is the same width as the paragraph and therefore there is no free space on its right side for a newline character, which is represented in Writer as a blue pilcrow (ΒΆ) (menu bar > View > Formatting Marks = True).

(2) ...And so, if you reduce the width of the frame to, for example, 95% of paragraph width, pressing the Enter key on the line below the frame won't move the frame, since the newline character is on the same line as the frame itself, and not on your current line. So you will have no problems in such a case.

I would say that behavior described in (1) is not what the user normally expects. Even more, this behavior is not consistent with how the newline character is treated in the end of normal paragraphs. If you have a normal paragraph (i.e., not a frame), you don't need additional space for the newline character. If there is not enough space, the newline character will be placed outside the paragraph box, but on the **same** line as the last line of the paragraph, and not below it.

See the attached image.

Steps to Reproduce:
see above

Actual Results:
see above

Expected Results:
see above


Reproducible: Always


User Profile Reset: No



Additional Info:
see above
Comment 1 jsv 2021-11-20 22:58:46 UTC
Created attachment 176387 [details]
test file
Comment 2 jsv 2021-11-20 22:59:20 UTC
Created attachment 176388 [details]
how it works
Comment 3 ajlittoz 2021-11-21 04:29:36 UTC
This is a follow on of

https://ask.libreoffice.org/t/frames-anchored-to-paragraphs-why-they-move-when-i-press-enter-on-the-line-below-them-is-there-a-fix/70689/

IMHO, this is no bug but a very tricky subtlety of space reservation by frames. It would deserve a good explanation but I think it is too subtle for the Writer Guide.

See my comment on the AskLO site but I am no developer, so I might be wrong.
Comment 4 Buovjaga 2022-11-21 15:51:18 UTC
Let's close.