Bug 51665 - Writer: support diagonal borders in tables
Summary: Writer: support diagonal borders in tables
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: high enhancement
Assignee: Not Assigned
: 61734 87426 88807 108819 118727 134891 145945 151333 153426 (view as bug list)
Depends on: 143300
Blocks: Table-Borders
  Show dependency treegraph
Reported: 2012-07-02 13:24 UTC by Gerry
Modified: 2024-03-23 04:56 UTC (History)
22 users (show)

See Also:
Crash report or crash signature:

Table with diagonal border.doc (28.00 KB, application/msword)
2012-07-02 13:24 UTC, Gerry
Table with diagonal border.pdf (12.67 KB, application/pdf)
2012-07-02 13:25 UTC, Gerry
common use of crossing (2.54 KB, image/png)
2014-12-17 23:40 UTC, Yan Pas
Multiple use of diagonal border in writer table (16.07 KB, image/png)
2020-02-07 11:41 UTC, jean-marc

Note You need to log in before you can comment on or make changes to this bug.
Description Gerry 2012-07-02 13:24:17 UTC
Created attachment 63723 [details]
Table with diagonal border.doc

Diagonal borders are often used in business tables or tables with technical descriptions. Currently, Writer does not support diagonal borders. Examples for diagonal borders are given in the two attachments.

Please add the support of diagonal borders in Writer tables.

Competitive analysis: At least the programmes Microsoft Word, Corel WordPerfect and KWord/Calligra Words support diagonal borders in tables.
Due to the lack of this feature in Writer, the import of a MS Word file also fails to import diagonal borders.

The related bug report in the Apache OpenOffice bugtracker:
Comment 1 Gerry 2012-07-02 13:25:00 UTC
Created attachment 63724 [details]
Table with diagonal border.pdf
Comment 2 Rainer Bielefeld Retired 2012-07-02 13:32:41 UTC
inherited from OOo
Comment 3 Joel Madero 2012-07-09 15:40:54 UTC Comment hidden (obsolete)
Comment 4 Gerry 2012-07-13 15:33:27 UTC
I don't know whether "lowest" is the right decision regarding the priority of this enhancement:

* The OpenOffice bug has 37 votes.
* Apparently the Korean community is using diagonal borders a lot (see OpenOffice bug entry).
* All main competing products support diagonal lines in word processor tables.
* I encounter from time to time problems when importing Word documents with tables having diagonal lines.
Comment 5 Joel Madero 2012-07-13 15:44:57 UTC Comment hidden (obsolete)
Comment 6 Gerry 2012-07-13 16:10:10 UTC Comment hidden (obsolete)
Comment 7 Xisco Faulí 2014-03-12 16:42:39 UTC
*** Bug 61734 has been marked as a duplicate of this bug. ***
Comment 8 Yan Pas 2014-12-17 23:35:30 UTC
*** Bug 87426 has been marked as a duplicate of this bug. ***
Comment 9 Yan Pas 2014-12-17 23:40:29 UTC
Created attachment 110967 [details]
common use of crossing

Changed priority to medium, cause all my math documents opened incorrectly. It is common to cross top left cell as it is shown on the screenshot
Comment 10 Regina Henschel 2017-06-27 20:50:39 UTC
*** Bug 88807 has been marked as a duplicate of this bug. ***
Comment 11 Regina Henschel 2017-06-27 20:52:59 UTC
*** Bug 108819 has been marked as a duplicate of this bug. ***
Comment 12 Christian Lehmann 2018-06-18 09:36:38 UTC
I vote for this enhancement, backing comments #4 and #9. For a logical display of classification criteria used as headers of table rows and columns, a diagonal line is regularly needed in the first table cell.

Notice, too, that there is no workaround for the lack of this feature, except to use another word processor.
Comment 13 Buovjaga 2018-07-15 18:00:06 UTC
*** Bug 118727 has been marked as a duplicate of this bug. ***
Comment 14 jean-marc 2020-02-07 11:41:06 UTC
Created attachment 157730 [details]
Multiple use of diagonal border in writer table

Hundreds of these chord changes (added to lyrics, so use of Word/Writer for text) cannot be moved from MS Word to LibreOffice Writer because of the lack of this functionnality. The need of these borders is the same for rising diagonal / and descending one \
Comment 15 ricky.tigg 2021-03-10 13:12:01 UTC
That was a well argued report that was posted on 2012-07-02. An essential feature indeed which though will come late once implemented. It could even have been reasonably expected at that time, to be part of Writer, due to its rich-featuring reputation.
Comment 16 Dieter 2021-03-10 13:16:35 UTC
We have 5 duplicates and 15 people in cc. So I think it's reasonable to change importance to high.
Comment 18 Bayram Çiçek 2021-07-29 23:31:50 UTC
(In reply to himajin100000 from comment #17)
> FYI:
> https://opengrok.libreoffice.org/xref/core/sw/source/core/layout/paintfrm.cxx
> ...
Thanks for the code pointers.


Hi all. This week, I started working on this bug. I created UI for diagonal borders in "Table toolbar > Borders" tab: https://gerrit.libreoffice.org/c/core/+/118951 . I'm aiming to draw diagonal borders by clicking diagonal borders icons.

I have to fix this bug in order to succeed in GSoC, so I need your big help.

I've just sent a patch as WIP here: https://gerrit.libreoffice.org/c/core/+/119685 . In patchset1, I've updated flags, created SvxBorderLine variables and handled diagonal borders as aBorderInner.

Could you please review the patch and send me feedback&suggestions for the next patchsets? My questions are in the commit page. 

Comment 19 Bayram Çiçek 2021-08-02 08:37:31 UTC
(In reply to Bayram Çiçek from comment #18)
> https://gerrit.libreoffice.org/c/core/+/119685
I've uploaded the patchset3.

- now, Calc can draw/remove diagonal borders form "Table toolbar > Borders" tab.
- I'll try to draw diagonal borders in Writer-Tables too, with next patchsets.
Comment 20 Bayram Çiçek 2021-08-12 09:27:31 UTC
IMHO, I think tdf#51665 can be a standalone GSoC project itself. In addition to drawing diagonal borders, we should also be able to change their color and style. To apply these 3 things (drawing, color, style), we have to change a lot of things in the codebase.

But for now, I'll just try to draw diagonal borders.
BTW new commit link for Writer-specific: https://gerrit.libreoffice.org/c/core/+/120262


- Diagonal borders feature was started to implementing in 2000 until 2004 by 	Jens-Heiner Rechtien (https://cgit.freedesktop.org/libreoffice/core/commit/?id=86251e219907b). (as far as I can see with "$ git blame ./sw/source/core/doc/tblafmt.cxx" and ./sw/source/core/layout/paintfrm.cxx)

- https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/tblafmt.cxx?r=5f74a9c6#531
Comment 21 Mehmet gelisin 2021-09-11 13:04:21 UTC Comment hidden (spam)
Comment 22 Timur 2022-10-05 13:39:55 UTC
*** Bug 151333 has been marked as a duplicate of this bug. ***
Comment 23 MadMint 2023-02-06 20:08:27 UTC
Good evening,

I find it indecent that with the advances in LO, you still can't diagonally split table cells on Writer .

How do I escalate this suggestion?

Thank you for helping me car on step on the head.
Comment 24 Dieter 2023-02-07 05:25:08 UTC
*** Bug 153426 has been marked as a duplicate of this bug. ***
Comment 25 Justin L 2023-06-07 20:37:00 UTC
*** Bug 145945 has been marked as a duplicate of this bug. ***
Comment 26 Justin L 2023-06-07 20:51:51 UTC
*** Bug 134891 has been marked as a duplicate of this bug. ***
Comment 27 george 2024-03-23 04:56:19 UTC
While Libre Calc now supports diagonal borders in a cell, libre writer still doesn't have this capability yet.