Issue with table cell borders

General TRichView support forum. Please post your questions here
Post Reply
liisi
Posts: 4
Joined: Mon Sep 09, 2019 12:39 pm

Issue with table cell borders

Post by liisi »

Hello,

I'm trying to copy-paste a table from Word where some cells have borders.
I'm using the latest RichViewActions demo from web site.

If the borders are inside the table (meaning between two cells) then RichViewActions displays them correctly.
But if the borders are for outmost cells (meaning no cell on the other side) then RichViewActions draws a full table border instead of just for that particular cell.

Please advise.
Attachments
OutsideCellBorderIssue.png
OutsideCellBorderIssue.png (111.75 KiB) Viewed 16861 times
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Issue with table cell borders

Post by Sergey Tkachenko »

I need some time to check this problem and see if it can be solved.

In RTF tables, each cell may have completely different border at each side. In TRichView, all cells have identical borders (but some sides can be hidden). When importing RTF tables, outer borders are emulated by combination of cell border + table border. For example, if internal borders have 1 pixel width, and external borders have 2 pixel width, it will be imported as CellBorderWidth = 1 and table BorderWidth = 1 (because 1+1 = 2).

Probably, TRichView decided that for this table CellBorderWidth = 0 and table BorderWidth = 1, so it draws a border around the whole table.

I'll see if such tables can be imported differently.
liisi
Posts: 4
Joined: Mon Sep 09, 2019 12:39 pm

Re: Issue with table cell borders

Post by liisi »

This issue seems to have started since TRichView started differentiating between inner cell borders (CellBorderWidth) and outermost cells (OutermostCellBorderWidth).
The OutermostCellBorderWidth is later added to table BorderWidth and thus if there is at least one outermost cell with a border the entire table border is painted (as seen on the example).
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Issue with table cell borders

Post by Sergey Tkachenko »

I fixed it in my working version.
The fix will be included in the next update (I hope it will be released in the next week)
Post Reply