[Solved] Changed template, and document keep old styles

Using them, Making them, Finding them
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

[Solved] Changed template, and document keep old styles

Post by Ponny »

I changed one of my templates *.ott.
But when I open document based on this template, I get dialog box with question: Do you want to update styles in document, or you want to keep uncahged?

I select "keep old styley" and save document.

But at next opening this document I get this question again: Do you want to update styles?
NO!!!!!

How can I do this to get rid of this question again and again at every opening this document?

OpenOffice is 4.1.10
Last edited by Ponny on Sun Nov 14, 2021 12:24 pm, edited 3 times in total.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Changed template, but document should keep old styles

Post by Hagar Delest »

It is the point of a template!
Either you accept the update, or you break the link with the template. I think that the extension template changer can do that. Else, it should be possible by removing the template value in the meta.xml file of the .odt file.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the *EDIT button if your issue has been fixed.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Changed template, but document should keep old styles

Post by Ponny »

Hm, maybe I not explained very good.
If I select option "Keep old styles" and then save changes,
at next opening still get this question
and in the file preferences stil exist this template.

Or another explanation:
1. Answer "No" to the question about updating styles.
2. Your document is now disociated from the template... Realy? No, I am afraid, it is not.

But this worked in some older version of OpenOffice, if I remember right. Why not in 4.1.10?

By the way, what is: the extension template changer?
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Changed template, but document should keep old styles

Post by Hagar Delest »

Ponny wrote:2. Your document is now disociated from the template... Realy? No, I am afraid, it is not.
Indeed, it does not. Why should it dissociate the template? It just keeps the styles are they are, that's all.
I don't see why it would worked in previous versions.

The template changer extension aims at changing the template on a document-base or a folder-base: https://extensions.openoffice.org/en/pr ... te-changer
I think there is an option to break the link but not 100% sure, just try.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Changed template, but document should keep old styles

Post by Ponny »

Oh, that means I have to answer NO every time I open the same file?
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Changed template, but document should keep old styles

Post by Hagar Delest »

Yes. Unless you break the link with the template (not that difficult once you know what to do).
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
Bill
Volunteer
Posts: 8937
Joined: Sat Nov 24, 2007 6:48 am

Re: Changed template, but document should keep old styles

Post by Bill »

It works for me using AOO 4.1.10 on Ubuntu MATE if I keep the old styles and save the changes. Breaking the link to the template is not required. The update question reappears only if I discard the changes when closing the document.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Changed template, but document should keep old styles

Post by Hagar Delest »

Well, it works indeed with LO on Xubuntu. Not sure how it works (have not investigated, maybe it sets the template date in the meta.xml to the date the document is saved).
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Changed template, but document should keep old styles

Post by Ponny »

How can I break the link between file and template with tool Template Changer template?
I installed Tempplate Changer, use it, select the same tempalte as already connected, and do it.
Then I get empty file. All file content is gone.
Test 2: I select different template and do it. I get empty file with connected template, just like test 1.
Well, then I removed this enxtensino.

The moral of this fairy tale is: Template Changer is useless for me.
Or maybe..... If this work in LibreOffice. I mean, breaking the link between file and template, just with built in functions.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Villeroy
Volunteer
Posts: 31283
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Changed template, but document should keep old styles

Post by Villeroy »

With LibreOffice and AOO on my Linux laptop:
1) File > New> From Template: "Contract"
2) Save As: Test.odt
3) Open "Contract" template for editing.
4) Change font attribute of some para style.
5) Save and close tempate.
6) Open Test.odt and answer the question with "No". The document becomes "dirty". Some data changed without editing.
7) Save and close modified Test.odt
8) Reload Test.odt. No questions asked.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Changed template, but document should keep old styles

Post by Hagar Delest »

Ponny wrote:How can I break the link between file and template with tool Template Changer template?
I just tested and you need to go go the menu File > Templates > Change template (current document) and then the last entry: cut link to template. The result is that there is no more template listed in the file properties.

I also tested with the portable version of AOO 4.1.10 on my Windows machine and it works as expected: once the file is saved after having denied the styles update, the question does not come back indeed. I think I remember being in the same situation than OP in a previous version of AOO. Maybe I wasn't saving the file after all. Not sure anymore. :crazy:

But that doesn't explain the issue with AOO 4.1.10 for OP...
Are you sure you do save the file? Note that to be actually saved, you have to make a change (type a space and delete it, not using undo).
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Changed template, but document should keep old styles

Post by Ponny »

I made test now.
File with this problem saved as new name - for test purpose only.
Close OpenOffice and star it again.
Open this test file. Then:
1. Get this question and select "keep old styles"
2. Get status "file changed"
3. Save file
4. Make some changes
5. Save again
6. Look at File / Properties and see, Template name is stil here; Template: Matic - Bsitream Vera

I remember, few years back, in this case, the template name was dissapeared from here. And then I should get like this:
Template:
Empty.

Should I transfer my work to LibreOffice?
Last edited by Ponny on Sun Oct 03, 2021 7:51 pm, edited 2 times in total.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Villeroy
Volunteer
Posts: 31283
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Changed template, but document should keep old styles

Post by Villeroy »

Ponny wrote:Should I transfer my work to LibreOffice?
There is not so much to transfer. LO is the successor to OpenOffice. It is almost the same software producing almost the same document files.
Copy any Basic macros and import your templates, auto-text, dictionaries from one user profile to the other.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Changed template, but document should keep old styles

Post by Ponny »

I forget this. Another test, I made.
But I can't find command File / Templates / Change Template.
There is only
Organise
Source Adress Book
Save
Edit
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Changed template, but document should keep old styles

Post by Hagar Delest »

See (LibreOffice):
Template changer.png
I made some tests and I think I found how it works. There is a setting for the template comparison operation in the settings.xml file: <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
When you click the keep old styles button, this parameter is switched to false. Thus, it will no longer check the template, ever. Meaning that whatever change you do on your template afterward, you won't have the possibility to update again that file accordingly. Unless you link it again of course.
The takeaway is that you can't decline the update thinking that you'll be able to update the styles later at a future template update.
 Edit: 13-NOV-2021: well, unless you use the extension to reactivate the link to the template. 
Ponny wrote:[...]
6. Look at File / Properties and see, Template name is stil here; Template: Matic - Bsitream Vera
Yes, you have just asked AOO/LO not to check again, you've not cut the link with the template.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Changed template, but document should keep old styles

Post by Ponny »

This your screen picture is perhaps with installed Template Changer Extension.
This ext at me produce empty file connected to selected template.

But I installed Libre Office portable for testing purpose.
And trick, when answering NO, keep old styles; then save file, works there. At next open file is no question more.
I not undestand, why this is not happend with Open Office.
By the way, in Libre Office info about connected template is not deleted, if you saj NO about updating styles.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Changed template, but document should keep old styles

Post by Hagar Delest »

I've already used the template changer extension and there is no way it can wipe out a file on its own.

As I said, there is no "cut" link out of the template changer extension (it will delete the meta info about the template, thus giving a blank field).

AOO/LO keep the name of the template (it may be useful) BUT it will deactivate the template update (when answering no to the question at opening). There is no actual need of deleting the template name if the update feature is disabled.

Note that it worked with the test I made with the portable version of AOO 4.1.10 on my Windows 10 machine, there may be something specific to your machine (maybe linked to the issue when using the template changer extension).

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the *EDIT button if your issue has been fixed.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: [UNSOLVABLE] Changed template, and document keep old sty

Post by Ponny »

I think, it is time to leave Open Office and start using Libre Office.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [UNSOLVABLE] Changed template, and document keep old sty

Post by Hagar Delest »

Then it's solvable, isn't it?
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Update styles or keep old styles

Post by Ponny »

I made few tests
In OpenOffice 4.1.11 at opening I answer "keep old styles and save.
But then ask me again, and again, and again.....

I tried LibreOffice 7.1.6 portable.
There this info is saved and program ask me just once.

Then I installed LibreOffice 7.1.7.2 full version.
And then again not save, but ask about styles again and again and again.....
What for god sake I am doing wrong?
Because, I am sure, I doing something wrong.
If this happend only in one program, then maybe the error is in this program.
But if happend in two programs, I am sure, the error is not in both.
And I am sure, the portable version should work the same way as full version.
There is in fact no the exactly same number versino for portable and full.


If anybody know, what I am doing wrong, please tell me.




Ponny
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Update styles or keep old styles

Post by Ponny »

Just now I made another test. And shock!
Libreoffice portable absolutely not ask question: do you want to update styles, or keep old styles?
Not at all.
What happend doc?

Ponny
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Update styles or keep old styles

Post by Hagar Delest »

For the record, this is a continuation of: Changed template, and document keep old styles.

I guess that it needs a detailed investigation with comparison of the meta.xml files of both documents.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Update styles or keep old styles

Post by Ponny »

I sent this other question. You should say now I am stupid.
I tried to continue post in this first topic. But simply I can't fint it today. I don't know why.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [UNSOLVABLE] Changed template, and document keep old sty

Post by Hagar Delest »

I've merged the topics. You can access your posts with the link View your posts top of page, below the forum logo.
Your problem is not that easy.
Does it occur for rather new or old files? It may be a settings in former files that stick and cause problems.
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: [UNSOLVABLE] Changed template, and document keep old sty

Post by Ponny »

In many cases in old files based on the same template. But in some cases also in new files.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Hagar Delest
Moderator
Posts: 32691
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: [UNSOLVABLE] Changed template, and document keep old sty

Post by Hagar Delest »

Can you share a file for which it does occur and another one for which it does not?
LibreOffice 24.2 on Xubuntu 24.04 and 7.6.4.1 portable on Windows 10
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Changed template, and document keep old styles

Post by Ponny »

Feder.odt produce eternal questions,
but Afrika.odt not.
That's it I think.
Attachments
Afrika.odt
Stupid details
(24.89 KiB) Downloaded 585 times
Feder.odt
meow
(31.61 KiB) Downloaded 594 times
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
RoryOF
Moderator
Posts: 34633
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Changed template, and document keep old styles

Post by RoryOF »

For what it's worth, Fedor.odt is based on Template Matic - Bistream Vera, whereas Afrika.odt is not based on any Template. Open /File /Properties, General Tab, and you will see the Template used named at the bottom.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Changed template, and document keep old styles

Post by Ponny »

Yes, I believe you.
The most important thing is, how to make connected template inactive.

You know, in Microsoft Word 6.0 - almost 30 years ago, you can select attached template, change attached template in any moment.
And.....
Make attached template active or inactive at every time, you want.

Aha, I almost forgot. I upgraded OpenOffice from 4.1.10 to 4.1.11 yesterday. Is this fact change any thing?
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
Lupp
Volunteer
Posts: 3556
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Changed template, and document keep old styles

Post by Lupp »

I took the opportunity to sketch a few lines of related user code.
If interested, you may visit viewtopic.php?f=21&t=106530.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Post Reply