Bug 126955 - There's no way to override the heuristic file type determination.
Summary: There's no way to override the heuristic file type determination.
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-15 19:50 UTC by Chris
Modified: 2020-04-19 03:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Demonstration of a file that triggers the bug (376 bytes, text/plain)
2019-08-15 19:51 UTC, Chris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2019-08-15 19:50:34 UTC
Description:
When choosing a file to open, LibreOffice uses a heuristic to guess the file type, and choose the correct program. In most cases, it does a pretty good job of deciding which program (Calc, Writer, etc.) to use to read the file.

However, there are cases where the heuristic fails, and the wrong program is opened. For instance, IIF is a common format of file for data exchange between accounting software (particularly QuickBooks). It is a grid-based, tab-delimited file format that is best edited with a spreadsheet application, such as Calc. However, trying to open an IIF file in Calc results in the Writer application opening the file instead.

Changing the file type to "Text CSV" in the open dialog does cause Calc to behave properly. However, it also has the side effect of hiding any file that doesn't have a CSV extension, making it impossible to choose the file. You either have to remember the name and type it in, or remember to choose the file before choosing the file type. Also note that LibreOffice on certain Linux installations don't give you the option of typing the name at all.

The above behavior is correct in most situations, and should remain the default. But there needs to be an easy way to override the automatic file type detection, separate from the file extension filter, for edge cases such as this.

Steps to Reproduce:
1. Open Calc.
2. Choose File/Open.
3. Pick an IIF file.

Actual Results:
The file opens in Writer, with no option to change it.

Expected Results:
There should be some *easy* way to force the file to open in Calc, using the Text CSV import options.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.1.6.3
Build ID: 6.1.6.3-1.fc29
CPU threads: 4; OS: Linux 5.2; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group threaded

Version: 6.1.3.2
Build ID: 86daf60bf00efa86ad547e59e09d6bb77c699acb
CPU threads: 1; OS: Windows 6.1; UI render: default; 
Locale: en-US (en_US); Calc: group threaded
Comment 1 Chris 2019-08-15 19:51:11 UTC
Created attachment 153423 [details]
Demonstration of a file that triggers the bug
Comment 2 Oliver Brinzing 2019-08-16 08:09:59 UTC
it's possible to open the file via command line, e.g.:

soffice d:\downloads\demo.iif --infilter="Text - txt - csv (StarCalc)"
Comment 3 Xisco Faulí 2019-09-20 11:01:20 UTC
(In reply to Oliver Brinzing from comment #2)
> it's possible to open the file via command line, e.g.:
> 
> soffice d:\downloads\demo.iif --infilter="Text - txt - csv (StarCalc)"

Hello Chris,
Does this solution work for you?
Otherwise, which other solution do you propose ?
Comment 4 QA Administrators 2020-03-19 02:35:27 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2020-04-19 03:37:48 UTC
Dear Chris,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp