Created attachment 142895 [details] Example file from Word 2013 with w:themeShade attribute The attached three documents were created in Microsoft Office, and have a similar issue: the w:themeColor or the w:themeShade attributes inside a w:color tag gets duplicated, resulting a broken file. All three documents were made with track changes turned on, and had tracked changes near or around the broken tags. All documents were originally more complex, the attached files are simplified and focused on the bug. As the documents weren't made by us, we don't know exactly, how the bug can be reproduced. We uploaded three documents with similar issue to help in identifying the underlying bug causing the issue. These are the broken tags for each document: SAXParseException-themecolor-LO62Dev.docx: <w:color w:val="000000" w:themeColor="text1" w:themeColor="text1"/> SAXParseException-themecolor-2-LO62Dev.docx: <w:color w:val="000000" w:themeColor="text1" w:themeColor="text1"/> SAXParseException-wthemeshade-LO62Dev.docx <w:color w:val="365F91" w:themeColor="accent1" w:themeShade="bf" w:themeColor="accent1" w:themeShade="bf"/> Steps to reproduce: 1. Open a file ending with -MSO (SAXParseException-themecolor-MSO.docx, SAXParseException-themecolor-2-MSO.docx or SAXParseException-wthemeshade-LO62Dev.docx) 2. Save the file as DOCX with LibreOffice Writer. 3. Reopen the saved file in LibreOffice Writer or Microsoft Word. Actual results: An attribute inside a w:color tag gets duplicated, resulting the file to open with an “SAXParseException: '[word/document.xml line 2]” error message. Expected results: Attributes inside w:color tags shouldn't duplicate.
Created attachment 142896 [details] First example file saved from current LO 6.2master
Created attachment 142897 [details] Screenshot of the error message
Created attachment 142898 [details] Second example file from Word, with w:themeColor attribute
Created attachment 142899 [details] Second example file saved from current LO 6.2 master
Created attachment 142900 [details] Screenshot of the second files error message
Created attachment 142901 [details] Third example file from Word with w:themeColor tag
Created attachment 142902 [details] Third example file saved by current LO 6.2 master
Created attachment 142903 [details] Screenshot of the third files error message
Already in 5.0.2 (tested on Win). 4.4.7 eats most of the table. 4.3.0 looks kind of ok, but I'm not sure if there is some underlying feature that became supported after this point Arch Linux 64-bit Version: 6.2.0.0.alpha0+ Build ID: 5b42a17dc99fba2ccf8dd8d0a8e0e4e836e30120 CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: kde4; Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded Built on June 22nd 2018
The problematic part is in MSWordExportBase::OutputTextNode. First, it takes pRedlineData from SwWW8AttrIter (which extra data has a grab bag with the properties); then it calls SwWW8AttrIter::OutAttr(), which also finds the same grab bag, and outputs it; and then (back in MSWordExportBase::OutputTextNode) AttrOutput().EndRunProperties is called, which *may* output the redline with the grab bag (creating the duplication). RtfAttributeOutput::EndRunProperties doesn't output the redline data; so I'm not sure what to do here. Michael: could you please take a look if you have any idea here?
I had similar problem, related to track changes. If I accept the changes, the problem is gone. See it here: https://bugs.documentfoundation.org/show_bug.cgi?id=120428
*** Bug 120428 has been marked as a duplicate of this bug. ***
Bug 120428 has example attachment 145531 [details] with preview attachment 145526 [details].
Created attachment 149811 [details] The first example file exported with current master build With current master build from bbc5347be70d11d187cd537dd73cdab584def719 the problem is no longer present.
Created attachment 149812 [details] The second example file exported with current master build This works fine too.
Created attachment 149813 [details] The third example file exported with current master build The third files export opens fine too.
*** This bug has been marked as a duplicate of bug 123705 ***