Bug 63913 - WIN settings: default FILEOPEN 2 different ODF file type documents is "as templates"
Summary: WIN settings: default FILEOPEN 2 different ODF file type documents is "as tem...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
(earliest affected) release
Hardware: Other Windows (All)
: medium minor
Assignee: Naeil ZOUEIDI
Whiteboard: BSA target:6.0.0
: 76895 (view as bug list)
Depends on:
Reported: 2013-04-25 10:03 UTC by Benoit Lathiere
Modified: 2018-03-23 08:25 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

Schema to explain steps to the bug (84.79 KB, application/pdf)
2013-04-25 10:03 UTC, Benoit Lathiere
reg file to disable the creation of multiple documents when multi-selection (21.14 KB, text/plain)
2015-07-08 15:57 UTC, Maxime de Roucy
A workaround for this bug (1.01 KB, text/x-ms-regedit)
2017-04-25 09:40 UTC, Naeil ZOUEIDI

Note You need to log in before you can comment on or make changes to this bug.
Description Benoit Lathiere 2013-04-25 10:03:19 UTC
Created attachment 78454 [details]
Schema to explain  steps to the bug

Problem description: 
Openning two different types of files (ie : ODS and ODF) don't keep the original filenames.

Steps to reproduce:
1. in the Windows file Explorer, select 2 files with of diferent types (ie : titi.ODF & toto.ODS), and clich on Enter to open them together,
2. the name of each file is neither "titi.ODF" nor "toto.ODS" but "sans nom 1" and "sans nom 2" (French translation of something like "unnamed1" and "unnamed2"..),
3. if You modify a file and do "Save", the "Save as..." windows appears and You need to give a name, or replace the original !

If You test with two similary file types (ie: ODF & ODF, or ODS & ODS, ...), there is no problem. Original filenames are kept.

Current behavior:
- orginal filenames are not kept when You open diferent files in same time !

Expected behavior:
- original filenames are kept,
Operating System: Windows 8
Version: release
Comment 1 Rainer Bielefeld Retired 2013-04-25 11:29:30 UTC
I can reproduce the Effect with  "LibreOffice release " German UI/ German Locale [Build-ID: f969faf] {pull date 2013-04-03} on German WIN7 Home Premium (64bit): A document couple 1.ods and 2.odt will both be opened as "Unnamed" as reported. But that is not too unexpected because a rightclick after having selected both documents in WIN Explorer will show NEW as the action to be done with <Enter>.

But I can't reproduce that behavior with other programs (but only checked 2 other file type couples). 

So this might be the normal WIN Explorer behavior OR it's a problem with LibO Installation that it modifies WIN so that those couples will be used as _Templates_ instead of documents what should be opened.

Effect not visible when I open documents via OS Files dialog

Might be WIN and/or version related, not reproducible with LibO on Ubuntu11 (VirtualBox).

I think it's an installation bug, although I am not sure. I did not check with what version that "really" started
Comment 2 Benoit Lathiere 2013-04-26 08:44:42 UTC
Your analyse is correct.
"New" is the default action when You select two different files and do a right-click on them ; There is no "Open" action too.
I think the problem come from the installation process.
Comment 3 QA Administrators 2015-03-04 02:18:55 UTC Comment hidden (obsolete, spam)
Comment 4 Buovjaga 2015-03-22 12:20:24 UTC
Confirmed, still happens.

Win 7 Pro 64-bit, LibO Version:
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: fi_FI
Comment 5 Buovjaga 2015-03-22 12:22:15 UTC
*** Bug 76895 has been marked as a duplicate of this bug. ***
Comment 6 Maxime de Roucy 2015-06-10 15:07:10 UTC
The problem comes from the Windows registry (so from the LO installer). But it can't be solve without breaking another feature.

I did my tests with an ods and an odt file.

For what I understood only the "New" command is allowed when you select both the files because odt and ods have the same "New" command :
* "HK_CLASSE_ROOT\.odt" point to "HK_CLASSE_ROOT\LibreOffice.WriterDocument.1" where the "New" command is "HK_CLASSE_ROOT\LibreOffice.WriterDocument.1\shell\new\command = C:\Program…\soffice.exe -n %1"
* "HK_CLASSE_ROOT\.ods" point to "HK_CLASSE_ROOT\LibreOffice.CalcDocument.1" where the "New" command is "HK_CLASSE_ROOT\LibreOffice.CalcDocument.1\shell\new\command = C:\Program…\soffice.exe -n %1"

They don't have the same "Open" command :
* "HK_CLASSE_ROOT\.odt" point to "HK_CLASSE_ROOT\LibreOffice.WriterDocument.1" where the "Open" command is "HK_CLASSE_ROOT\LibreOffice.WriterDocument.1\shell\new\command = C:\Program…\swriter.exe -o %1"
* "HK_CLASSE_ROOT\.ods" point to "HK_CLASSE_ROOT\LibreOffice.CalcDocument.1" where the "New" command is "HK_CLASSE_ROOT\LibreOffice.CalcDocument.1\shell\new\command = C:\Program…\scalc.exe -o %1"

So when you select both file and hit Enter, the "New" command is selected (as it's the only one available) and LO register the file as Untitled1.odt and Untitled2.ods.

A simple workaround should be to change "HK_CLASSE_ROOT\LibreOffice.WriterDocument.1\shell\new\command" and "HK_CLASSE_ROOT\LibreOffice.CalcDocument.1\shell\new\command" to "C:\Program…\soffice.exe -o %1".

It works but the icon for odt and calc documents on the desktop (not on the file explorer) became the LibreOffice one (not the Writer or Calc anymore). I believe it's a Windows bug since the icon should depend on the DefaultIcon registry key for desktop and the file explorer : https://msdn.microsoft.com/en-us/library/windows/desktop/cc144175%28v=vs.85%29.aspx
Comment 7 Maxime de Roucy 2015-06-10 15:35:25 UTC
Do you think "multi-selection opening" is more important than documents icons on the Desktop ?
Comment 8 Maxime de Roucy 2015-07-08 15:57:24 UTC
Created attachment 117131 [details]
reg file to disable the creation of multiple documents when multi-selection

I attached a reg file that disable the "multi-selection opening".
If this patch is apply, when the user select multiple file of different type and hit Enter, nothing happen.
Comment 9 QA Administrators 2016-09-20 10:14:08 UTC Comment hidden (obsolete, spam)
Comment 10 Miguel 2016-09-21 16:28:12 UTC
Confirmed, still happens the bug.

Win 10 Pro 64-bit,
LibreOffice Versión: Id: 31dd62db80d4e60af04904455ec9c9219178d620
Locale: es-ES (es_ES)
Comment 11 Naeil ZOUEIDI 2017-04-24 09:29:58 UTC
Confirmed too under Windows 10 64 bits
LibreOffice Build ID: a3100ed2409ebf1c212f504_fbe377c281438fdc
Locale : fr-FR (fr_FR)
Comment 12 Naeil ZOUEIDI 2017-04-24 10:38:06 UTC
(In reply to Maxime de Roucy from comment #8)
> Created attachment 117131 [details]
> reg file to disable the creation of multiple documents when multi-selection
> I attached a reg file that disable the "multi-selection opening".
> If this patch is apply, when the user select multiple file of different type
> and hit Enter, nothing happen.

Hello Maxime :)

I tested your reg file and I got this as result:
When I select two files with 2 different types (ODT and ODS), let's say I selected ODT file as the 1st one then the ODS file, I hit enter it shows up a pop-up (like the pop-up when I do right-click on a file and click on "open with" then "Choose another application"). and it says "How you want to open this .odt file", if I choose LO Writer then press OK, it only opens the 1st file which is the ODT file. 
When I repeat the same steps mentioned but I select ODS file as the 1st one it opens the ODS file as expected. 
BTW, I didn't lose the icons of LO calc nor wirter.

I think this behavior is better than not doing anything.

Comment 13 Naeil ZOUEIDI 2017-04-25 09:40:20 UTC
Created attachment 132825 [details]
A workaround for this bug

Based on thoughts of Maxime, I did a workaround for this bug by just changing
"HK_CLASSE_ROOT\LibreOffice.WriterDocument.1\shell\open\command" and "HK_CLASSE_ROOT\LibreOffice.CalcDocument.1\shell\open\command" to "C:\Program…\soffice.exe -o %1".
I have attached the reg file, BTW I did not had any problems related to icons (in the destop and in the file explorer)

Comment 14 Naeil ZOUEIDI 2017-04-26 15:36:22 UTC

This is the patch[1] to keep the original names for two files with two different extensions. 

[1] https://gerrit.libreoffice.org/#/c/36995/

Comment 15 fvroman 2017-07-17 05:56:26 UTC
Polite ping: a patch is pending waiting for review.

Thanks all for your time
Comment 16 Commit Notification 2017-09-02 23:42:11 UTC
Naeil ZOUEIDI committed a patch related to this issue.
It has been pushed to "master":


tdf#63913 fix Win explorer multi-select open unnamed docs bug

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://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.
Comment 17 Adolfo Jayme Barrientos 2017-09-03 06:22:32 UTC
Thanks, Naeil, for your contribution!
Comment 18 Mike Kaganski 2018-03-23 07:38:00 UTC
The bugfix is wrong. It breaks the possibility to open certain filetypes (like .txt) using one of two available modules (like Calc or Writer) using the context menu. For those types, two "LibreOffice" elements are now displayed in the context menu, both pointing to generic action (opening with default filter, which - for .txt case - would be to open as plain text in Writer).

One could create another element (like "Open in Writer/Calc/etc") with the specific command line. That would allow to keep the fix, while still providing the choice. (But that would make the menu to still have multiple redundant elements - need to check if certain elements could be omitted in the Open With menu).
Comment 19 Mike Kaganski 2018-03-23 08:25:05 UTC
Just a clarification: my comment 18 wasn't intended to be rude; now that I revisit it, I see that it sounds harsh - please excuse about that: English isn't my native language. What I intended to say is that some change is necessary.