Bug 121128 - Impress opens a Draw file as a presentation file in particular conditions
Summary: Impress opens a Draw file as a presentation file in particular conditions
Status: RESOLVED DUPLICATE of bug 65017
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-11-02 13:45 UTC by Pierre C
Modified: 2018-12-05 20:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of ODG opened in Impress (338.16 KB, image/png)
2018-11-02 14:19 UTC, Drew Jensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre C 2018-11-02 13:45:00 UTC
I had this problem for years, but I wasn't able to understand how it happens.

Some of my Draw files (ODG) open with Impress. We have discussed of this problem on French QA list and finally we have a way to reproduce the bug.

1 - Launch LibreOffice
2 - Open A Draw file and close Draw, not LibreOffice
3 - Launch Impress, close the assistant
4 - in recent files list open the draw file previously opened

=> This file is opened with Impress.
If you click on save, the file is saved with an odg extension but then it will always be opened by Impress.

I thinck this bug should be considered as data-loss, because you can't use draw to work with your file any-more
Comment 1 Pierre C 2018-11-02 13:50:26 UTC
No problem with AOO 4.1.5
Comment 2 Drew Jensen 2018-11-02 14:19:59 UTC
Created attachment 146255 [details]
Screenshot of ODG opened in Impress

Confirmed with Ubuntu 18.04 and LibreOffice 6.1.3.1

The screen shot is what I ended with following the instructions. 

As for the second part what was in the first comment: Saved the ODG file, now displayed with Impress, with a new name and this newly named file still has the .odg file type name but all versions of LO I triedn (6.0 and 6.2) open it as an impress file all the time.

NOTE: as an aside here, I opened an issue the other day regarding Draw files opening with the Impress module under LibreOffice On-line all the time and that is true, BUT with LOOL editing the file and saving those changes with LOOL does not change the internals the way the desktop instance of the application does. That file when downloaded and opened on the desktop still comes up with Draw.
Comment 3 Regina Henschel 2018-11-02 22:49:53 UTC
File name extension do not mean anything. Only that Windows allows to bind a default application to it.

LibreOffice let you choose the import filter in the file open dialog. First select the file then the filter.

Currently LibreOffice acts so, that if you open a file without selecting a filter, it tries to open the file in the active module. If Writer is active a .csv file opens in Writer, if Calc is active the same file would be opened in Calc, for example.

So sometimes you need to choose the filter to force opening in a specific module.

There exists only restricted choose in export filter. Saving from Impress as graphic document is not possible and saving from Draw as presentation is neither possible. Impress has an export "ODF Drawing (Impress)" which generates a .odg file name extension, but the file is of "application/vnd.oasis.opendocument.presentation" mimetype. Saving from Impress with mimetype "application/vnd.oasis.opendocument.graphics" is not possible.

This report is duplicate to bug 100379.
Comment 4 Pierre C 2018-11-03 09:03:34 UTC
(In reply to Regina Henschel from comment #3)
> File name extension do not mean anything. Only that Windows allows to bind a
> default application to it.
> 
> 
> 
> This report is duplicate to bug 100379.

No, it is not a dupe. If I select a file to open in the recent list file, I expect that the file will open with the correct application.

If I'm using Writer, and I want to work with a presentation that I've worked on yesterday. I use the recent file list and my file is open with Impress.

The behaviour here is not correct.

With Impress, and only with Impress, if you choose a Draw file in the recent list, and only with Draw files, the file will open with Impress, only if you have previously open this file since you have launch LO
Comment 5 Xisco Faulí 2018-11-09 13:38:14 UTC
STR:
1. Open a Draw document
2. Close it
3. Open Impress
4. Go to File - Recent Documents and choose the draw document

-> it's open in Impress instead of Draw

I can reproduce it in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.10; Render: default; 

but not in

Version: 5.0.0.0.alpha1+
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8)

needs to be bisected with repo 5.1
Comment 6 raal 2018-11-09 15:41:32 UTC
This seems to have begun at the below commit.
Adding Cc: to Maxim Monastirsky ; Could you possibly take a look at this one?
Thanks

808a5af115f164aca6903ff34b7594e482e35988 is the first bad commit
commit 808a5af115f164aca6903ff34b7594e482e35988
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sun Nov 8 00:54:40 2015 -0800

    source sha:8655fa318c1924994eb659b4bb60074c86ad70c1
authorMaxim Monastirsky <momonasmon@gmail.com>2015-11-08 01:33:47 +0200 committerMaxim Monastirsky <momonasmon@gmail.com>2015-11-08 10:47:10 +0200 commit8655fa318c1924994eb659b4bb60074c86ad70c1 (patch) tree813b6f85636adabbc3a344f8126ab4ca9f1159d8 parent6da681442b17c723f9408a806e8d2367441ad65a (diff)
Fix property name: ModuleName -> ModuleIdentifier
Comment 7 Maxim Monastirsky 2018-11-10 21:15:00 UTC
(In reply to Pierre C from comment #4)
> No, it is not a dupe. If I select a file to open in the recent list file, I
> expect that the file will open with the correct application.
Then it's a duplicate of Bug 65017.

(In reply to raal from comment #6)
> This seems to have begun at the below commit.
> authorMaxim Monastirsky <momonasmon@gmail.com>2015-11-08 01:33:47 +0200
> commit8655fa318c1924994eb659b4bb60074c86ad70c1 (patch)
> Fix property name: ModuleName -> ModuleIdentifier
This is a bit misleading. This behavior was originally introduced as a *feature* (at least for Writer and Calc) starting with LO 3.6 in this commit:

commit c238c19d2fed00919e02c4bc268d99ceaa73aca1
Author: Kohei Yoshida <kohei.yoshida@gmail.com>
Date:   Wed May 30 18:33:46 2012 -0400

    1) Don't pass filter name and 2) pass module name when opening file.

Then it was unintentionally broken starting with LO 4.1, because of a commit that was cherry-picked from AOO (and obviously AOO devs didn't take into account the other change that happened on our side in LO 3.6):

commit 8b050d1e91a6623fb2770421e564a74d6259d816
Author: Ariel Constenla-Haile <arielch@apache.org>
Date:   Fri Apr 26 21:55:57 2013 +0000

    UI Controller Factory fixes

So in my commit (which gone into LO 5.2) I only fixed the code to be at least technically correct, and to behave the way it was designed by its original author.

*** This bug has been marked as a duplicate of bug 65017 ***
Comment 8 Pierre C 2018-12-05 09:01:25 UTC
I don't really understand why this bug is declared as a dupe of 65017
bug 65017 is an enhancement request.
Is having the possibility to open a Draw file, when working with Impress, opened with Draw, not Impress, an enhancement request ?


either bug 65017 should be tagged as a bug, not an enhancement, and maybe, as a regression and data-loss. either this bug should be left open.
Comment 9 Maxim Monastirsky 2018-12-05 20:53:38 UTC
(In reply to Pierre C from comment #8)
> I don't really understand why this bug is declared as a dupe of 65017
Because technically it is the same issue.

> bug 65017 is an enhancement request.
It's just a field in Bugzilla, which says nothing. Whoever thinks it should be listed differently in Bugzilla, can feel free to change it.