Add or delete rows in table changes formatting

LibreOffice Writer 26.2.3.2
Windows 10 Professional
Ubuntu 26.04

Inserting or deleting rows or columns in a table changes cell formatting. Different actions produce different results:
-Adding rows above or below correctly inserts a row above or below that maintains the table and cell formatting, but overrides/removes the cell formatting on the existing row selected for the action.
-Undoing the previous action blows out all of the table formatting
-Inserting or deleting columns has a similar effect.
-no amount of “undo” restores the table to its original format. The format must be manually reset.

Is this a known issue?

The only way to reliably manage tables is to choose None in table styles.

Table styles are not styles but macros that get triggered each time there is a change to a table, as you have seen.
.

The only way that I know to remove a table style is to

  1. select the table and click Table - Convert - Table to text
  2. Select all the resulting text and click Table - Convert - Text to table
  3. In the dialogue select None for table style

I’m not using a table “Style” per se, though I do use the default paragraph style as it’s set in all of my document templates. I have a “template” table that is set for text to be in the default style, but different columns have different justifications, all set manually. The issue I’m experiencing is new with this version. I didn’t have this issue in previous versions - i.e. if I inserted a row or column it always maintained the formatting of the column or row selected. Writer isn’t behaving that way now.

Edit: I understand the steps you’ve described, and use that method frequently when I need to convert. In this case the table is an inserted table, without a style. I set the column and row formatting manually. I don’t want that formatting removed or changed, but inserting or deleting a row or column is causing it in a very undesirable manner.

That doesn’t matter.
As @EarnestAl has already mentioned, these are macro-controlled table elements.
Please have a look:

AutoFormat Table Styles

1 Like

I don’t use autoformatted table styles… And, this issue I’m having is new in this version.

Sorry, then there is surely something I am not yet aware of.
You can submit a bug report or a feature request.

How to Report Bugs in LibreOffice

Could you please provide a short sample document with some random text or numbers in which this occurs.

Yes indeed. file and screen capture
Videos.zip (2.6 MB)
.
Table issue.odt (22.8 KB)

The .odt file is the result after several tests - I have screencasts of them all, but have only uploaded two (they’ll give you the gist of it).

In the .odt file, select the table and “Clear formatting”, and apply center justify. Select any row and delete it. The entire table’s cell formatting changes. “That should not happen.”

The table behaves the same way in 24.8.3.2 and 7.6.7.2

But nevertheless the macro is there. If I clear direct formatting and apply Table Contents paragraph style in which I have set the alignment to be centered and then delete a row the table style macro overrides the paragraph style and aligns everything left.
.
If I convert the table to text and than convert the text to table with style None it behaves normally.
TableIssue135451Converted.odt (24.9 KB)

BTW Default Paragraph Style is not intended for use in documents. It is the ancestor style in which you can make global changes to font or other attribute.
Body Text (shortcut Ctrl+0) is intended for the main body of the document. It is the next paragraph style after Heading n (shortcut Ctrl+n) style

1 Like

I’m puzzled. When creating my original document table, I inserted the table with style = None. I’m a little unclear about what’s different between the two example documents. I definitely see that what you returned works as expected.

Using my original sample document, I selected the table, cleared formatting, and set it to “Table Contents” style. The result is the same (yes, the column alignment changes, but so too the font changes from Arial to Liberation Serif even though that font is set nowhere in my default or table contents settings).

I appreciate the help BTW

Clearing formatting will not remove the table style macro, only removing the table will do that.

Maybe check that too

1 Like

Please do elaborate on “Table style macro” - is that a macro that is part of normal functionality or a macro that is/has been unwittingly added to what I’d sent before? This is the root of my puzzlement. I haven’t added any macros to my documents, but don’t ignore the fact that a mouse click on certain functions executes an intended macro built in by developers. All I’m reporting is that the behavior is different now than what it was before.

At some stage the table has been styled with an Autoformat Style, this is not a style but a macro attached to the table that fires every time the table is changed. The only way to remove the macro is to remove the table. I don’t know what more to add except the advice to not use them unless you are expert in table styles or are willing to change the table style for every single table in a document if, for example, a different font is required in the document.
.
You can read more on styles in the Writer Guide and in the introduction to the book Designing with LibreOffice, download from LibreOffice Bookshelf
.
And of course the link that @Hrbrgr gave earlier which includes the following:

Teach me how to fish. What is the name of the macro you see being triggered, and what triggers it? I don’t see a macro in my document called “Autoformat Style” and I certainly didn’t create or add any macros. How do you see this information?

I have told you how to fix the table problem (how to fish).
I know the macro is there because I see its effects but I am not going to try and find where it lives because it is built into LibreOffice. The warning even says if you are using AutoFormat Styles you need to make changes to the AutoFormat Style, not by other means. I think you are putting your energy into trying to prove that AutoFormat style doesn’t exist in your document rather than simply fixing it.

1 Like

Thank you, that’s the answer. I don’t use AutoFormat Styles (not by choice, at least), and I don’t get a warning message about using them either, so that too is foreign to me. I appreciate the help.

Creating a table in Writer