[Libreoffice-bugs] [Bug 131025] Writer document with tables lost data in cells (apparently) replacing with 0

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Dec 9 19:39:35 UTC 2020


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

--- Comment #16 from Eike Rathke <erack at redhat.com> ---
(In reply to Jim DeLaHunt from comment #15)
> Once I edited contents.xml, re-zipped the document directory, and opened the
> new .odt file in LibreOffice, I saw a "document corrupted" message
That probably because this

(In reply to Mark van Rossum from comment #12)
> * zip file_new.odt *
> LO will see it is broken but can repair it.
zipping everything is wrong (apart from that it lacks subdirectories). Instead,
copy the old document to file_new.odt and then *freshen* the zip using

zip -f file_new.odt content.xml

The reason is that the 'mimetype' file
a) MUST be the first entry in the zip
b) MUST be stored uncompressed plain text

Zipping everything (in shell expansion order if * is used) will violate both.

Alternatively, of course in a subdirectory that *only* contains the document's
files and directories, create a new zip with

zip -0 file_new.odt mimetype
zip -r file_new.odt * -x mimetype

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201209/37b7cd9c/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list