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
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
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)
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
Possible fix here: https://gerrit.libreoffice.org/c/core/+/169204
Noel Grandin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/51dfbb1fce61dfb2e1d4c91350d2299e6dc3e04d tdf#161219 Exporting XML filter as package results in empty jar It will be available in 25.2.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.
On pc Debian x86-64 with master sources updated today, I confirm it works now. Thank you Noel! :-)
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/f6fae8f9a3f380a9e1c5908984092af7b3ef7567 tdf#161219 Exporting XML filter as package results in empty jar It will be available in 24.2.5. 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.
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/c4c76d5e292ea281c9e1e98dab0443e13a944a3d tdf#161219 Exporting XML filter as package results in empty jar It will be available in 24.8.0.0.beta2. 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.
*** Bug 161789 has been marked as a duplicate of this bug. ***
I can confirm that this bug indeed has been fixed in version 25.2.5.