Bug 125769 - Save as" offers .ott as default file type if you use a template to create odt-file from desktop
Summary: Save as" offers .ott as default file type if you use a template to create odt...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Desktop-Integration Templates Save
  Show dependency treegraph
Reported: 2019-06-07 08:47 UTC by Orwel
Modified: 2020-06-18 14:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

affected template (11.97 KB, application/vnd.oasis.opendocument.text-template)
2019-09-02 17:07 UTC, Orwel

Note You need to log in before you can comment on or make changes to this bug.
Description Orwel 2019-06-07 08:47:06 UTC
If you create in WIN10 a new .odt file from your template (I have not tested if default template is also affected) and you use the Save as command/button, you get a default offer from LO (in the Save as window that pops up) to save the file as template (.ott). This is strange, as if you do not notice it, you resave the file as a template. This behaviour is not present if you open a new file directly in LO (File/New file/Text document), which uses the same default template of yours and you use the command Save as. In this case LO offers you saving it as .odt file, which is correct.

Steps to Reproduce:
1. Create your own template (mine is located on the disk E: in my own directory,  LO is located on C: in the default directory).
2. In Win-Explorer create through right click/New a New text document (Open document), which is .odt.
3. Use Save as command 

Actual Results:
In the Save as window Lo offers to save the file as template (.ott) by default. See File type.

Expected Results:
In the Save as window LO should offer to save the file as text file (.odt) by default.

Reproducible: Always

User Profile Reset: Yes

OpenGL enabled: Yes

Additional Info:
Actual Version: (x64)
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: sk-SK (sk_SK); Calc: group threaded

May be there is something with the location of default path of templates, which is C:\Users\XXXX\AppData\Roaming\LibreOffice\4\user\templates
- I tested on this default installation of the user account (reseting it) - I used the original profile created by the installation of LO . There is no sub-directory named "template". The bug is present. Adding a empty directory "template" did not solve the problem.

I do not know, which version is affected as first.
Comment 1 Dieter 2019-06-07 09:07:09 UTC
I can't confirm this with

Version: (x64)
Build-ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 2 Orwel 2019-09-02 17:07:24 UTC
Created attachment 153819 [details]
affected template

my template using which causes the bug on my PC
Comment 3 Orwel 2019-09-02 17:08:36 UTC
Yes, I have still the same problem. I have installed 6.2.6 and:
1. My default registry key was changed (bug 94857) and the default template in the registry key was overwritten by LO. I tested the behaviour with the default LO template. The bug was not present.
2. I changed the registry key back to my template path on E:. Now the bug is present.

I have attached my default template.
Comment 4 Dieter 2020-03-02 18:21:58 UTC
Orwel, it seems, that nobody can confirm your bug. So let me ask, is it still present in the latest version. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 5 Orwel 2020-03-09 15:36:32 UTC
Thank you Dieter for commitment.

It is weird. Could it be something with my Windows installation? But i do not understand why, if it occurs in LO environment. 
The behaviour is still present, i tried (using Separate install GUI) The same behaviour.

Let me tell you some more specifications:
1. I thought maybe something wrong with my profile, but a default clear profile brings the same result.
2. I have a registry change for .odt file - \HKEY_CLASSES_ROOT\.odt\LibreOffice.WriterDocument.1\ShellNew - Default (DWORD) has the entry "E:\LibreOffice\templates\AKIB_normal.ott" and FileName has the same entry.
Disk E is a ext4 format (using by paralel Linux installation).

I tried to change the registry entry to point to a blank template from the fresh install of (copied to mentioned location, but also tried to copy it to disk D:) and point the registry value on the new path with the same result - behaviour is present.

If I change the registry value from AKIB_normal.OTT to AKIB_normal.ODT (created and saved from the .ott file), the behaviour is NOT present. So if i set the registry to create a new document in Win Explorer from a .odt file, everything works fine. Can this be the issue? But as I can remember, the value in WIN registry should point to a template (see my bug 94857) not to a .odt file, or am I wrong?

3. IMPORTANT: The described behaviour occurs only if I create a new odt document in Win10 (Enterprise) explorer (right click), and I open it directly from Explorer (double left click) and use Save as button in LO - I get an offer by LO-dialog to save as .ott. But, if I open the new created document directly from LO (Open file), the behaviour is not present - i get a .odt offer in LO Save as Dialog. It seems, the behaviour of my LO installation is not the same if you open a file directly from Windows Explorer and from LO Open a file dialog.

But I can understand, if nobody can reproduce it, it is strange and hard to work on it :(.
Comment 6 Dieter 2020-03-09 16:13:48 UTC
I just tried to reproduce it again. But when I open a new file from desktop, the new file doesn't use a template (although a standard template is defined).
Comment 7 Orwel 2020-03-09 17:58:07 UTC
I do not understand... in which way is the file created in your environment if not from a template? What is your registry value of HKEY_CLASSES_ROOT\.odt\LibreOffice.WriterDocument.1\ShellNew? 

I know, in Win this entry is crucial, as mentioned in the other bug.

I have just read the bug 94857 one more time...And now I probably know the problem (also i still think it is a bug). LO uses as default for creating new file probably the file "C:\Program Files\LibreOffice\share\template\shellnew\soffice.odt" - odt file not OTT file. Could you check your registry value?

But I think, if you open a template in any way, the Save as dialog should offer you to save the file as .odt or am I wrong?
Comment 8 Buovjaga 2020-06-18 14:28:30 UTC
Orwel: please help me: I don't have an entry for .odt in my context menu - New. I do have the registry entry

I tried researching the topic and found some utilities, but they were of no help.