Bug 65017 - FILEOPEN : Menu "File > Recent Documents" opens rtf file as a Calc document instead of in Writer
Summary: FILEOPEN : Menu "File > Recent Documents" opens rtf file as a Calc document...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.6.0.0.alpha1
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 119478 120378 121128 (view as bug list)
Depends on:
Blocks: Recent-Document-List RTF
  Show dependency treegraph
 
Reported: 2013-05-26 20:45 UTC by Alexander
Modified: 2018-12-05 20:49 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshots (2x) (15.03 KB, image/png)
2013-05-27 20:08 UTC, Alexander
Details
screenshot of Calc (55.24 KB, image/png)
2013-05-27 20:09 UTC, Alexander
Details
this new created RTF shows the bug (1.73 KB, text/rtf)
2013-05-28 22:28 UTC, Alexander
Details
this new created RTF renamed to DOC shows the bug too (2.49 KB, application/rtf)
2013-05-28 22:29 UTC, Alexander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2013-05-26 20:45:01 UTC
Open a Word document word.doc in Writer and everything is fine.
Close Writer.
Open Calc (perhaps having another .ods loaded) and seeing word.doc in Last Document List (inside Calc File menu), now open this .doc here and it is opend in Calc, not in Writer. The format is looking wrong because of Table style (but was right in Writer).
In Windows Explorer double-clicking the .doc opens Writer (as it should be),
but open from inside Calc is strange.

This would be fine:
So either dont show .doc in Calc menu, or if shown open it with Writer.

Thanks, Alexander
Comment 1 Cor Nouws 2013-05-27 05:40:06 UTC
Hi Alexander,

Hmm.. I cannot confirm this.
Do you pls have : 
 - two files involved
 - a screen print of the false result?
Then I can try to reproduce.

thanks & regards,
Cor
Comment 2 Alexander 2013-05-27 20:05:50 UTC
It is not wrong with each of the files, only with the Software-2012.doc not the other logins-ak.doc! (sorry i cannot attach these private files)
Beside a possible mistake in file, it is opened fine by doubleclicking it.

$ head -n 1 Software-2012.doc
{\rtf1\ansi\deff0\adeflang1025

$ file Software-2012.doc
Software-2012.doc: Rich Text Format data, version 1, ANSI

$ file logins-ak.doc
logins-ak.doc: Composite Document File V2 Document, Little Endian, Os: Windows, Version 1.0, Code page: -535, Author: aleks, Template: Normal.dot, Last Saved By: SEC, Revision Number: 19, Total Editing Time: 23d+22:11:08, Create Time/Date: Tue Jan  2 11:07:00 2007, Last Saved Time/Date: Thu Jun 21 00:16:00 2007

now i try to attach the 2 screenshots.
Comment 3 Alexander 2013-05-27 20:08:15 UTC
Created attachment 79865 [details]
screenshots (2x)

Calc having DOC opened
Comment 4 Alexander 2013-05-27 20:09:28 UTC
Created attachment 79866 [details]
screenshot of Calc

Recent/Last Document List showing many files.
Comment 5 Alexander 2013-05-27 20:11:17 UTC
(In reply to comment #1)
> Hi Alexander,
> 
> Hmm.. I cannot confirm this.
> Do you pls have : 
>  - two files involved
>  - a screen print of the false result?
> Then I can try to reproduce.
> 
> thanks & regards,
> Cor

now you can find more information.

thanks, Alexander
Comment 6 Cor Nouws 2013-05-27 21:50:49 UTC
thanks for the screenshots..

(In reply to comment #3)
> Created attachment 79865 [details]
> screenshots (2x)
> 
> Calc having DOC opened

What happens if you rename this (in the Explorer) to Software-2012.xls ?
Comment 7 Alexander 2013-05-28 07:16:07 UTC
mv test.doc test.xls

double-click in explorer open it in Calc (again with bad format table style).

open test.xls from inside Calc - shows it in Calc,
open test.xls from inside Writer open it in Writer.

Filename-extension has no influence.
LastDocumentList and NormalOpenFile in Menu behave the same,
it is important for this file where you are, not whats inside the file.

As file <filename> shows:
Software-2012.doc: Rich Text Format data, version 1, ANSI
it is propably a RTF with wrong name.

I update the file content every month (since one year) using Writer (opened by double-click in explorer) and everything is fine (nice in Writer, no error or warning). The file content has been written (since one year) only by using LibreOffice-Writer, nothing else!

thanks, Alexander
Comment 8 Alexander 2013-05-28 22:28:40 UTC
Created attachment 79922 [details]
this new created RTF shows the bug
Comment 9 Alexander 2013-05-28 22:29:16 UTC
Created attachment 79923 [details]
this new created RTF renamed to DOC shows the bug too
Comment 10 Alexander 2013-05-28 22:30:27 UTC
2 files attached that show the bug (extension in filename does not matter),
the content is not allowed to be RTF (RichTextFormat).
Comment 11 Cor Nouws 2013-06-03 23:56:17 UTC
OK, that makes sense.. It's about rft.


To reproduce:

- open an rtf document foo.rtf
- close the document
- open a spreadsheet
- now open foo.rtf from File > Recent used documents

  > foo.rtf is opened in a spreadsheet 'container'

looks funny, but definitely not what is desired ;)
Comment 12 Cor Nouws 2013-06-03 23:59:46 UTC
needs to be sorted out when this one came up, in which version
Comment 13 Alexander 2013-06-04 21:23:33 UTC
(In reply to comment #12)
> needs to be sorted out when this one came up, in which version

The bug is not there in LibreOffice 3.5.7.2 (Ubuntu 12.04, 64bit).
But is there in 4.0.3.3 (Windows7, 64bit).

A.
Comment 14 Jorendc 2013-06-08 12:05:01 UTC
Can not reproduce using Linux Mint 15 x64 with LibreOffice 4.0.3.3. So, looks a windows only bug to me.

Kind regards,
Joren
Comment 15 Cor Nouws 2013-06-08 19:22:26 UTC
Hi Joren,

(In reply to comment #14)
> Can not reproduce using Linux Mint 15 x64 with LibreOffice 4.0.3.3. So,
> looks a windows only bug to me.

a. Did you follow the steps from comment #11 ?
b. Since when do you think that I test on Windows :p


Regards ;)
Cor
Comment 16 Cor Nouws 2013-06-08 19:27:41 UTC
Sorry: ALexander = Windows, me = Linux >> All

Just tested in 360alpha1 - problem exist there too. 
and in 3.5.7 - works without problem there.
Comment 17 Alexander 2013-08-05 20:25:47 UTC
still there in 4.0.4.2
Comment 18 Cor Nouws 2013-08-05 20:30:59 UTC
pls do not touch the version field, when the bug is present in a later version!
The version field should reflect the oldest know version with the issue.

thanks a lot :)
Cor
Comment 19 Maxim Monastirsky 2014-05-06 19:58:18 UTC
(In reply to comment #11)
>   > foo.rtf is opened in a spreadsheet 'container'
> 
> looks funny, but definitely not what is desired ;)
This is the desired result, since Calc has its own rtf filter [1]. And the type detection framework honors the DocumentService by design [2].

[1] http://opengrok.libreoffice.org/xref/core/sc/source/filter/rtf/
[2] http://opengrok.libreoffice.org/xref/core/filter/source/config/cache/typedetection.cxx#481
Comment 20 Maxim Monastirsky 2014-07-28 08:52:19 UTC
(In reply to comment #19)
> This is the desired result
Thinking of it again, when it comes to the recent documents list it does make sense to open in the same component the user used to create that file. Surely we could find a way to store the last used document service for each document in the recent list. So I'll reopen this, and set as enhancement.
Comment 21 Matthew Francis 2015-02-14 13:34:54 UTC
Given that this is working as (currently) designed,

Removing Keywords:regression
Comment 22 Jean-Baptiste Faure 2015-03-01 19:33:21 UTC
I do not reproduce the behavior described in comment #11. The attached RTF files open always in Writer with LibreOffice 4.4.2.0.0+ built at home under Ubuntu 14.10 x86-64.

Best regards. JBF
Comment 23 Maxim Monastirsky 2018-10-07 23:15:54 UTC
*** Bug 120378 has been marked as a duplicate of this bug. ***
Comment 24 Maxim Monastirsky 2018-11-10 21:15:00 UTC
*** Bug 121128 has been marked as a duplicate of this bug. ***
Comment 25 Maxim Monastirsky 2018-12-05 20:43:19 UTC
*** Bug 119478 has been marked as a duplicate of this bug. ***