Bug 80499 - FILESAVE: duplicated style:font-name attribute in ods files
Summary: FILESAVE: duplicated style:font-name attribute in ods files
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) rc
Hardware: All All
: high major
Assignee: Not Assigned
Whiteboard: BSA
: 80793 (view as bug list)
Depends on:
Reported: 2014-06-24 20:34 UTC by CT
Modified: 2015-03-03 19:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

file that doesn't open correctly (16.02 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-06-27 14:21 UTC, MM
fixed file (17.10 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-06-27 21:00 UTC, Julien Nabet

Note You need to log in before you can comment on or make changes to this bug.
Description CT 2014-06-24 20:34:36 UTC
Problem description: 

Created a file with Calc and saved it. When I tried to open it, I got the following error:
Read-error. Format error discovered in the file in sub-document content.xml at 2,237278 (row, col)

OS: ARCH x86_64 
LO: 4.2.5-1

Operating System: Linux (Other)
Version: release
Comment 1 tommy27 2014-06-25 04:45:26 UTC
please upload test file
Comment 2 MM 2014-06-27 14:21:23 UTC
Created attachment 101870 [details]
file that doesn't open correctly
Comment 3 MM 2014-06-27 14:25:15 UTC
Tracked back to GO OO OOO320m19 (Build:9505). This is the earliest version *I* could find that has the same problem.
Comment 4 MM 2014-06-27 14:29:46 UTC
Changed platform to ALL, as it happens with LO 4.1, 4.2 & 4.3 under mint 16 and LO and GO OO 3.2.0 under windows 7 x64.
Comment 5 tommy27 2014-06-27 14:48:38 UTC
reproducible under Win7x64 using LO

my error says: Read-error. Format error discovered in the file in sub-document content.xml at 2,7793 (row, col)
Comment 6 Julien Nabet 2014-06-27 21:00:48 UTC
Created attachment 101896 [details]
fixed file

On pc Debian x86-64 with master sources updated today, I could reproduce this.

When trying to tidy the content.xml, I had this:
PC:$ cat content.xml | tidy -utf8 -xml -w 255 -i -c -q -asxml > content_new.xml 
line 2 column 7705 - Warning: <style:text-properties> dropping value "Arial" for repeated attribute "style:font-name"
line 2 column 8028 - Warning: <style:text-properties> dropping value "Arial" for repeated attribute "style:font-name"

I attached the file fixed but it could be interesting you give the steps to create this file (since according to meta file, it seems you created it with LO 4.2.5)
Comment 7 Maxim Monastirsky 2014-07-03 13:24:29 UTC
*** Bug 80793 has been marked as a duplicate of this bug. ***
Comment 8 Maxim Monastirsky 2014-07-03 13:37:49 UTC
It's not a bug when LO refuses to open corrupted files. The problem here is with the creation of such files. For this reason I set the version back to 4.2.5. Also I raise the importance, because LO shouldn't corrupt files.
Comment 9 Maxim Monastirsky 2014-07-03 14:21:24 UTC
Actually this file created with the RC, not with the final release. And it seems to be a duplicate of Bug 78927. Feel free to reopen - but only if you can *create* such files with the final release.

*** This bug has been marked as a duplicate of bug 78927 ***
Comment 10 Vincent François 2014-08-25 22:36:25 UTC
The bug is still there in LO on Mac OSX 10.7.5.

style:font-name-asian (and others related attributes) redefined in content.xml 

Once corrected into the content.xml, the rebuilt file cannot be open with LO but can be open with OO 4.1.0, then saved and reopened by LO.

Some times later the content is once more corrupted in the same way... 

The corrupted file can be found there : http://consultation-boreale.com/lo/error_in_content.ods
Comment 11 Maxim Monastirsky 2014-08-26 08:05:19 UTC
Hi Vincent,

This bug is about repeated "style:font-name", not repeated "style:font-name-asian". And the solution (in bug 78927) was to use "style:font-name-asian" for asian instead of "style:font-name". So this is IMHO a different issue, and it's better to open a new bug for it. Anyway 4.2.5 is not the latest version, and is not supported anymore, so please try with the latest version before submitting the bug. Thanks!
Comment 12 Julien Nabet 2015-03-03 11:15:05 UTC
I wonder if the root cause of comment 10 could be fixed thanks to http://cgit.freedesktop.org/libreoffice/core/commit/?id=cda9ae79e58d861a85128d6a37587b633b956aae