Issue 79611

Summary: Read Error due to "text:bookmark" inside frame properties
Product: Writer Reporter: dipesh <mail>
Component: open-importAssignee: eric.savary
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P2 CC: cno, issues
Version: OOo 2.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
The original odt-file that was reported to don't work.
none
A trimmed down version of that odt-file to outline where the problem is. none

Description dipesh 2007-07-14 00:18:23 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.
Comment 1 dipesh 2007-07-14 00:19:42 UTC
Created attachment 46776 [details]
The original odt-file that was reported to don't work.
Comment 2 dipesh 2007-07-14 00:20:59 UTC
Created attachment 46777 [details]
A trimmed down version of that odt-file to outline where the problem is.
Comment 3 michael.ruess 2007-07-16 09:05:57 UTC
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.
Comment 4 openoffice 2007-07-20 09:57:53 UTC
HB->AMA: I think this is more your cup of tea. :-)
Comment 5 andreas.martens 2007-07-23 15:01:08 UTC
Fixed in CWS swqbf102
XMLTextMarkImportContext.cxx
Comment 6 dipesh 2007-07-24 23:06:03 UTC
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?
Comment 7 andreas.martens 2007-07-25 11:58:08 UTC
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.
Comment 8 andreas.martens 2007-07-26 17:49:43 UTC
Ready for QA.
Comment 9 eric.savary 2007-07-27 14:58:37 UTC
Verified in CWS swqbf102  
Comment 10 eric.savary 2007-08-09 13:27:46 UTC
Ok in m225
Comment 11 cno 2007-11-01 16:33:04 UTC
added myself as cc