Issue 81343 - Bookmarks lost while replacing text in Writer document
Summary: Bookmarks lost while replacing text in Writer document
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.2.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-07 08:00 UTC by listmanster
Modified: 2013-02-07 21:53 UTC (History)
2 users (show)

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


Attachments
Writer file with bookmarks surrounding text (before doing a search and replace) (6.37 KB, application/vnd.oasis.opendocument.text)
2007-09-07 08:02 UTC, listmanster
no flags Details
Writer file with lost bookmarks after doing a search and replace (6.37 KB, application/vnd.oasis.opendocument.text)
2007-09-07 08:04 UTC, listmanster
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description listmanster 2007-09-07 08:00:26 UTC
1) Create a new writer document.

2) type some text : "This is some text"

3) insert a bookmark "bk01", before the word some.

4) insert a bookmark "bk02", after the word some. (right clicking on the status bar,  pages indicator 
displays the two bookmarks...)

5) now do a find and replace of the word "some" with "the",

6) so the sentence in the document appears as:
  "This is the text"

7) Now right click on the status bar, pages indicator, and only the
second bookmark remains ("bk02"), and this remaining bookmark is wrongly positioned at
the letter "t" of the repacement word "the" 

The same defect can be demonstrated via a macro using the ReplaceDescriptor API:

Dim oReplace
 oReplace = ThisComponent.createReplaceDescriptor() 
 oReplace.SearchString = "some"
 oReplace.ReplaceString = "the" 
 ThisComponent.ReplaceAll(oReplace)
Comment 1 listmanster 2007-09-07 08:02:39 UTC
Created attachment 48034 [details]
Writer file with bookmarks surrounding text (before doing a search and replace)
Comment 2 listmanster 2007-09-07 08:04:34 UTC
Created attachment 48035 [details]
Writer file with lost bookmarks after doing a search and replace
Comment 3 michael.ruess 2007-09-07 08:33:02 UTC
Reassigned to SBA.
Comment 4 kpalagin 2008-01-26 13:10:12 UTC
Confirming with 2.3.1 on WinXP - as described.