1. rename random .xls file to .tmp
2. File->Open it
3. maybe it opens as plain text in Writer, maybe not at all...
(the latter if it's actually an embedded OLE that was written to a temp file)
apparently detection code has recently vanished from ScFilterDetect::detect
and ScExcelBiffDetect::detect does not actually detect anything at all.
Do you have a test document I can use?
(In reply to comment #1)
> Do you have a test document I can use?
I mean the embedded one.
(In reply to comment #0)
> 2. File->Open it
And I bet you are opening it from Writer?
forgot to add the bug link... see attachment there
BTW, this (kinda) explains some of the not-so-obvious design in the type detection code.
Adjusting the title a bit. It's not "totally broken" since it works just when opening from Calc.
(In reply to comment #7)
> it works just when
it works just fine when
Actually this is reproducible even with 3.6. So it's not related to the recent change I did on master. Still looking deeper.
Actually I don't get this bug. I just created a Word document with embedded Excel object, and I can open the embedded Excel just fine using the master build. So, that has nothing to do with libreoffice not opening an excel doc with .tmp extension....
I must be missing something here.. :-/
Anyway, I'll just focus on opening an Excel file with .tmp extension from Writer UI.
Ah, I see how the new type detection code is handling this use case differently.
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":
fdo#60562: List *all* format types that we support and rank them all properly.
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Ok. Just did a non-trivial refactoring of the type detection code (something I had planned to do regardless of this bug), and now the Excel file with .tmp extension gets detected correctly. I also loaded the document from Bug 60234, and it loads fine too.
The type detection process is a bit more simplified more logical now, which I'm very happy about.
Fixed on master.