Bug 159316

Summary: Really help assigning alternating formats to table rows and columns
Product: LibreOffice Reporter: Ulrich Windl <u20230201>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: enhancement CC: dgp-mail
Priority: medium    
Version: 7.5.7.1 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=34391
https://bugs.documentfoundation.org/show_bug.cgi?id=152711
Whiteboard:
Crash report or crash signature: Regression By:

Description Ulrich Windl 2024-01-22 07:38:43 UTC
Trying to format table rows with alternating backgrounds (or generally: alternating row formats), I realized that It's *very hard* to do:
The only way to do it seems to be using "auto format" of tables, so I tried it.
However none of the predefined formats did fir my needs, so I wondered:
How does "auto format" actually work? Unfortunately you cannot "edit" any of the pre-existing autoformat templates, and when adding a custom autoformat, it simply copies the existing table format (it seems).

So I tried applying a pre-existing "auto format" to my table, then inspecting the formats to see how it is done (to be able to modify it before saving it as my new "auto format").  However I was not able to find the magic that implements the format assigned, not even in macros.

In contrast considering current HTML and CSS, it's rather easy to do it there:
table tbody tr:nth-of-type(even) { background-color: #ccc }
(Assign a different background color to all even table rows that make the "body" of a table)

I think Writer should have similar possibilities: For rows and for columns.
Autoformat as it is now may be a nice idea, but the current implementation is close to being useless.
Comment 1 Dieter 2024-02-09 08:48:42 UTC
Ulrich, I'm not sure, but perhaps bug 34391 or bug 152711 covers your enhancement request.