Apache OpenOffice (AOO) Bugzilla – Issue 79611
Read Error due to "text:bookmark" inside frame properties
Last modified: 2013-08-07 14:42:39 UTC
Another issue found during extending the OpenDoc-support in KWord. Reproduce; 1. To try to load the attached odt file 2. OO.org say "Read Error.\nError reading file." This was confirmed to happen with 2.2.0 and 2.2.1 by one of our users and myself. The odt was validated against the strict relax-ng schema and it's a valid odt-file. To be sure it's not our fault I did future investigate the file and it seems the problem is in the content.xml within the; <draw:frame draw:name="Rahmen4" draw:style-name="fr2" svg:x="70.8379179942pt" svg:y="289.1627056658pt" text:anchor-type="page" text:anchor-page-number="1" draw:z-index="6" svg:width="496.0638515pt" svg:height="14.0882133826pt"> <draw:text-box fo:min-height="0.01pt"> <text:p text:style-name="P5"> <text:bookmark text:name="Bezugszeichen"/> Some text </text:p> </draw:text-box> </draw:frame> Removing here the <text:bookmark text:name="Bezugszeichen"/> does fix that issue and OOWriter is able to load and display the file correct again.
Created attachment 46776 [details] The original odt-file that was reported to don't work.
Created attachment 46777 [details] A trimmed down version of that odt-file to outline where the problem is.
MRU->HBRINKM: could you please have a look if this is a valid xml-structure? There is a "text:bookmark" part inside a frame definition.
HB->AMA: I think this is more your cup of tea. :-)
Fixed in CWS swqbf102 XMLTextMarkImportContext.cxx
Just a question re the fix ( http://xml.openoffice.org/source/browse/xml/xmloff/source/text/XMLTextMarkImportContext.cxx?r1=1.10&r2=1.10.22.1 ). The try{}catch(...){} just prevents the error-message but doesn't not fix the error. So, if this is really the right fix, should I create a new report that asks to let OOWriter support bookmarks within frames?
Yes, this is the right fix to be able to load such documents. And yes, you could submit new request for an implementation of a bookmark feature for shapes. t the moment the Writer only supports bookmarks in normal text, headers, footers, tables etc. If you use Writer frames, bookmarks are available, too. But if you use drawing objects (shapes), there is no implementation for bookmarks.
Ready for QA.
Verified in CWS swqbf102
Ok in m225
added myself as cc