Bug 146998 - First line of second paragraph does not wrap when picture in first paragraph extends below descender line (document specific?)
Summary: First line of second paragraph does not wrap when picture in first paragraph ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.1.2 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2022-01-26 10:35 UTC by Brian
Modified: 2023-02-13 07:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example of bug (501.65 KB, application/vnd.oasis.opendocument.text)
2022-01-26 10:37 UTC, Brian
Details
example with larger paragraph spacing (502.15 KB, application/vnd.oasis.opendocument.text)
2022-01-26 10:38 UTC, Brian
Details
accidentally fixed (498.99 KB, application/vnd.oasis.opendocument.text)
2022-01-26 10:40 UTC, Brian
Details
blank letterhead where this document was created (50.90 KB, application/vnd.oasis.opendocument.text)
2022-01-26 10:41 UTC, Brian
Details
old template (9.55 KB, application/vnd.oasis.opendocument.text-template)
2022-01-26 10:42 UTC, Brian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian 2022-01-26 10:35:24 UTC
Description:
With a picture in both the upper and lower paragraph, (only) the first line of the lower paragraph fails to wrap and is obscured buy the second picture. This happens when the bottom edge of the upper picture falls between the last descender line of the upper paragraph and the acender line of the 1st line of the lower paragraph. With the bottom edge of the upper picture fully within the upper paragraph, the lower one wraps correctly. With the bottom edge of the upper picture intruding on the lower paragraph, it wraps correctly with an exception.

The first line wraps correctly, but the lower picture is pushed all the way to the page edge and I can not move it to the left. It's horizontal position was set to 'right of paragraph area'. Reapplying this setting does not fix it. Repeated attempts to drag the image to the left generally do not work unless I move it significantly further than I want it. Then it moves to the left somewhat, but not to where I dragged it. (This might be an unrelated issue, but was noticed when trying to move these pictures around.)

I got the bug to disappear by possibly changing the paragraph spacing and changing it back once, but I am not sure how to replicate it. It still appears in this file even when changing the spacing. It may be related to an old unused template that is still referenced since this document was created from another document "OSDI 2018 Letterhead.odt" that accidentally used that old template. Both paragraphs behave normally when copy/pasted in to a new document with the 'Default.ott' template active. The bug happens whether or not the old template is installed.

Steps to Reproduce:
See attached file.

Actual Results:
See attached file.

Expected Results:
See attached file.


Reproducible: Sometimes


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 7.2.1.2 / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Brian 2022-01-26 10:37:38 UTC
Created attachment 177797 [details]
example of bug
Comment 2 Brian 2022-01-26 10:38:39 UTC
Created attachment 177798 [details]
example with larger paragraph spacing
Comment 3 Brian 2022-01-26 10:40:00 UTC
Created attachment 177799 [details]
accidentally fixed
Comment 4 Brian 2022-01-26 10:41:12 UTC
Created attachment 177800 [details]
blank letterhead where this document was created
Comment 5 Brian 2022-01-26 10:42:15 UTC
Created attachment 177801 [details]
old template
Comment 6 Dieter 2022-02-09 16:32:40 UTC
Brian, I can clearly see the bug in attachment 177797 [details]. When I copy all and past it into attachment 177800 [details] (after removing content) bug appears. That doesn't happen in a new document or in document from attachment 177801 [details]. So I think problem is related to attachment 177800 [details] and not to template. 

Do you can give any informations, how attachment 177800 [details] has been created?
Comment 7 Brian 2022-02-10 07:07:04 UTC
It was a few years ago, but it would have just been a blank new file, with the image and text added to make a reusable letter head. When created, it would have used the attached template but I removed the footer (which held a filename field) and probably changed the margins. I set the template up for someone else and forgot to deactivate it on my machine. I mention the template since I noticed it was referenced in the 'Properties', even thought the actual template file is no longer on my system. I was able to remove the template by editing the meta.xml file and removing the "<meta:template...>" tag. (It still had the old Windows path name for the .ott file). I have a bunch of older documents that have the reference to the template but they open fine on the new OS with no warnings. I have not noticed this bug with any of them.
Comment 8 Dieter 2023-02-09 07:25:45 UTC
Brian, could you please retest with the new version LO 7.5?
=> NEEDINFO

Since the bug seems to be docment specific, I don't know, if there will be a developer, who tries to fix it.
Comment 9 Telesto 2023-02-09 08:27:49 UTC
Still present
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d8ae6d1388f28c405c4de2dfe93dbfe2d8acd470
CPU threads: 8; OS: Mac OS X 12.6.3; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded

The question, are older version rendering this properly?
Comment 10 Dieter 2023-02-13 06:07:14 UTC
So let's change status to NEW, although we can't reproduce it in a new document. I've changed summary to mark, that te problem might be document specific
Comment 11 Brian 2023-02-13 07:43:36 UTC
I checked in my installed version 7.3.7.2 and the current stable version 7.5.0.3 and it's still present in both. I also tried bringing in another random image to play with (in the bugged file) and the behavior persists.

Additionally, while I was playing around with the file I discovered you can make the bug more noticeable if you increase the paragraph spacing (via the side bar deck). Increasing the spacing, to for example 1", really shows off the fact that the bottom edge of the top picture can be any where within the gap between the paragraphs and it will cause just the first line of the lower paragraph to not wrap. I tried copying the content of the document and pasting it into a new document and the bug goes away.

One thing that also went away was the larger paragraph spacing. It went back to the default of 0.1". I also noticed in the bugged document changing the paragraph spacing with the control in the side bar deck changed the spacing in ALL paragraphs, even with no selected text. All where changed even with only one selected. They all change together even when right-clicking and using the dialog box. This does not happen with a new document. Paragraph spacing operates only on the paragraph with the cursor or multiple selected paragraphs.

As an experiment I pasted the paragraphs of my original comment of 2022-01-26 at the bottom of the original document and they are not affected by this "group spacing" behavior. I also dragged the images down to these paragraphs and the wrapping behaves correctly. However, if the upper image intrudes into the lower paragraph, the lower image is still forced all the way to the right page margin and I have trouble dragging it back. I have to drag it far more to the left than I should, as if there is some horizontal offset (I think equal to the upper image width) being applied.