Bug 123485 - Excel 2003 xml file with xls extension detected as HTML
Summary: Excel 2003 xml file with xls extension detected as HTML
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0 target:6.2.2
Keywords: bibisected, bisected, needUITest, regression
Depends on:
Blocks: FormatDetection
  Show dependency treegraph
 
Reported: 2019-02-15 12:08 UTC by Maxim Monastirsky
Modified: 2019-03-13 16:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
test doc (3.16 KB, application/vnd.ms-excel)
2019-02-15 12:08 UTC, Maxim Monastirsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Monastirsky 2019-02-15 12:08:38 UTC
Created attachment 149311 [details]
test doc

Actual Results:

Trying to open the attached file with 6.2/master, shows the HTML import options dialog, and after confirming opens an empty spreadsheet.

Expected Results:

Should just open a spreadsheet with the number '1' in A1 cell (like in 6.1).

Didn't perform a proper bibisect, but reverting the svtools/source/svhtml/htmlkywd.cxx part of https://gerrit.libreoffice.org/plugins/gitiles/core/+/7ea01578eed8459678369d0256de016930b3af40 seems to fix the problem.

There is also a related problem about misdetection of empty files as HTML instead of plain text which reported in Bug 123476 comment 0, and caused by the same code change.
Comment 1 Maxim Monastirsky 2019-02-15 12:10:26 UTC
Previously reported in https://lists.freedesktop.org/archives/libreoffice/2018-November/081357.html => NEW
Comment 2 Aron Budea 2019-02-15 13:55:16 UTC
I can confirm using repo bibisect-linux-64-6.2 that indeed the following commit is responsible for the regression.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7ea01578eed8459678369d0256de016930b3af40
author		Noel Grandin <noel.grandin@collabora.co.uk>	2018-10-19 13:04:43 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2018-10-22 07:55:32 +0200

loplugin:staticvar in soltools..svx
Comment 3 Commit Notification 2019-02-18 09:04:39 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/bdc9bdccb61130355784800f99b4fd726d6c424d%5E%21

tdf#123485 Excel 2003 xml file with xls extension detected as HTML

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2019-02-18 10:23:28 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/33124ddfa6bd68f1cc0d2bfee473dd747e94c77d%5E%21

tdf#123485 Excel 2003 xml file with xls extension detected as HTML

It will be available in 6.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Xisco Faulí 2019-03-13 14:35:38 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 8aa579830b20072af8d6e149d6b279362fe98b91
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Noel Grandin, thanks for fixing this issue!