[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
Sat May 1 22:40:09 UTC 2021


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

--- Comment #41 from Jim DeLaHunt <from+documentfoundation at jdlh.com> ---
I wrote a series of blog posts to explain how I fixed the corruption resulting
from this bug in my LibreOffice document. It involves opening the OpenDocument
archive file, and using XSLT, so I spread the explanation over four blog posts.
Hopefully it can help others with tables corrupted by this bug. 

"How to fix table contents turned to “0” in LibreOffice"
http://blog.jdlh.com/en/2021/04/30/fix-libreoffice-table-turned-to-0/
This is the overview, and links to other blog posts to explain techniques.

the method I used to fix this is:

1. Open up the working copy of the OpenDocument file, following the
instructions in my earlier blog, "How to crack open LibreOffice .ODT documents
for fun and bug fixing"
<http://blog.jdlh.com/en/2020/12/31/crack-open-odt-documents/>. The result is a
directory containing XML and other files.

2. Copy the XML file content.xml out of the directory to a place where you can
work on it. Name it content_corrupted.xml, or something similar.

3. Install the tool xsltproc or similar. See my earlier blog, "How to use XSLT
to modify XML files inside .ODT documents"
<http://blog.jdlh.com/en/2021/01/31/xslt-odt-documents/>, for an explanation of
this tool, and how to use it with OpenDocument files.

4. Apply the XSLT stylesheet below to content_corrupted.xml, as shown by the
sample command below. It creates content_repaired.xml .

5. Move the file content_repaired.xml back into the OpenDocument directory,
naming it content.xml .

6. Turn the directory of XML and other files back into an OpenDocument file,
following the further instructions in "How to crack open LibreOffice .ODT
documents for fun and bug fixing".

7. Open the repaired OpenDocument file and verify that your table contents are
restored.

The xsltproc command I used to fix the problem was more or less:

xsltproc -o content_repaired.xml repair.xslt content_corrupted.xml 

I have attached it as file "Restore_odt_table_cell_text.xslt".

-- 
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/20210501/d0b025d6/attachment.htm>


More information about the Libreoffice-bugs mailing list