Page 1 of 1
Issue with table cell borders
Posted: Mon Sep 09, 2019 2:03 pm
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.
Re: Issue with table cell borders
Posted: Wed Sep 11, 2019 6:19 am
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.
Re: Issue with table cell borders
Posted: Wed Sep 11, 2019 12:49 pm
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).
Re: Issue with table cell borders
Posted: Thu Sep 12, 2019 6:19 pm
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)