Two related problems with docx files, which both seem to arise from LO putting and expecting raw ampersands, rather than & entities, in the docx file's docProps/core.xml file. Steps to reproduce the FILESAVE problem: 1. Create new, empty writer document. 2. Set the document title (File->Properties->Description->Title) to a value containing an ampersand, e.g. "Title & more" 3. Save as Microsoft Word 2007/2010 XML (.docx). 4. Attempt to load in Microsoft Word 2010. Expected result: Document loads successfully. Actual result: "The file ... cannot be opened because there are problems with the contents", and and offer to recover. Contents of the relevant field in docProps/core.xml: <dc:title>Title & more</dc:title> Steps to reproduce the FILELOAD problem: 1. Create a new, empty document in Microsoft Word 2010. 2. Set the document title to a value containing an ampersand. 3. Save in Microsoft Word's native docx format. 4. Load in LO. Expected result: Loads with title set correctly. Actual result: File loads normally, but the title is truncated, but all of the title up to and including the ampersand is lost -- in the above example, the title would appear as " and more". Contents of the relevant field in docProps/core.xml: <dc:title>Title & more</dc:title> These issues are easily worked around by avoiding using ampersands in document titles. However it is probably worth investigating in case there are some other, more serious situations in which we are generating invalid XML, or failing to parse XML correctly, for the same underlying reason. I have not yet checked whether the same issue arises with XLSX and PPTX files, or with other metadata fields.
Hi, Thanks for reporting and the clear steps! I can reproduce this behavior using Mac OSX 10.8.3 with LibreOffice 4.0.2.2 in combination of Word for Mac 2011. Therefore I mark this as NEW. Marking this bug as Medium Low Medium: odd behavior of the title field, can cause some problems when the recovery isn't successful using Word Low: not used that many, therefore lowering the priority a bit. Kind regards, Joren
abdulmajeed ahmed committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=36de708ce421b31beaaddb1048d444de91b2e5e9 fix fdo#63053 ampersand in document title causes corrupt docx 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.
Can we have a sample doc so the fix could be verified ?