Issue 16896 - XDIML: Document looses bookmarks when saved
Summary: XDIML: Document looses bookmarks when saved
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC
Hardware: PC Windows 2000
: P2 Trivial (vote)
Target Milestone: ---
Assignee: eric.savary
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-15 18:22 UTC by openoffice
Modified: 2013-08-07 14:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
original bugdoc, .doc format (1.09 MB, application/octet-stream)
2003-07-15 18:22 UTC, openoffice
no flags Details
bugdoc, after saving with OOo (888.78 KB, application/octet-stream)
2003-07-15 18:23 UTC, openoffice
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description openoffice 2003-07-15 18:22:12 UTC
I received the following bugreport via email:
When the following document is imported from .doc format, its XML contains
bookmarks in the wrong order, i.e. <text:bookmark-end/> followed by
<text:bookmark-start/> for the same bookmark ID. When this document is loaded
and saved once more, the faulty bookmark elements are removed from the file.
Comment 1 openoffice 2003-07-15 18:22:56 UTC
Created attachment 7712 [details]
original bugdoc, .doc format
Comment 2 openoffice 2003-07-15 18:23:34 UTC
Created attachment 7713 [details]
bugdoc, after saving with OOo
Comment 3 openoffice 2003-07-15 18:24:27 UTC
dvo: Apparently, there is a problem with exporting range bookmarks
over empty ranges. 
Comment 4 openoffice 2003-10-22 15:14:21 UTC
dvo: Found & Fixed.

For the SwTextPortionEnumeration, bookmarks were only sorted according
to position, not according to their logical start/end. The result was
that start/end for bookmarks on the same position was quasi-random.
However, reversed bookmarks were (rightly) discarded by the file
import. The fix is to use logical start/end as tie breaker when
sorting bookmark positions.

Fixed in unoportenum.cxx#339 in CWS sw7pp1b, which should make it into
OOo 1.1.1.
Comment 5 openoffice 2003-10-30 17:34:39 UTC
dvo->es: Please test.

Easiest way to test is to load bugdoc, save as .sxw and then reload.
Observe the number of bookmarks before and after.
Comment 6 eric.savary 2003-10-31 18:13:23 UTC
FIXED
Comment 7 eric.savary 2003-10-31 18:14:08 UTC
ES: verified in sw7pp1b
Comment 8 h.ilter 2004-01-28 14:59:00 UTC
Verified with integrated 645m27s1-1_8738 = ok