Created attachment 45978 [details] The faulty document in question When saving what I think are old Word 2 files I get the error dialog, "Error saving the document NON_7.doc: Error in writing sub-document styles.xml" It looks like there's an empty style name, that might be causing it? Incidentally although the text looks mangled it's actually in Thai with the charset iso8859-11 (or maybe TIS-620). When I use antiword to extract the text and then thaiconv to turn it into unicode then the Thai characters are revealed. I don't know if that's another bug because I don't know if LibreOffice should render this charset.
Created attachment 45979 [details] Another faulty document
Reproducible. One for cedric?
Just curious, is anyone working on this? Is there anything I can do to help?
(In reply to comment #3) > Just curious, is anyone working on this? Is there anything I can do to help? A WORKAROUND: I had a lot of files created in Microsoft Office 97 I suddenly needed. They all gave the "error in writing sub document styles.zml" when I opened them and tried to save in ODT format. There are some old bug reports from 2008 in the OO forums. Not word of any fixes, just some comments on "empty styles" and periods and numbers maybe as the cause. I tried saving in docx format using LO, No go. I then (1) loaded some files onto PC MS Office 2007 (2) opened them in Office (and went through a process of changing the registry to enable this!!!) here: http://support.microsoft.com/?kbid=922850 (3) saved as docx (4) transferred them back to the LO computer They now open and save fine, no more "error in writing sub document styles.zml" errors. I have found a bulk convert utility to do the other 2000 files.
That problem affects not Thai only. The Word 2 importer doesn't correct erroneous ANSI charset for fonts in localized Windows 3 versions.
I have had this problem with my word 2 (italian localized)late '90s documents, but I could save them as Microsoft Word 97/2000/XP/2003 (.doc) documents. I had then to close the document and reimport it in order to get rid of the empty styles I could not delete from the style manager and I could save them as odf at last. Hope this can help
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this. I noticed several times this line on console: warn:legacy.osl:3030:1:sw/source/filter/ww8/ww8par.cxx:3599: WW8: Please report this document, it may have a missing graphic Git history indicates this part has been added by http://cgit.freedesktop.org/libreoffice/core/commit/?id=1933979aab720c30a987636cab4070702f1f95e2 Caolan: is this warn still relevant in this old but still alive bug?
See attached. Similar error but unable to complete save. There appears to be an unnamed style in the Styles list on right. Has happened twice but do not yet know how to reproduce.
Created attachment 110295 [details] Showing error message on save, and unnamed style in Styles window
There is a style with id 1 which has 0xFF in all three arrays. It is ignored by MS Word apparently, but not by LO.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=52979151ca45f9a8aff1694f3c4e1b87ef971ba8 Resolves: fdo#36514 avoid empty style names in ww2 docs It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f070a64a1d3ccdb382a189506bd4c5001411fc11&h=libreoffice-4-4 Resolves: fdo#36514 avoid empty style names in ww2 docs It will be available in 4.4.0.0.beta2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Notes for unit test writers: Revert has to be done manually.