Bug 45735 - Automatic check at start-up whether LO is default program for ODF-file formats
Summary: Automatic check at start-up whether LO is default program for ODF-file formats
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: File-Association
  Show dependency treegraph
 
Reported: 2012-02-07 04:06 UTC by gleppert
Modified: 2019-06-11 08:16 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gleppert 2012-02-07 04:06:08 UTC
Problem decription: Since Microsoft Office 2010 is being widely deployed in many offices, a particular problem comes up regarding all ODF-file formats. At installation, MS Office 2010 registers itself as default programmes for ODF-file formats. However, they do not fully support the ODF standard. This is a particular problem with Excel, since it can open .ods files, but cannot save formulas. The changed and returned document is simply *useless* if the changes have been done in MS Office. Almost always, the respective persons had OpenOffice/LibreOffice installed on their computer, but they were opening the file with a double click (which opened MS Office and not LO). 
The ultimate result is that *the ODF file formats cannot be used anymore in data exchange*. In my opinion, this is a severe issue.

Request / Solution: Please add an automatic check at start-up of LibreOffice, to check whether LO is the default programme for all ODF file formats and give the user the option re-register LO as default programme.
Comment 1 sasha.libreoffice 2012-05-15 06:11:01 UTC
Thanks for new idea. In short:
Needed option something like "Make LibreOffice default program for odf files" that appears only if odf files (odt, ods, odp) assigned to another program.
Comment 2 gleppert 2012-05-15 12:21:26 UTC
Thanks Sasha, that's the perfect short summary.

I am almost inclined to increase the importance from medium to high, because the probem very frequently occurs that people send me back in-Office-2010-changed-and-almost-destroyed files, although these people have LibreOffice installed.
Comment 3 sasha.libreoffice 2012-05-16 02:02:49 UTC
@ Andras
What do You think about this feature?
Comment 4 Andras Timar 2012-05-16 09:33:40 UTC
(In reply to comment #3)
> @ Andras
> What do You think about this feature?

Good idea, but I don't think I'll have time to implement it in the next few weeks. It should be hard, we could insert a Windows-only code somewhere at startup, that pops up a dialog, like e.g. Firefox does when it is not the default browser.

/--------------------------------------------------------------\
|                                                              |
| LibreOffice detected that it is not the default handler of   |
| OpenDocument file format. Would you like to restore file     |
| associatiatons?                                              |
|                                                              |
| [ ] Do not ask again.                                        |
|                                                              |
|               [Yes]                     [No]                 |
|                                                              |
\--------------------------------------------------------------/

Startup code is in desktop module. I can mentor this easy hack.
Comment 5 gleppert 2012-08-02 07:58:38 UTC
Dear developers, dear Andras, 

I really don't want to get on anybody's nerves ;-) when reiterating the importance of this enhancement. 

The fact that a double-click on ODF files opens MS Office instead of LibreOffice on Windows already screwed up many ODF documents here and always results in lots of extra-editing work. Although I know that all my counterparts have LibreOffice or OpenOffice installed, I must revert back to send them .doc and .xls to not generate problems for myself.

If such a feature were there, I would only tell them to do once Open With -> LibreOffice and that would restore the file associations correctly.

Thanks a lot!
Comment 6 gleppert 2013-02-05 17:45:45 UTC
Please, can anyone look into this enhancement request? Today, I lost again a few hours of work, because someone opened the Calc file that I had sent him by double-clicking on it in Excel. Excel 2010, of course, destroyed all formulas in the file. 

LibreOffice is installed on his computer and is also frequently used by him, but Microsoft Office took over the ODF file formats / Mime types. This move by Microsoft is a major threat to the success of ODF!

Thanks in advance!
Comment 7 Björn Michaelsen 2013-10-04 18:47:39 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 8 Robinson Tryon (qubit) 2015-12-13 10:58:06 UTC Comment hidden (obsolete)
Comment 9 Mohammed Abdul Azeem 2016-01-14 13:00:51 UTC
Hello,
I would like to work on this.
Please help me through this. I did a bit of searching and found that it can be done by adding registry entry. http://stackoverflow.com/questions/1387769/create-registry-entry-to-associate-file-extension-with-application-in-c
I need some assistance in where exactly I should add this code to registry modification.

Thank you :)
Comment 10 Robinson Tryon (qubit) 2016-02-18 14:51:50 UTC Comment hidden (obsolete)
Comment 11 krishna keshav 2016-06-13 20:57:32 UTC
Hello,
I would like to know if someone is already working for the bug.If not, I would like to work on this as a project.
Comment 12 abhilash300singh 2016-09-02 19:00:38 UTC
I can't confirm this, as I don't have MS Office. Does this problem still exist? Can we have some code pointers? Comment 9 does help a little, but still, we need code pointers. From what I see this bugs look pretty important.
Comment 13 Andras Timar 2016-09-03 11:30:12 UTC
You need to display a modal dialog at application startup. See how to display a modal dialog at desktop/source/app/cmdlinehelp.cxx. I think you can insert your code after CheckFirstRun( ); at desktop/source/app/app.cxx. You need to test your code from Windows XP SP3 to Windows 10. File associations may work differently.
Comment 14 abhilash300singh 2016-09-04 02:48:26 UTC
@Andras, that helps a lot. Can you also tell me the way to generate that "cmdlinehelp.cxx" modal box inside LO, so that I can relate to things visually. Thanks.
Comment 15 jani 2016-09-04 07:38:59 UTC
change status to ASSIGNED
Comment 16 Andras Timar 2016-09-04 08:19:13 UTC
(In reply to abhilash300singh from comment #14)
> @Andras, that helps a lot. Can you also tell me the way to generate that
> "cmdlinehelp.cxx" modal box inside LO, so that I can relate to things
> visually. Thanks.

On  Windows only:
    soffice.exe --help
Comment 17 abhilash300singh 2016-09-28 03:41:13 UTC
I'm leaving this because I can't get LO to build on Windows. I've tried several times following the wiki, but some problem always seems to pop up. I might try this in future.
Comment 18 jani 2016-11-21 07:14:14 UTC
Unassigning
Comment 19 Piyush Palawat 2018-02-22 00:09:13 UTC
@Andras

I would like to take up this task. But I am a beginner, and may need some help regarding this. Please let me know if you are willing to do so.

Thanks in advance!
Comment 20 Fady Essam 2018-03-01 22:40:51 UTC
i would like to work n this as my first easy hack.. wish me luck :)
Comment 21 Xisco Faulí 2018-03-02 09:21:54 UTC
(In reply to Fady Essam from comment #20)
> i would like to work n this as my first easy hack.. wish me luck :)

Thanks for working on this issue.
In case you have any question, please use the IRC channel #libreoffice-dev on freenode
Comment 22 Buovjaga 2018-03-03 18:26:12 UTC
Fady found this and shared on IRC: https://social.msdn.microsoft.com/Forums/office/en-US/b3146d10-4923-48ba-9578-ecd239356be4/how-to-programmatically-set-file-associations-in-windows-10?forum=windowsgeneraldevelopmentissues
There is nothing we can do, so closing.

Correct status would be CANTFIX
Comment 23 Gerry 2018-03-04 09:57:34 UTC
I felt free to reset this bug to NEW.

This information in a Microsoft forum does not seem to me to proof that setting file type associations by applications are impossible starting with MS Windows 8.

I have several questions doubting this statement in the Microsoft Forum:

(1) Is the LibreOffice installation tool able to associate ODF files with LibreOffice? I think the answer is yes.

(2) Does the bug still exist on Windows 10? Can anyone reproduce the issue that MS Office registers itself for ODF file types (and unregisters existing file associations of LibreOffice for ODF file types)?  

(3) If the answer is "yes" to (1) and (2), then there must be a programmatic solution to this bug.
Comment 24 Fady Essam 2018-03-04 10:01:33 UTC
(In reply to Gerry from comment #23)
> I felt free to reset this bug to NEW.
> 
> This information in a Microsoft forum does not seem to me to proof that
> setting file type associations by applications are impossible starting with
> MS Windows 8.
> 
> I have several questions doubting this statement in the Microsoft Forum:
> 
> (1) Is the LibreOffice installation tool able to associate ODF files with
> LibreOffice? I think the answer is yes.
> 
> (2) Does the bug still exist on Windows 10? Can anyone reproduce the issue
> that MS Office registers itself for ODF file types (and unregisters existing
> file associations of LibreOffice for ODF file types)?  
> 
> (3) If the answer is "yes" to (1) and (2), then there must be a programmatic
> solution to this bug.

yes it can be set programatically during installation but as far as i know not after that.. for the last 2 days i have attempted to do it and everytime i write over the extention registery in HKEY_CURRENT_USER the windows wrtes back its default over it (windows 10)
Comment 25 Thorsten Behrens (CIB) 2018-03-04 17:53:48 UTC
(In reply to Gerry from comment #23)
> I felt free to reset this bug to NEW.

Yeah, so from that link, it should still be possible to assign another application - by calling IApplicationAssociationRegistrationUI::LaunchAdvancedAssociationUI (which requires the user to sign-off on that action)
Comment 26 Xisco Faulí 2018-04-05 02:40:36 UTC Comment hidden (obsolete)
Comment 27 Xisco Faulí 2018-05-06 02:28:39 UTC Comment hidden (obsolete)
Comment 28 Xisco Faulí 2018-06-06 02:44:04 UTC Comment hidden (obsolete)
Comment 29 Xisco Faulí 2018-07-07 02:37:29 UTC Comment hidden (obsolete)
Comment 30 Xisco Faulí 2018-08-07 02:31:09 UTC Comment hidden (obsolete)
Comment 31 Xisco Faulí 2018-09-07 02:41:52 UTC Comment hidden (obsolete)
Comment 32 Xisco Faulí 2018-10-08 02:46:00 UTC Comment hidden (obsolete)
Comment 33 Xisco Faulí 2018-11-08 04:04:50 UTC Comment hidden (obsolete)
Comment 34 Xisco Faulí 2018-12-09 03:39:13 UTC Comment hidden (obsolete)
Comment 35 Xisco Faulí 2019-01-09 03:43:04 UTC Comment hidden (obsolete)
Comment 36 Xisco Faulí 2019-02-09 03:42:52 UTC Comment hidden (obsolete)
Comment 37 Xisco Faulí 2019-03-12 03:36:01 UTC Comment hidden (obsolete)
Comment 38 Xisco Faulí 2019-06-11 08:16:53 UTC
Dear Fady Essam,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.