Bug 167877 - Paragraph border sometimes not rendered in multi-column section
Summary: Paragraph border sometimes not rendered in multi-column section
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paragraph-Borders
  Show dependency treegraph
 
Reported: 2025-08-09 17:31 UTC by Jim Avera
Modified: 2025-08-11 00:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
demo.odt -- see Steps to Reproduce (34.21 KB, application/vnd.oasis.opendocument.text)
2025-08-09 17:32 UTC, Jim Avera
Details
demo.odt -- See steps to Reproduce (29.98 KB, application/vnd.oasis.opendocument.text)
2025-08-09 17:38 UTC, Jim Avera
Details
screenshot (279.16 KB, image/png)
2025-08-09 17:40 UTC, Jim Avera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Avera 2025-08-09 17:31:44 UTC
Description:
In the attached document, a top border is enabled in two paragraphs but the border is not rendered in one of them.  

Both paragraphs were modified locally via rightclick_in_paragraph->Paragraph->Paragraph... (presumably creating an 'automatic' anonymous style).

Sometimes, if I changed the thickness of the border in the second paragraph it would then appear, but the border of the *first* paragraph would stop being rendered.



Steps to Reproduce:
1. Open attached "demo.ods"
2. View->Formatting Marks (so you can see the embedded line breaks)

3. Click in the RED paragraph in the second column;  rightclick->Paragraph->Paragraph...->Border
  --Notice that a top border is enabled (but is not rendered)

Actual Results:
Top border rendered in only one paragraph

Expected Results:
Top border rendered in both paragraphs.


Reproducible: Always


User Profile Reset: No

Additional Info:
.
Comment 1 Jim Avera 2025-08-09 17:32:09 UTC
Created attachment 202257 [details]
demo.odt -- see Steps to Reproduce
Comment 2 Jim Avera 2025-08-09 17:32:50 UTC
The file is demo.odt (not .ods).  It is a *writer* doc.
Comment 3 Jim Avera 2025-08-09 17:38:10 UTC
Created attachment 202258 [details]
demo.odt -- See steps to Reproduce
Comment 4 Jim Avera 2025-08-09 17:40:05 UTC
Created attachment 202259 [details]
screenshot
Comment 5 Telesto 2025-08-10 01:27:25 UTC
Confirm
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ccb3362a71f88213615bd39bd819ab8ec20d86cc
CPU threads: 8; OS: macOS 14.7.4; UI render: Skia/Metal; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 6 Telesto 2025-08-10 01:28:56 UTC
Also with
Version: 7.0.0.3
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 7 Saburo 2025-08-10 04:32:38 UTC
I think it would be better to uncheck 'Merge with next paragraph' in the first line where you set the border.

Version: 25.8.0.2 (X86_64)
Build ID: 80a8bc2ef75d415a197e282da0ebf917315d5e24
CPU threads: 12; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL threaded
Comment 8 Jim Avera 2025-08-10 16:39:31 UTC
> I think it would be better to uncheck 'Merge with next paragraph' in the first > line where you set the border.

Thanks @Saburo for pointing that out.  Un-checking that make the missing border appear, which is at least a work-around.    I think there is still a bug here:

The man page for "Merge with next para" says:

"The rules can be condensed to the statement that the stronger attribute wins. If, for example, one cell has a red border of 2 point width, and the adjacent cell has a blue border of 3 point width, then the common border between these two cells will be blue with 3 point width."

Here are the settings for the three paragraphs in the right-hand column:

Para #1: Borders: None; Padding: 0 on all sides
Para #2: Borders: 0.5pt black top;  Padding: 0.02" Top, others 0
Para #3 (RED): Borders: 0.5pt black top;  Padding: 0.02" Top, others 0
----
If I increase *bottom* padding in para #2 from 0 to 0.02" then the top border of the third paragraph appears.   However that pushes the para#3 text downward undesirably (so it does not line up with paragraphs in the first column).

But strangely, if I increase only the *top* padding in para#2 from 0.02" to 0.50" (leaving bottom padding at zero), then the top border of para#3 appears!  This seems to make no sense i.e. if the "Merge" rule was comparing the bottom of para #2 with the top of para #3 then changing the top of para #2 should not have any effect.
Comment 9 Saburo 2025-08-10 23:55:02 UTC
I don't know if this is the cause, but the color of the line may not be being compared.

https://opengrok.libreoffice.org/xref/core/sw/source/core/text/porlin.cxx?r=8351c54ee1c0f915f6378d58216432cec4a610d0#64