Description: When I add a border to a table's cell, the row height of that cell is increased. Steps to Reproduce: 1. Click menu "Table", then "Insert Table"; insert a 2x2 table and select "None" for Style. 2. Click on any cell of the new table. 3. Click on the "Borders" button on the table-editing toolbar; add a border to the cell. Actual Results: The border is added to the cell, but the row height is considerably increased. Also, if the column width is set to minimal, you will need to increase the column width, otherwise the text won't fit in the cell. Expected Results: Row height should not change when a border is added. The column width should fit the same amount of text after a border is added. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.0.0.3 Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: pt-BR (pt_BR.UTF-8); UI: en-US Calc: threaded
The row height changes even when only vertical borders are added. The column's max text capacity is reduced even when only horizontal borders are added.
I confirm the behaviour, but it only happens, if row height is set to "Fit to Size". I'm not sure, if this is the expected result or not.
(In reply to Joao Carvalho from comment #0) > the row height is considerably increased. No, it's a slight increase seen only with an empty or small height cell. I checked MSO, similar behavior. Not worth a bug. > Also, if the column width is set to minimal, you will need to > increase the column width, otherwise the text won't fit in the cell. > > Expected Results: > The column width should fit the same amount of text after a border is added. Please attach a sample for this.
Row height changes, because padding of table cell changes from 0,00cm to 0,05cm, if you add a border. If you add a border and changes padding to 0,00cm row height remains. So question is: Should padding change automatically?
Created attachment 165366 [details] document demonstrating the table issue Here is a document with some tables that illustrate the described problems.
> Please attach a sample for this. Done!
(In reply to Dieter from comment #2) > I confirm the behaviour, but it only happens, if row height is set to "Fit > to Size". If you uncheck "Fit to Size", then set row height so that the text fits narrowly, and then add a border, the bottom of the text gets cropped.
(In reply to Dieter from comment #4) > Row height changes, because padding of table cell changes from 0,00cm to > 0,05cm, if you add a border. If you add a border and changes padding to > 0,00cm row height remains. Bingo. This solved it for me. > So question is: Should padding change automatically? Maybe padding should be added only where there is a border. For example, if you add one horizontal line to the top edge of a table, the horizontal and vertical padding is increased across the entire table. If it is a table with many rows and columns, this makes the table much taller and wider. This doesn't happen in MS Word 2010: if you add one very thick horizontal border to a row, you notice a shift, but the table does not get significantly taller nor wider. In LibreOffice Writer, I first noticed this behavior when trying to add a vertical line to a academic-style table. This table style has horizontal lines on the top and on the bottom edges of the table, but no vertical lines. When I added one single vertical line to that table, horizontal and vertical padding was increased across the entire table, and the table got much taller than I wanted it to be!
(In reply to Dieter from comment #4) > If you add a border and changes padding to > 0,00cm row height remains. When I add a border and then look at the table properties, it incorrectly says padding is still set 0,00cm, so I can't reduce it directly to fix the table height. But, if I increase it to something like 0,10cm, hit ok, then decrease back to 0,00cm, the row height returns to what it was before adding the border.
(In reply to Joao Carvalho from comment #8) > Bingo. This solved it for me. I would rather not touch the auto padding. Haven't seen any complaint in the past, and it might feel as a regression for many users. So better resolve as NAB. (In reply to Joao Carvalho from comment #9) > When I add a border and then look at the table properties, it incorrectly > says padding is still set 0,00cm... Padding changes to 0.5cm if you either click one of the presets or any user-defined borders. Pretty clear to me.