Bug 60592 - Template Changer: Can no longer assign document to different template, extension will not work
Summary: Template Changer: Can no longer assign document to different template, extens...
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other All
: high enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 60989 71746 (view as bug list)
Depends on:
Blocks: Templates
  Show dependency treegraph
 
Reported: 2013-02-10 13:08 UTC by Mirosław Zalewski
Modified: 2023-02-16 16:14 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
New version of Template Changer (151.72 KB, application/vnd.openofficeorg.extension)
2014-07-18 13:01 UTC, Patrick Smits
Details
Adapted to the menu layout changes in Libreoffice 5.2 (150.54 KB, application/x-zip-compressed)
2016-10-17 17:39 UTC, Patrick Smits
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mirosław Zalewski 2013-02-10 13:08:34 UTC
In LibreOffice 4.0.0 it is no longer possible to assign current document to different template.

In LO 3.6 and earlier we had two options:
- copy styles from template to current document → regression reported as https://bugs.freedesktop.org/show_bug.cgi?id=60589
- use Template Changer extension (http://extensions.libreoffice.org/extension-center/template-changer). Due to removal of File → Templates menu item, this extension no longer works (perhaps it can be invoked from Macro window, though).

We are left only with "Load styles" option in Stylist, but it is available only for Writer (no Calc and Draw; Impress has it's own Master Slides import tool).

What would be great is new button in File → Properties → General tab. At the bottom of this window is "Template" field. On it's right could be button "change template" which would fire up new template manager. After selecting template, document would be assigned to it.

Best regards
Mirosław Zalewski
Comment 1 Cédric Bosdonnat 2013-02-11 09:13:27 UTC
We are not responsible for extensions maintenance. Please contact the maintainer to have the extension updated (or fix it yourself).

On the LibreOffice side, this is an interesting enhancement I was planning for later (not related to template manager though)
Comment 2 Rainer Bielefeld Retired 2013-02-11 09:56:32 UTC
Ah, I did not read that detail in original report " ... extension no longer works"

So this one should be changed
Comment 3 Rainer Bielefeld Retired 2013-02-11 10:09:41 UTC
@Mirosław Zalewski
Can you please add versions you tested successfully with this extensions in a comment on Extensions Repository?
Please submit a separate bug if there is an other problem not related to the extension.

@André:
Are you planning to contribute an update for this Extension?
Comment 4 Mirosław Zalewski 2013-02-11 12:50:44 UTC
Template Changer extension does not work due to two changes in 4.0.0:
- removal of Files → Template menu (extension has nowhere to register it's items)
- removal of XDocumentInfo API, which it uses.

Running extensions Main function from Macros window ends up with error message: "Could not find property or method: DocumentInfo" 
(actual message may be a bit different, because I had to translate it from Polish).

I have created enhancement request for ability to change template of current document:
https://bugs.freedesktop.org/show_bug.cgi?id=60660

I have also posted comment on extension page:
http://extensions.libreoffice.org/extension-center/template-changer/#1360586646
Comment 5 Cédric Bosdonnat 2013-02-11 15:16:04 UTC
(In reply to comment #4)
> Template Changer extension does not work due to two changes in 4.0.0:
> - removal of Files → Template menu (extension has nowhere to register it's
> items)
> - removal of XDocumentInfo API, which it uses.
> 
> Running extensions Main function from Macros window ends up with error
> message: "Could not find property or method: DocumentInfo" 
> (actual message may be a bit different, because I had to translate it from
> Polish).

This is because the extension uses the deprecated XDocumentInfo interface. Again, this is work to be handled on the extension side.

Closing the bug as there is a separate enhancement request for the Template change and the rest is only for an extension update.
Comment 6 André Schnabel 2013-02-11 22:33:53 UTC
I hardly have time to take care - but actually the extension is LGPL.

Information to start a change from the extension website comments:

--
 XDocumentInfo removed

The deprecated XDocumentInfo and related UNO interfaces were removed (core commit e6f81b1898a59280f41177206b777a7a0d32f3fc). The replacement XDocumentProperties is available since OpenOffice.org 3.0 (interface announcement).

    com.sun.star.document.DocumentInfo
    com.sun.star.document.StandaloneDocumentInfo
    com.sun.star.document.XDocumentInfo
    com.sun.star.document.XDocumentInfoSupplier
    com.sun.star.document.XStandaloneDocumentInfo
--

The missing Files - templates menu should be a minor issue (just pick another menu node to plug in)
Comment 7 Cor Nouws 2013-03-04 23:15:26 UTC
*** Bug 60989 has been marked as a duplicate of this bug. ***
Comment 8 László Németh 2013-06-14 13:47:10 UTC
This beta release contains the necessary fixes for LibreOffice 4.0. The menus have been moved to File » Send: http://numbertext.org/tmp/template-changer-1.2.7b.oxt
Comment 9 Stanislav Horacek 2013-11-18 19:36:09 UTC
*** Bug 71746 has been marked as a duplicate of this bug. ***
Comment 10 Jan Kirchner 2013-11-20 11:42:21 UTC
The version 1.2.7b tested on LO 4.1.1.1 and 4.1.2.3 and works fine.
The only issue is that the menu is in a wrong place (Send to...)
Comment 11 Patrick Smits 2014-07-18 13:01:16 UTC
Created attachment 103039 [details]
New version of Template Changer

New version of Template Changer that resides under Files/Templates.
Comment 12 Patrick Smits 2015-02-09 13:41:58 UTC
Since LibreOffice 4.4  Template Changer stopped working.
Comment 13 Wiebe van der Worp 2015-03-08 11:35:23 UTC
4.4.1.2 ppa Xubuntu 14.10: attachment 103039 [details] works.
Comment 14 Patrick Smits 2015-03-08 19:38:52 UTC
@13 True. It was an error in my profile. Deleting my profile fixed it for me. I'm sorry for  not reporting it back here. So template-changer-1.2.7c.oxt works with version 4.4.0 and 4.4.1.
Comment 15 Wiebe van der Worp 2016-09-28 07:26:20 UTC
@Patrick, @André

People are still pointed to http://extensions.libreoffice.org/extension-center/template-changer and that version does not work. 

http://bugs.documentfoundation.org/attachment.cgi?id=103039 works fine, is it possible to publish it at extension-center?
Comment 16 Patrick Smits 2016-10-17 17:39:10 UTC
Created attachment 128049 [details]
Adapted to the menu layout changes in Libreoffice 5.2

Commit 384c75b7e8b50a64a1c0e8fd1ffef1350e2522d2 by Akshay Deep on June 11th changed the menu layout a bit. That's why I created a version 1.2.6d to reflect these changes. I guess it's a matter of personal taste, but I feel these menu options are better suited below "Manage Templates".
Comment 17 Patrick Smits 2016-10-17 17:40:43 UTC
Uhmm version 1.2.7d it is.
Comment 18 Al Maloney 2016-10-20 19:51:23 UTC
(In reply to Patrick Smits from comment #17)
> Uhmm version 1.2.7d it is.

Using LO 5.2.3 on Mac OS X 10.11.6

I cannot install this extension because of Bug 99784.

Al Maloney
Comment 19 Smith Kennedy 2017-02-01 17:34:10 UTC
It isn't clear to me the appropriate place to report defects found with the Template Changer extension v1.2.7d or others. Patrick, are you now the maintainer?

(This functionality should be part of the core LibreOffice, rather than requiring an extension...)
Comment 20 Patrick Smits 2017-02-04 11:50:51 UTC
Hi Smith Kennedy,

Andre was the author of the extension, I merely fixed some bugs that were related to where the extension was located in the File-menu. That's why I didn't change the copyright notice. I will keep fixing things as long as I can. 

I do agree though, that this should be in LibreOffice by default.
Comment 21 Patrick Neve 2017-03-05 23:23:42 UTC
@Patrick: Do you know if 1.2.7d works with AOo 4.x?  I'm on the verge of moving to Libre Office as my MS Office alternative but am loathe to risk existing documents (am very risk-averse).  Am installing Lo today in any case.

I agree that this should be part of Lo (AOo folks call it Trivial... sigh) but if the extension works I'm happy.
Comment 22 Thomas Lendo 2018-04-19 09:23:11 UTC
(In reply to Patrick Smits from comment #16)
> Created attachment 128049 [details]
> Adapted to the menu layout changes in Libreoffice 5.2
Patrick: Since I updated to your version 1.2.7d I encounter the problem that the chapter numbering is set back to 1 after assigning a template. Chapter (outline) numbering should be ignored with the template changer as it's not part of a style.
Comment 23 Gerhard Weydt 2020-06-12 21:32:09 UTC
There's a new extension "DocumentTemplateChanger" (published more than a year ago) which should be able to replace this one. Unfortunately, it's not to be found via a search in the new extensions site (though it was there in the old one), I hope temporarily. I can send it to you directly, point at my name to see my mail address and sent me a message.
Comment 24 Gerhard Weydt 2023-02-16 16:14:56 UTC
The Extension "Document Template Changer" has been moved to the originl name "Template Changer":
https://extensions.libreoffice.org/en/extensions/show/27416

It had been there for a while, but it had vanished and has now been reloaded.