If your create your own template in Writer, creating a new text document from Win Explorer (Right click - New - Text document) creates a document which is not based on your new default template, but on a default empty soffice.odt file stored in
Steps to Reproduce:
1. create your own template (with some Numbering etc., or use my test_template, attached)
2. put it in some folder, make it default by LO-Writer.
3. try opening a new file from Windows Explorer (mouse right click - New - Text document Opendocument).
The new created empty file is NOT based on default template.
The new created empty file SHOULD BE based on default template.
User Profile Reset: Yes
OpenGL enabled: Yes
Windows registry stores the default soffice.odt for ShellNew in the registry key: Computer\HKEY_CLASSES_ROOT\.odt\LibreOffice.WriterDocument.1\ShellNew
You can create a new ODT file in Writer in 2 different ways:
1. LO - File - New
2. Win Explorer - right mouse click - New - Text document
For me as an user both possibilities of creating a new document should bring the same result (new document based on own default template).
A possible solution could be:
By each create/re-save of own default template (LO-File-Templates-Manage) LO should automatically rewrite the default file C:\Program Files\LibreOffice\share\template\shellnew\soffice.odt (as it is pointed by Win Shallnew registry key).
Important - the C:\Program Files\LibreOffice\share\template\shellnew\soffice.odt file should not be (in possible solution above) rewritten by an update of LO.
I do know know if it is possible to make it working on Win environment with more users as I do not know, if each user can use own (different) default template... If the proposed solution is not possible, another solution could be proposed:
- Each time LO opens a document based on the default C:\Program Files\LibreOffice\share\template\shellnew\soffice.odt a proposal for importing settings from the default template should appear and user could with one click import all settings from the default template.
I confirm it with
Version: 18.104.22.168 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
I'm pretty sure, that a similar bug has been reported before, but I couldn't find it
At least related to bug 133661, that should be fixed in LO 7.1
Mike, I think, you might be interested in this
*** Bug 148067 has been marked as a duplicate of this bug. ***
So now, after tdf#139991 is implemented, it allows to fix this trivially: make the shell's New command to create an *empty* (0-byte) file. LibreOffice would open such a file as a new document of type detected from extension only, using default template (if any) set for respective component.
For Windows, it implies:
1. Search for all occurrences of "shellnew" in the codebase;
2. In the SCP files found, replace respective "Name" from "FileName" to "NullFile", and "Value" from "<progpath>\share\template\shellnew\soffice.*" to "" (empty string);
3. Drop extras/source/shellnew/*.
There should be some similar way for Linux integrations (or, if unavailable, we would need to still provide 0-byte files under extras/source/shellnew/, instead of dropping them at #3 above).
As maybe simple solution, just making all those files under extras/source/shellnew/ 0-byte would be enough, without a need to modify anything else. That would automatically work for any Linux integration making use of the files, too.
The caveat is that the new way relies on special-processing the 0-based files, which are *not* proper ODF packages. MS Office uses the same technique; but if you open those files using a different application before editing and saving in LibreOffice, the results would be unexpected (just the same way as they were in LibreOffice before implementation of tdf#123476).
FTR: This is *not* "skillCpp"; I do not see a matching "skillAny" in the possible values ;) - so I'll keep what is set now :-D
*** Bug 150226 has been marked as a duplicate of this bug. ***
*** Bug 120141 has been marked as a duplicate of this bug. ***
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":
tdf#139962 make shellnew files 0-bytes
It will be available in 7.5.0.
The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
(In reply to Commit Notification from comment #8)
> Affected users are encouraged to test the fix and report feedback.
Don't know a way how to create a LODev file from desktop. So I think, have to wait for a RC of LO 7.5.
(In reply to Dieter from comment #9)
By default, dev (non-release) builds differ by WRITE_REGISTRY property value (they have it 0, while releases use value of 1). That means that installation doesn't write anything to registry, including the New shell registration.
You *could* use a command like
> msiexec.exe /i LODevDailySomething.msi WRITE_REGISTRY=1
to install it with all the registry data, but note that that would also conflict with the installed release version, which is why it isn't done by default.
Thank you for quick reply, but since I'm not familiar with registry entries, I don't want to change anything here.
Version: 22.214.171.124 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded
Laurent, thank you for fixing it!