https://bugs.documentfoundation.org/show_bug.cgi?id=89286

--- Comment #3 from Patrick Smits <[email protected]> ---
Hi Cor,

I was wrong in my previous post, your suggestion actually is different from
what I meant. It only imports new styles in the document, but the attached
template (as visible in File/Properties/General tab  --> Template) remains the
same.

I'm looking for a way to assign a new template to a document, not just updating
the styles. Not only will all styles and formatting be loaded from that
template, but the document will also behave as if it was created using that
template. This has several advantages (explained below).

To test:
1. Create a template template_a.ott with the following information in
File/Properties/Description tab --> Title=Template A.
2. Create another template template_b.ott with the following information in
File/Properties/Description tab --> Title=Template B.
3. Open Writer and go to File/Templates/Manage. You're now in the Template
Manager.
4. Click on My Templates
5. Click on Import and import both template_a and template_b from where you
saved them.
6. Create a document based on Template A by double clicking on My Templates,
click on template_a  and  then Open.
7. Save this document as test.odt
8. Check in File/Properties/General tab  --> Template that it's based on
Template A.

Now change a style in template_a and save it again:

9. In Writer go to File/Templates/Manage and double click on My Templates.
10. Click on template_a and then Edit.
11. Make a random style adjustments via the Style and Formatting dialog and
save the template via File/Save.
12. Close Writer.
13. Open test.odt.

You'll notice that once you open the document you will get the following
message [[1], page 7]:

"The template 'template_a' on which this document is based, has been modified.
Do you want to update style based formattings acording to the modified
template?'

So one of the advantages of using templates is that it updates all documents
that are based on it. This is exactly what you would expect.

So far so good, but suppose you receive this document from somebody by mail and
want to give it the default look of your documents based on template_b?

As far as I can tell the only way to do this is by using the extension Template
Changer [2]. You can assign Template B to our test.odt by going to File /
Templates / Assign Template (current document) and use template_b. To verify
check File/Properties/General tab  --> Template.

If I follow your suggestion and 
14. Go to the dialog Styles and Formatting
15. click on the icon top right
16. Click-hold & click "Load Styles"
17. Click on template_b

the styles from template_b are indeed imported, but the document will still be
based on the same template_a that our original document was based on. To verify
check File/Properties/General tab  --> Template.

So yes, there is a difference. 

BTW, just yet, I noticed there already is a similar bug report in bug 60660
from 2013 on which you already commented. So this one actually is a duplicate.
However bug 60660 was closed as a RESOLVED DUPLICATE because it was supposed to
be a dupe of 50699, but it really isn't.

Another argument against closing this one is that the original developer of the
extension Template Changer has abandoned the extension, so bug 50699 will not
be receiving the attention it needs. I could fix it once, but I may not be able
to in the future. Besides that, I strongly believe this should be stock
functionality, not added via an extension. I hope the LO developers agree.



[1] Chapter 10: Working with Templates:
https://wiki.documentfoundation.org/Documentation/Publications#LibreOffice_Writer_Guide

[2] See comment 14 @ https://bugs.documentfoundation.org/show_bug.cgi?id=50699
to get the most recent version.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to