<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Writer document with tables lost data in cells (apparently) replacing with 0"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=131025#c16">Comment # 16</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Writer document with tables lost data in cells (apparently) replacing with 0"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=131025">bug 131025</a>
from <span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span></b>
<pre>(In reply to Jim DeLaHunt from <a href="show_bug.cgi?id=131025#c15">comment #15</a>)
<span class="quote">> Once I edited contents.xml, re-zipped the document directory, and opened the
> new .odt file in LibreOffice, I saw a "document corrupted" message</span >
That probably because this
(In reply to Mark van Rossum from <a href="show_bug.cgi?id=131025#c12">comment #12</a>)
<span class="quote">> * zip file_new.odt *
> LO will see it is broken but can repair it.</span >
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>