Moving document over versions

I was having the exact same problem as described in Bullet indenting problem but this is 2024 and that answer is from 2019. I don’t even have the same tabs mentioned there (e.g. there’s a “Indent & Spacing” tab instead of everything under “Position”). The document in question was started around 2006ish… and being edited all this time (conservatively. only paste as plain text, using styles, etc. all the recommended best practices)

Basically, I had one paragraph style that behaved fine. it had “before text indent: 0.49cm; after text indent: 3,36cm”… i was editing it and if I had the “properties” panel open, moving the cursor to those paragraphs would show those values on the UI.

Yet, as soon as I added a bullet, the right would shoot out and the properties dialog would show “after text indent: 0”.

I went to double check my paragraph style, and it wasn’t inheriting indents at all, and the Indent & Spacing tab showed “After text indent: 0”. yet, it was still working on the document just fine. The paragraph style had 0, but in practice i could see 3,36cm right border.

So, my question is, which other oddities can show up when editing a file from an older version? and is there any tool/process to look for those before they cause problems? or a way to “force a refresh” or something?

For now i’ve found this one. And it was annoying to track down but had an easy work around (just had to add the indents i saw in the properties panel back into the paragraph style and everything fell into place) but i’m afraid how to deal with this at scale now. we use lots of documents that are edited for years around here!

You complain about a 2019-answer while we’re presently 2024, but you didn’t mention OS name, LO version and save format so that we can see what is different from then.

Basically, the 2019-answer is still valid. The key point is: as soon as you add a list style to any paragraph, the list style takes ownership of the left and first line indent. The settings in the paragraph style are no longer effective to control these indents.

Indents & Spacing is a tab in paragraph style configuration while Position is a tab of list style.

Your problem is complicated by the fact that your document is edited over and over. Long-term document maintenance requires they are formatted with styles instead of direct formatting (DF) because DF records individual settings at each occurrence. Styles store a single instance of the settings which are then shared by all occurrences. This has two consequences: file is way smaller; you can reformat your document without having to go over each occurrence.

When you right-click and select Paragraph or Character, you’re creating DF and begin to mess up your document. Format>Bullets & Numbering is another form of DF, even worse than others because it is a “convenience” compatibility feature to mimic the badly-designed one in Word. It is tweaked to cope with this bad design for those users who don’t read documentation.

But you are probably now prisoner of your earlier design. The way to make indent adjustment is to put your cursor in your list item and Format>Bullets & Numbering. Then go to the Position tab to adjust your indents and also bullet position.

Since your list were created with DF, you may have to do this adjustment on several items because Writer can’t guess with certainty where the list starts and ends. Editing history may have brought its perturbation.

You mention your document was started around 2006. I fear you saved it .doc, meaning it goes through a conversion upon loading and another conversion upon save. In the end, these conversions have a very bad cumulative effect where the logical document structure is completely damaged.

Even if this looks like a huge task, I highly recommend that you take the time to style completely your document exclusively with styles (and all styles categories: paragraph, character, page, frame and list), totally eliminating DF. Of course, save .odt. Best starting point is to paste all your text as unformatted in a blank document to make sure no Word fossil remains lurking in the background.

And if you have several similarly looking document, this redesign work can be done on a single one, serving as a test bench. When you’re satisfied, make a copy, erase contents (keeping only styles) and make it a template. Then you can re-style rather quickly the other documents from a blank based on the template (still pasting unformatted text in it). Don’t forget to rebase also your initial document on the template.

When documents are based on a template, style changes in the template are automatically forwarded to dependent document on open.

thanks for the detailed comment. To clarify something that was only in my mind, when i said “following all the recommended best practices” i meant it: no custom styling, only global styles. No incompatible format, it was always ODF. etc.

when editing the style it would show 0 for some value, but it would behave in the document as if it were set. Meaning: i could type a new paragraph, apply the style that have “after text indent: 0”, and I would see it apply “after text indent: 3.36cm” which is what was on the style originally! …and it would work just fine, until I pressed the bullet point button (it is the only exception we have to using global paragraph styles. you can toggle bullets ad-hoc, and that’s it. and it normally works fine, but this time it highlighted the issue with the style missing information that shouldn’t even be affected by enabling bullet points.)

Best starting point is to paste all your text as unformatted in a blank document to make sure no Word fossil remains lurking in the background.

this is exactly my fear. it is what i’ve done now (well, close to it. i just re-edited all the styles). But if it happens on several documents, then it is an archive nightmare!

This smells like direct formatting interferes with your styling. If you can’t spot it, send me your document through private mail.

I got an older version of the file that haven’t been edited since 2016.

i extract the odt file and look into content.xml and I can see:

<style:style style:name="P6" style:family="paragraph" style:parent-style-name="Text_20_body.descricao">
<style:paragraph-properties
 fo:margin-left="0.487cm"
 fo:margin-right="3.355cm"
 fo:line-height="100%" fo:text-indent="0cm"
 style:auto-text-indent="false"/></style:style>

that P6 style is applied to all the paragraphs in the text. And is applied to new ones… how can this happen with direct formatting? so weird. I would expect tons of different Pn styles because there are too many tweaks into that single one. this hardly happens when manually formatting.

the style it inherits from is from the original template those files were created from. could older version have stored local paragraph style changes like this if they were using a template, and now they are treated as direct on this version?

Is there anything on the GUI to show/clean up direct formatting? or better yet, something i could add as a pre-commit hook on git?

Attach your faulty file for analysis or, if you think it is confidential/private, attachit to a private email.