https://bugs.documentfoundation.org/show_bug.cgi?id=159474
Bug ID: 159474
Summary: A specific broken document can't be opened in
RepairPackage mode
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Created attachment 192283
--> https://bugs.documentfoundation.org/attachment.cgi?id=192283&action=edit
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
--
You are receiving this mail because:
You are the assignee for the bug.