Bugzilla – Attachment 171580 Details for
Bug 131025
Writer document with tables lost data in cells (apparently) replacing with 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
XSLT Stylesheet to restore text values corrupted by this bug, see #41
Restore_odt_table_cell_text.xslt (text/plain), 1.80 KB, created by
Jim DeLaHunt
on 2021-05-01 22:42:42 UTC
(
hide
)
Description:
XSLT Stylesheet to restore text values corrupted by this bug, see #41
Filename:
MIME Type:
Creator:
Jim DeLaHunt
Created:
2021-05-01 22:42:42 UTC
Size:
1.80 KB
patch
obsolete
><?xml version="1.0" encoding="UTF-8"?> ><!-- Restore_odt_table_cell_text.xslt > by Jim DeLaHunt (jdlh.com), 2020-12-16. Donated to the public domain (cc0). > > This XSLT fixes a LibreOffice bug where Writer table cells containing > text turn into digit 0 when the document is re-opened. > This is Bug 131025 - Writer document with tables lost data in cells (apparently) replacing with 0 > <https://bugs.documentfoundation.org/show_bug.cgi?id=131025> > It does this by fixing table cells like > <table:table-cell table:style-name="â¦" office:value-type="float" > office:value="0"> > <text:p text:style-name="P71">desired text</text:p> > </table:table-cell> > > by changing to office:value-type="string" and deleting office:value="0". > --> ><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"> > > <xsl:output method="xml" indent="no" encoding="UTF-8" /> > > <xsl:template match="node()|@*"> > <xsl:copy> > <xsl:apply-templates select="node()|@*"/> > </xsl:copy> > </xsl:template> > > <!-- Create a replacement value for .../table-cell[@value-type] --> > <xsl:template match="/office:document-content/office:body/office:text/table:table/table:table-row/table:table-cell[@office:value-type='float'][@office:value='0'][not(text()='')]/@office:value-type" > > <xsl:copy> > <xsl:attribute name="office:value-type">string</xsl:attribute> > </xsl:copy> > </xsl:template> > > <!-- Delete .../table-cell[@value], because this null template generates nothing --> > <xsl:template match="/office:document-content/office:body/office:text/table:table/table:table-row/table:table-cell[@office:value-type='float'][@office:value='0'][not(text()='')]/@office:value" /> > ></xsl:stylesheet>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 131025
:
158273
|
169525
| 171580