Bug 35106 - libreoffice should be able to detect the filetype by the datastructure not by the file extension.
Summary: libreoffice should be able to detect the filetype by the datastructure not by...
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 01:13 UTC by Alexander Haensch
Modified: 2019-03-31 04:22 UTC (History)
1 user (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 Alexander Haensch 2011-03-08 01:13:13 UTC
I recently received a .docx file, which was mistakenly saved as .xls file.
Unfortunatly the Calc application was not able to detect, the format. Then i renamed the file to .xlsx . In this case libreoffice is able to distinguish between .docx and .xlsx. 
Would it be difficult to implement the detection mechanism also in legacy Office files?
I believe the user experience for technical unskilled people would increase tremendously, if Libreoffice could detect the correct filetype.
Comment 1 Don't use this account, use tml@iki.fi 2011-03-08 01:44:08 UTC
I think it *is* supposed to use also the contents to detect the type of data in a file, at least to some extent. But apparently not thoroughly enough then in this case. Could you please give much more specific reproduction instructions:

- What operating system, what version, and if Linux, what distro and what desktop environment (GNOME, KDE, other)?
- Exactly how did you try to open the misnamed file? By double-clicking in your desktop's file manager? From inside LibreOffice using File:Open?
Comment 2 Alexander Haensch 2011-03-16 12:11:46 UTC
(In reply to comment #1)
> I think it *is* supposed to use also the contents to detect the type of data in
> a file, at least to some extent. But apparently not thoroughly enough then in
> this case. Could you please give much more specific reproduction instructions:
> 
> - What operating system, what version, and if Linux, what distro and what
> desktop environment (GNOME, KDE, other)?
> - Exactly how did you try to open the misnamed file? By double-clicking in your
> desktop's file manager? From inside LibreOffice using File:Open?

Basically the issue is reproducible on Gentoo AMD64 with libreoffice-bin-3.3.1, ubuntu 10.04 LTS with relativly openoffice (packed). With Libreoffice 3.3.1 on MacOS X 10.6 it is also happining. They all platforms i have at hand. But i believe it is happening all the time.

To reproduce the issue i double-click in the filemanager (Dolphin, Nautilus or Finder) on the file.

I have to add, that the same thing exists in Microsoft office 2003. 

But we want to better than them, isn't it? :)

By the way: aren't the docx and xlsx files just zip compressed xml files? Then it should be possible to run a zip-package detection before entering a more detailed filetype detection.
Comment 3 Björn Michaelsen 2011-12-23 11:47:52 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 4 sasha.libreoffice 2012-03-12 07:30:56 UTC
@ Alexander
Thanks for bugreport
Please, verify if in last version of LibreOffice still reproducible
Comment 5 Florian Reisinger 2012-08-14 14:00:57 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 6 Florian Reisinger 2012-08-14 14:02:03 UTC Comment hidden (obsolete)
Comment 7 Florian Reisinger 2012-08-14 14:06:44 UTC Comment hidden (obsolete)
Comment 8 Florian Reisinger 2012-08-14 14:08:46 UTC Comment hidden (obsolete)