https://bugs.freedesktop.org/show_bug.cgi?id=83836
--- Comment #8 from David Tonhofer <[email protected]> --- May or may not be related: For the first time ever I have an error like this in "LibreOffice/4.2.6.3" today (more precisely, 4.2.6.3.3, on Fedora 20): --------------------- Read-Error. Format error discovered in the file in sub-document content.xml at 2,37882(row,col). --------------------- Uh-oh, great. (Looks like we have come full circle and are back at the kind of situation that caused Neal Stephenson to crack and write his "In the Beginning .. Was the Command Line" anti-MS rant. Or nearly so. Ok, manual fixing 'R us!) Some peeves: 1) Could content.xml be formatted more nicely? Like with CRLF and indentations? The jar file is compressed anyway.... 2) The error message could indicate what the parser doesn't so particularly like. What's special with position 37882? Is the attribute before that position or after that position problematic? 3) Extreme Brittleness! Why not spit out a fat warning and continue processing regardless? In this case: <style:style style:name="T11" style:family="text"> <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold" style:font-name="Liberation Sans" style:font-name-asian="DejaVu Sans" <---- the end of this is position 37882 style:font-name-complex="DejaVu Sans" fo:font-weight="normal" style:font-weight-asian="normal" style:font-weight-complex="normal" fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic"/> </style:style> So it looks like style:font-weight-asian style:font-weight-complex have been defined twice, but this has nothing to do with the position. Try more info? Let's see whether the document is well-formed: $ xmlwf content.xml content.xml:2:37882: duplicate attribute $ xmllint --format content.xml content.xml:2: parser error : Attribute fo:font-weight redefined style="italic" style:font-style-asian="italic" style:font-style-complex="italic" ^ content.xml:2: parser error : Attribute style:font-weight-asian redefined style="italic" style:font-style-asian="italic" style:font-style-complex="italic" ^ content.xml:2: parser error : Attribute style:font-weight-complex redefined style="italic" style:font-style-asian="italic" style:font-style-complex="italic" ^ content.xml:2: parser error : Attribute fo:font-weight redefined ght="normal" style:font-weight-asian="normal" style:font-weight-complex="normal" ^ content.xml:2: parser error : Attribute style:font-weight-asian redefined ght="normal" style:font-weight-asian="normal" style:font-weight-complex="normal" ^ content.xml:2: parser error : Attribute style:font-weight-complex redefined ght="normal" style:font-weight-asian="normal" style:font-weight-complex="normal" ^ Ok, let's try this: $ xmllint --recover --format content.xml > content_new.xml $ mv content_new.xml content.xml $ xmllint --format content.xml content.xml:435: parser error : Attribute fo:font-weight redefined style="italic" style:font-style-asian="italic" style:font-style-complex="italic" ^ content.xml:435: parser error : Attribute style:font-weight-asian redefined style="italic" style:font-style-asian="italic" style:font-style-complex="italic" ^ content.xml:435: parser error : Attribute style:font-weight-complex redefined style="italic" style:font-style-asian="italic" style:font-style-complex="italic" ^ content.xml:474: parser error : Attribute fo:font-weight redefined ght="normal" style:font-weight-asian="normal" style:font-weight-complex="normal" ^ content.xml:474: parser error : Attribute style:font-weight-asian redefined ght="normal" style:font-weight-asian="normal" style:font-weight-complex="normal" ^ content.xml:474: parser error : Attribute style:font-weight-complex redefined ght="normal" style:font-weight-asian="normal" style:font-weight-complex="normal" ^ Okidoki, this is a good error message that tells me what to fix. After fixing: $ xmlwf content.xml No error messages? Hell yeah. Pack it up, do not forget M to not create a new manifest: $ jar Mcf Fixed.odt Configurations2/ content.xml manifest.rdf META-INF/ meta.xml mimetype settings.xml styles.xml Thumbnails/ $ soffice Fixed.odt. WORKS! Until next time, of course. I suppose the problem comes from merging/unmerging and copy-pasting cells in the original spreadsheet, something this spreadsheet has seen a lot of. Let's see what happens. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
