https://bugs.documentfoundation.org/show_bug.cgi?id=157556

            Bug ID: 157556
           Summary: Incorrect image link leads to corrupted document AFTER
                    being saved in LibreOffice
           Product: LibreOffice
           Version: 7.6.2.1 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 189947
  --> https://bugs.documentfoundation.org/attachment.cgi?id=189947&action=edit
Odt document containing erroneous image link, which corrupts the document AFTER
saving in LO

If LibreOffice opens Writer document that contains an image, which is linked
(in content.xml) with the following incorrect syntax:
<draw:image xlink:href="C:\LO_bug_erroneous_image_link\apples.gif" 

the document opens in LibreOffice correctly despite this error, except in the
place of the image user is shown an error message, as it should be. However, if
the user then saves (not ‘Save As’) the document, the originally wrong link
becomes even more incorrect:
<draw:image xlink:href="./C:%5CLO_bug_erroneous_image_link%5Capples.gif"

After this, LibreOffice refuses to open the document with the following error
message:

Read Error.
Format error discovered in the file in sub-document content.xml at
2,5102(row,col).

Evidently it is the ‘\’ character that is replaced by ‘%5C’, what is causing
the document not to open.

LibreOffice does not allow the user to create incorrect links, but they can
come from other programs. Also, LibreOffice import functions can be affected by
this. This is why, I think LO should be more robust in handling incorrect
links.

This problem has existed in LO for quite a while, I do not know what is the
earliest affected version.

!!! THIS BUG DOES NOT HAPPEN WITH “Save As”, ONLY WITH “Save” !!!

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to