Bug 105613 - Unable to convert Excel XML file (XSLT filter) using command line
Summary: Unable to convert Excel XML file (XSLT filter) using command line
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: ToBeClosedInLibreOffice6.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: MSO-XML2003
  Show dependency treegraph
 
Reported: 2017-01-30 11:58 UTC by Mike Kaganski
Modified: 2018-09-10 15:15 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test file that fails to be converted if timeout happens (356.26 KB, application/x-zip-compressed)
2017-01-30 11:58 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2017-01-30 11:58:22 UTC
Created attachment 130764 [details]
Test file that fails to be converted if timeout happens

Because of http://cgit.freedesktop.org/libreoffice/filters/commit/?id=2e9f9d82110342601d28408ae77d63b673993ebe, in case of timeout >60s during import of a large XML file, an interaction handler is used to decide if processing should continue or not (see bug 65980 for details about currently wrong wording in user-visible message).

When using --convert-to option, like this:

> soffice --convert-to xlsx 20170130090750.xml

which implies headless mode, there is naturally no warning shown to user, but processing is unconditionally aborted.

That happens in QuietInteraction::handle(). Currently, the exception class used in the interaction is css::ucb::InteractiveAugmentedIOException with InteractionClassification_ERROR and css::ucb::IOErrorCode_GENERAL (see XSLTFilter::importer()), which cannot be meaningfully processed in QuietInteraction::handle().

A workaround is to use libxslt's xsltproc (like mentioned in bug 65980 comment 16):

> xsltproc --output output.fods /path/to/libreoffice/share/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl input.xml
Comment 1 Xisco Faulí 2017-02-19 18:55:11 UTC
Confirmed using

time instdir/program/soffice --convert-to xlsx /home/xisco/Baixades/20170130090750.xml
^Z
[3]+  Aturat                  instdir/program/soffice --convert-to xlsx /home/xisco/Baixades/20170130090750.xml

real	60m47.101s
user	0m0.000s
sys	0m0.000s

in

Version: 5.4.0.0.alpha0+
Build ID: 880033edde516fc30225005245253293a6a58ba4
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 2 QA Administrators 2018-03-11 03:41:37 UTC Comment hidden (obsolete)
Comment 3 Mike Kaganski 2018-03-11 04:54:49 UTC
Not reproducible anymore using current master, due to Kohei's work on using liborcus to import these files (see https://lists.freedesktop.org/archives/libreoffice/2018-January/079334.html). Initial commit is https://cgit.freedesktop.org/libreoffice/core/commit/?id=152c79ee2be2374334202dc738a8f011e47845c7.

I'm not closing it yet, until this goes to a release (just to make sure it wouldn't be reverted because of some problem).
Comment 4 Kohei Yoshida 2018-09-05 00:49:00 UTC
I guess we can close this now that 6.1 is out (?)
Comment 5 Xisco Faulí 2018-09-10 15:15:31 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 433fce6571d4b9121374047324a7d2d2722ac3e4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

time instdir/program/soffice --convert-to xlsx /home/xisco/Baixades/20170130090750.xml
convert /home/xisco/Baixades/20170130090750.xml -> /home/xisco/bibisect/bibisect-linux64-6.2/20170130090750.xlsx using filter : Calc Office Open XML
Overwriting: /home/xisco/bibisect/bibisect-linux64-6.2/20170130090750.xlsx

real	0m4.554s
user	0m4.352s
sys	0m0.273s

@Kohei Yoshida, Thanks for fixing this!