Created attachment 192283 [details] A document package with a stream not referenced in its manifest.xml The attachment is just a simple Writer document (having text "Empty document"), manually edited using 7-Zip to add an empty text file "unreferenced.txt" into its root directory, without also adding a reference to it into the package's manifest.xml. This is an invalid ODF; and LibreOffice naturally asks to repair it on normal opening. When user agrees, the document opens normally. Try to run this macro to open this attachment in RepairPackage mode: sub OpenRepairPackage url = ConvertToURL("Path/To/unreferenced_stream.odt") dim args(0) as new com.sun.star.beans.PropertyValue args(0).Name = "RepairPackage" args(0).Value = true StarDesktop.loadComponentFromURL(url, "_blank", 0, args()) end sub This macro (with corrected path to the file) results in "General input/output error." message, and the document isn't opened. It obviously should, because the RepairPackage MediaDescriptor property [1] serves as explicit request to try to repair it. [1] https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1document_1_1MediaDescriptor.html#ab5ae6f2c9a82bcb8f006f4b46fee1691
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6c62129e64eb5ef00dfa5f2137c8689d55190163 tdf#159474: fix handling of pre-set RepairPackage property It will be available in 24.8.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.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/cffe6b2d7925d92424f1d6e02dafd32c1c9679cf tdf#159474: fix handling of pre-set RepairPackage property It will be available in 24.2.1. 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.