Bug 161219 - Exporting an XML filter as a package, in the XML Filter Settings window, results in a jar file with only an empty folder
Summary: Exporting an XML filter as a package, in the XML Filter Settings window, resu...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2024-05-22 16:09 UTC by heidi.vanparys
Modified: 2024-06-07 10:58 UTC (History)
4 users (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 heidi.vanparys 2024-05-22 16:09:47 UTC
Description:
In LibreOffice Calc, when saving an XML filter as a Package (XML Filter Settings -> Save as Package), a jar file is created, but it contains only an empty folder with the name of the filter. No files are within that folder. Expected behaviour is that the necessary files (XSLT stylesheets etc.) are in the jar file as well.

This behaviour was already reported in Bug 159461 https://bugs.documentfoundation.org/show_bug.cgi?id=159461:
"But if I use "Save as Package..." on any existing item, then all I get is an empty ".jar" file with only an empty directory inside it."

As far as I can see, what was fixed in Bug 159461 is that the XML Filter Settings windows does not hang any more. However, the wrong export of a package has not yet been fixed, therefore this new bug report.

Steps to Reproduce:
1. Open LibreOffice Calc
2. Open Tools -> XML Filter Settings
3. Choose any existing entry
4. Click on Save as Package...
5. Enter a file name
6. Open the resulting jar file, e.g. with 7-Zip

Actual Results:
No XSLT transformations etc. can be found within the jar file.

Expected Results:
The jar file should be in a state so that it can be imported in LibreOffice Calc by someone else by choosing "Open Package..." in the XML Filter Settings window.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: threaded


I was also able to verify this behaviour with:
Version: 24.2.3.2 (x86) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (da_DK); UI: en-US
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2024-06-07 06:21:31 UTC
Not reproduced in 7.5.9.

Reproduced in recent daily build and 7.6.7.2, but was introduced before the bibisected commit in bug 159461.

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 1f15d097cace14ca6e44e7652f460aa3fa7bd150
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 2 Julien Nabet 2024-06-07 10:02:20 UTC
The pb seems to be in filter/source/xsltdialog/xmlfilterjar.cxx in addFile_ method (line 109).

I gave a try and xTunnel.is() returns false.

Reading about xTunnel, it seems a hack which shouldn't be used but have no idea how to fix this.

(can't provide an Opengrok link since "core" project isn't available)

Noel/Stephan: any thoughts here? (eg: what's lacking to avoid xTunnel use)
Comment 3 Stéphane Guillou (stragu) 2024-06-07 10:58:35 UTC
Bibisected the empty jar with linux-64-7.6 to first bad build [56abb738032d2cbef6a155935b99a5b1373e69ce] which is:

commit a04bf69bccfbc266643b418ef57030a42bbb5c05
author	Noel Grandin 	Mon Jan 16 10:36:59 2023 +0200
committer	Noel Grandin 	Tue Jan 17 19:09:51 2023 +0000
XUnoTunnel->dynamic_cast in ZipPackageEntry
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145632