https://bugs.documentfoundation.org/show_bug.cgi?id=104718
Bug ID: 104718
Summary: SAXParseException: Allow to recover XML as much as
possible from the document
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: filters and storage
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Currently (since 5.0.4), when LO opens an XML format (ODF, OOXML) file with
errors (like duplicated attributes, data-past-body etc.) an error
"SAXParseException: ..." is returned to user, and the file isn't opened.
This is the result of better error detection/handling introduced by commit
ebf767eeb2a169ba533e1b2ffccf16f41d95df35, and allowed us to detect and fix
quite a number of errors. However, it is really a problem for end users being
unable to open the corrupted files that were possible to be open previously.
This leads, e.g., to creations of HOWTOs in Ask Libreoffice, that describe
using AOO as correct way to open those files.
I suggest changing current operation logic to be like that:
If SAXParseException was generated during XML parsing, then display something
like this to user:
"This file is corrupted (<Here goes current SAXParseException message>).
LibreOffice may try to recover as much as possible, but be prepared that some
information can be damaged or lost. Do you want to proceed?"
If user says "yes", then parsing continues as it worked before
ebf767eeb2a169ba533e1b2ffccf16f41d95df35. Following SAXParseException are
handled as if used answered "yes" each time.
If an unrecoverable exception is encountered, then, of course, return message
"File cannot be recovered".
I suppose that the nature of the message is clear enough, and users will
continue to file reports about such problems (esp. if the problematic file was
previously generated using LO).
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs