Bug: Styles resets to Default

Help with installation and general system troubleshooting questions concerning the office suite LibreOffice.
Post Reply
john1320
Posts: 70
Joined: Mon Jun 12, 2017 8:22 pm

Bug: Styles resets to Default

Post by john1320 »

First of all, I want to ask moderators: is it ok to post questions about LibreOffice?

Now, the problem.

Yesterday I created a very simple ott template for my fresh install of LO (5.2.7.2, "still"). 1 page, 3 custom styles.

Next, today I reopened this template to rename my custom styles. After renaming, I saved and closed file. Everything seemed to be okay.

Next, 5 minutes later, I reopened it to make some another changes, and discovered, that some paragraphs changed their style from "Body" (one of my custom styles) to "Default Style":
styles_reset_bug.png
Moreover, now, if I open this template again and try to rename some styles, it wil be even worse. For example, if I open it and rename "Abstract Block" to "Abstract Block 2", the result will be:
styles_reset_bug2.png
And if I try to rename "Body" to "Body 2" the changes will be a slightly different.

Does anyone else faced with this bug?
Attachments
template.ott
(16.46 KiB) Downloaded 281 times
Last edited by john1320 on Thu Jul 06, 2017 11:01 am, edited 1 time in total.
LibreOffice 5.2.7 on Windows 7
User avatar
keme
Volunteer
Posts: 3738
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Bug: Styles resets to Default

Post by keme »

john1320 wrote:First of all, I want to ask moderators: is it ok to post questions about LibreOffice?
Yes it is. It clearlydimly says so in the page header (tiny lettering, white on light blue).
john1320 wrote:Now, the problem.

Yesterday I created a very simple ott template for my fresh install of LO (5.2.7.2, "still"). 1 page, 3 custom styles.

Next, today I reopened this template to rename my custom styles. After renaming, I saved and closed file. Everything seemed to be okay.

Next, 5 minutes later, I reopened it to make some another changes, and discovered, that some paragraphs changed their style from "Body" (one of my custom styles) to "Default Style":
...
I do not see that behavior with OpenOffice Writer. A few thoughts:
Do you save your document as a Writer file (.odt)?
In "Autocorrect options", see if you can disable "apply styles".
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
john1320
Posts: 70
Joined: Mon Jun 12, 2017 8:22 pm

Re: Bug: Styles resets to Default

Post by john1320 »

keme wrote:Do you save your document as a Writer file (.odt)?
The template was created from scratch and saved in OTT (not ODT) format. I don't saved it in DOC, also I haven't copied any text to template from DOC, from RTF, or from web pages.
keme wrote:In "Autocorrect options", see if you can disable "apply styles".
No, AutoCorrect doesn't make any difference. By the way, if I create the identical template again, it will work fine. There is some corruption inside this particular file, as I understand.

Also, the "resetting" occurs only in some paragraphs. Not in all. If I rename "Abstract Block", it will affect 1st gray box, but doesn't affect the table. If I rename "Body", it will be vice versa --- the replacement will affect the table, but not 1st gray box. Madness.

* * *

The bug appears only when you:
Step 1. Open template
Step 2. Rename one of the styles in the template
Step 3. Save template and close it.
Step 4. Reopen it.

So, to see the bug, you should close and then reopen file. I haven't tested it on OpenOffice, maybe it works fine.
LibreOffice 5.2.7 on Windows 7
john1320
Posts: 70
Joined: Mon Jun 12, 2017 8:22 pm

Re: Bug: Styles resets to Default

Post by john1320 »

Well, I discovered myself, that this bug occurs when I rename a style and press Ctrl-S (save) too quickly after renaming. Still, very bad.
LibreOffice 5.2.7 on Windows 7
mgroenescheij
Volunteer
Posts: 300
Joined: Thu Apr 23, 2009 10:19 pm
Location: Sydney Australia

Re: Bug: Styles resets to Default

Post by mgroenescheij »

The template was created from scratch and saved in OTT (not ODT) format.
Saving as .ott doesn't save it as a template.
Templates are maintained under File-> Templates ... Save
After saving you could set it as a default if needed.
AOO 4.1.5 on MS Windows 10 Professional & MacOS High Sierra 10.13.5
Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
john1320
Posts: 70
Joined: Mon Jun 12, 2017 8:22 pm

Re: Bug: Styles resets to Default

Post by john1320 »

mgroenescheij wrote:Saving as .ott doesn't save it as a template.
It does. OTT = ODF Text Document Template.
LibreOffice 5.2.7 on Windows 7
mgroenescheij
Volunteer
Posts: 300
Joined: Thu Apr 23, 2009 10:19 pm
Location: Sydney Australia

Re: Bug: Styles resets to Default

Post by mgroenescheij »

It does. OTT = ODF Text Document Template.
I know but you still have to save them in the template directory (See extract from the User Guide page 20)
https://www.odfauthors.org/apache-openo ... nload/file
Importing a template
If the template that you want to use is in a different location, you must import it into an Apache OpenOffice template folder.
To import a template into a template folder:
1) In the Template Management dialog, select the folder into which you want to import the template.
2) Click the Commands button and choose Import Template from the drop-down menu. A standard file browser window opens.
3) Find and select the template that you want to import and click Open. The file browser window closes and the template appears in the selected folder.
4) If you want, type a new name for the template, and then press Enter
AOO 4.1.5 on MS Windows 10 Professional & MacOS High Sierra 10.13.5
Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
Post Reply