Writer: Why does adding a table border change the cell margins?

Why does adding a border to a table in Writer change the cell margins?

I paste RTF tables into Writer documents a lot. If you compare the top
(unformatted) and bottom (borders added) tables, you can see that the
first row and the bottom row are slightly indented the "C" in
"Construct" and in "Cautiousness" have been moved slightly to the right
(which has caused the word "Cautiousness" to wrap) while the other two
rows are flush against the left border. This looks tacky. How to I
prevent LO from changing the cell margin when I add borders?

FWIW, here are some things I've tried. I have no idea how to affect the
cell margins, because if I go Table -> Borders, the "Spacing to
contents" is all zero's. The style of a regular table is "Table
Contents" but changing the style to "Table Contents" has no effect.
Also, highlighting the text and selecting "Remove direct formatting" has
no effect.

I think you can duplicate this with a regularly-created table by
creating the table, removing all borders, changing the spacing to
contents to zero, then adding borders.

-Alan

Your email suggests that you _may_ have attached images to your post. If
so, the list servers have removed them so we can't compare what you are
describing.

I tried unsuccessfully to duplicate the issue with LO 4.4.0.2 on Win 7
x64. Can you tell us which version of LO you are using, upload an
illustration to a file sharing service and post the link back to the list.

Dave

I don't have a way to transmit a picture but here are the steps to
replicate using any version of LO on any platform:

1. Paste the following three lines as unformatted text into Calc with
commas as the delimiter to create a 3x3 table:

a,1,2
b,2,3
c,3,4

Or just create this 3x3 table in Calc.

2. Copy the resulting 3x3 table from Calc and paste special into to
Writer as RTF.

3. Now you have a 3x3 table in Writer with no margins. Ensure the
left-most column is left-aligned.

4. Add borders at the top and bottom row (in fact, you can add no
borders).

LO not only adds the borders but also changes the margin of the cells of
the rows to which you have added borders. The result looks strange
because the top and bottom row have a margin of about 0.04 while the
middle row is flush left.

Bonus step:

5. Right-click and select Table > Border and observe that "Spacing to
contents" shows all zero's, even though non-zero margins are clearly
being used.

-Alan

OK. Something is screwy.
I do 1-5 as you describe.
I can then put the cursor in the top row, Right-click and select Table > Border, select spacing to contents 0.1 and set a spacing.
I can then put the cursor in the top row, Right-click and select Table > Border, select spacing to contents 0.0 and the spacing is removed.
I can add/remove spacing to the top row only with Table > Border.

Now if I select the whole table and add spacing, then select the whole table and remove spacing the table then behaves as one no mater where I have the cursor when adding or removing spacing.

LO Version: 4.1.6.2
Build ID: 410m0(Build:2)

Steve

I think what happens (and what you see for the table properties) depends on whether you set the borders by selecting individual rows (when you see the problems you describe) or for the table generally (when you don't). I'm guessing that you want to apply top and bottom borders to the table - with no borders between rows. Note that to do this you don't need to apply the two borders separately to the top and bottom rows.

Instead, either:
o Select the entire table
o Use the Borders button in the Table toolbar. (I'm guessing that is what you have been doing - but for the top and bottom rows separately.)
o Click the "top and bottom" button.

Or:
o Put the cursor somewhere in the table.
o Use Table | Table Properties ... | Borders (or right-click | Table... | Borders).
o Select the top and bottom borders under User-defined.

I think you'll find only the first method adjusts the "Spacing to contents". But both techniques act similarly on all rows, so avoiding the problem you identify.

I trust this helps.

Brian Barker