[Solved] Corrupt file

Discuss the word processor
Post Reply
Diana2505
Posts: 2
Joined: Tue Mar 12, 2019 8:57 pm

[Solved] Corrupt file

Post by Diana2505 »

I have a corrupt .ODT file and as described on this forum I've put it into a zip file to check the content.xml and the styles.xml.
The xml copy editor shows that the mistakes are in the styles.xml

My problem is that I can't change the mistakes because after I changed it somewhere else appears mistakes.
Can somebody help me?
Attachments
styles.xml
(51.04 KiB) Downloaded 81 times
Last edited by RoryOF on Tue Mar 12, 2019 11:23 pm, edited 1 time in total.
Reason: Added [Solved] and green tick. [RoryOF, Moderator]
open office 4.1.6 Windows
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupt file

Post by RoryOF »

Usually the error is in content.xml. This file was either edited by MS Office, or saved in .doc format. I'll look now at the styles.xml, but my normal experience is with damaged content.xml, so I may not arrive at a fix.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Diana2505
Posts: 2
Joined: Tue Mar 12, 2019 8:57 pm

Re: Corrupt file

Post by Diana2505 »

The content.xml is to large to attach here
open office 4.1.6 Windows
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupt file

Post by RoryOF »

The attached file now passes xml well-formedness tests; I don't know how what I have done will affect the styling of your file.
Attachments
styles.xml
(51.06 KiB) Downloaded 92 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupt file

Post by RoryOF »

Had you "track changes" turned on? If so, open content.xml in XML copy editor and (from memory, so you may need to use discretion) about line 3, column 3850 you may see a series of 11111111111 entries. These are normally something like <annotation>11111, repeating with increasing sequences of 1111s. Either delete them all, including their annotation tag, or leave only the shortest. I'm working from memory, so you will have to correct any detail in what I have instructed. Then reinsert content.cml and try to open your OO file.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupt file

Post by RoryOF »

Repaired file sent attached to PM.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Corrupt file

Post by RoryOF »

Just for the record - another file edited at one time in .doc format with Track Changes turned on.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply