https://bugs.documentfoundation.org/show_bug.cgi?id=139255

--- Comment #11 from Philippe Cloutier <[email protected]> ---
As Regina mentions, the problematic behavior here is not specific to borders.
It notably affects alignment, background and borders. Here is a test which
better shows the scope:

1. Create a new document
2. Type "Introduction:"
3. Type Enter
4. Type "Element"
5. Make the line a list item (type F12)
6. Type Enter
7. Type "Subelement"
8. Make the line a sub-element (use the arrow pointing right)
9. Bring up the contextual menu on the "Element" line and bring up the
"Paragraph" dialog
10. Set a full red border
11. Uncheck Merge with following paragraph
12. Set a green background 
13. Set alignment to center
14. Close the dialog (OK)

The result is a single centered green line with its own border, resembling what
testcase 2024-07 shows.

Technically, I see 3 factors at play:
A. Newlines (Enter) are interpreted as paragraph breaks, even if they only
intend to separate list items.
B. The usual way to make a list adds bullets/markers which are THEMSELVES
indented (there is space on both sides around bullets, including on the left).
C. LibreOffice considers margins to draw a paragraph's box (borders and
background), so it paints a narrower box when bullets are indented. From there,
indeed, unless the boxes of 2 consecutive paragraphs are perfectly aligned, the
first one's bottom border and the second one's upper border are drawn (if such
borders are set), even if the property enables merging.

Factor B may be easy enough to fix, but that would only solve the case of
first-level lists. Sub-lists have to be indented.

I suggest working on factor A, but then I realize that a list item can contain
more than one paragraph, which I guess means a line can be in more than 1
paragraph―both its root paragraph and some "subparagraph". I really don't know
ODT, but that may require a complexification of the document model which would
require major effort.
----------------------------------------------------------------
WORKAROUND
Meanwhile, for paragraphs which contain simple lists (no nested lists), this
can be worked around by creating lists with non-indented bullets. To do so, you
could fake lists (by manually typing "1. ", "2. ", etc), but you can also use
list styles. The following would create a trivial list that way:
1. Type "Dummy list:"
2. Type Enter
3. Type "Single element"
4. Unless the panel already shows, select "More styles..." in the styles
dropdown.
5. Go to the list styles tab (fifth)
6. Double-click a style, for example "• bullet"

Note that only some of these predefined styles have no indentation at level 1.
All styles for unordered lists should be fine, but those for ordered lists are
either broken or indented by default. If you want an ordered list, you can
either create a new list style or edit one of these which work (in the Position
tab, at level 1).

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to