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: VERIFIED FIXED
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: target:25.2.0 target:24.2.5 target:24...
Keywords: bibisected, bisected, regression
: 161789 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-22 16:09 UTC by heidi.vanparys
Modified: 2024-07-16 07:52 UTC (History)
5 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
Comment 4 Noel Grandin 2024-06-19 13:11:49 UTC
Possible fix here: https://gerrit.libreoffice.org/c/core/+/169204
Comment 5 Commit Notification 2024-06-20 12:04:23 UTC
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.
Comment 6 Julien Nabet 2024-06-22 08:14:09 UTC
On pc Debian x86-64 with master sources updated today, I confirm it works now.
Thank you Noel! :-)
Comment 7 Commit Notification 2024-06-25 07:56:38 UTC
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.
Comment 8 Commit Notification 2024-06-25 08:57:52 UTC
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.
Comment 9 Julien Nabet 2024-06-26 08:37:25 UTC
*** Bug 161789 has been marked as a duplicate of this bug. ***
Comment 10 heidi.vanparys 2024-07-16 07:52:19 UTC
I can confirm that this bug indeed has been fixed in version 25.2.5.