Bug 56957

Summary: undefined: Useless and bad conversion of simple text files renamed with ".odt".
Product: LibreOffice Reporter: RedGuff <domsau2>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: minor CC: domsau2, kohei, serval2412
Priority: low    
Version: 3.6.3.2 release   
Hardware: Other   
OS: All   
Whiteboard: BSA
Crash report or crash signature: Regression By:
Attachments: The files descipted in the text.

Description RedGuff 2012-11-10 16:34:51 UTC
Created attachment 69871 [details]
The files descipted in the text.

Problem description: 
When I open, with the interface, a simple text file with the ".odt" extension, LibreOffice convert it with Spreadsheet, instead of Writer. 

Steps to reproduce:
1. Make a simple text file with several lines, for example with notepad (like "test0.txt").
2. Save it with ".odt" extension, with "Save as" and quotes, or rename it. You have the "test1.odt" file.
3. Open it with the interface of LibreOffice ("Open..."), it will be converted with Spreadsheet.

If you double-click on the file, it opens with writer: it's good.
If you name it with "ods", like "test2.ods", it opens (with the interface or with double-click) with Spreadsheet: it's good.

Current behavior:
It will be converted with Spreadsheet.

Expected behavior:
Test1.odt should open with Writer with the interface, like with the double-click.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 5.1; rv:19.0) Gecko/19.0 Firefox/19.0
Comment 1 Urmas 2012-11-11 04:31:21 UTC
Writer opens the file fine, but Start Center does it with the spreadsheet.
Comment 2 Julien Nabet 2012-11-11 20:39:20 UTC
On pc Debian x86-64 with master sources updated today, I reproduce this problem.

Kohei: one for you?
Comment 3 Kohei Yoshida 2012-11-13 14:34:38 UTC
Two points with this.

1) We don't use file extensions to detect file format, so whether a simple text has a .txt or .odt has little influence on our type detection process.

2) Given 1), the file will be processed as a "plain text", which will open in Calc if opened from Calc, and opens in Writer when opened from Writer.  This behavior is new in 3.6, and is intentional.

When opening from the start center, it's not very clear which app will open the file.  So, it's best to open the intended app first, then open the file.

Sorry about the confusion. But I'm afraid this is working as designed.

Anyway, thanks for your bug report. We appreciate it.