Issue 67878 - creation of bookmarks with dimension does not work with some XTextRanges
Summary: creation of bookmarks with dimension does not work with some XTextRanges
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 2.0.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2006-07-28 14:47 UTC by clutz
Modified: 2017-05-20 11:17 UTC (History)
4 users (show)

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


Note You need to log in before you can comment on or make changes to this issue.
Description clutz 2006-07-28 14:47:59 UTC
I want to create a bookmark that encloses a textrange with a dimension != 0 
(different range.Start and range.End positions). It seems that this does not
work with some kind of XTextRanges and it is not clear, why these XTextRanges
don't work.

For example:
running the following code, an IllegalArgument-Exception is returned, wheras if
you uncomment the line "range = mytext.createTextCursorByRange(mytext)" the code
works correct.

The TextCursor I create should not be necessary, as insertTextContent only
requires a normal XTextRange and not a XTextCursor.

Sub insertBookmarkWithDimensionBug
    doc = ThisComponent

    mytext = doc.Text

    range = mytext
    'range = mytext.createTextCursorByRange(mytext)

    bookmark = doc.createInstance("")
    range.Text.insertTextContent(range, bookmark, true)
End Sub
Comment 1 jsc 2006-07-28 15:28:47 UTC
jsc -> os: mmh i think this is one for you or better TL
Comment 2 clutz 2007-03-16 11:14:36 UTC
Changing plattform and os to all.

Can someone please confirm this?
Comment 3 Oliver Specht 2007-03-16 13:39:28 UTC
SwXBookmark::attachToRange() accepts SwXTextCursor and SwXTextRange, only.
Comment 4 Oliver Specht 2007-03-16 13:40:07 UTC
Component changed, Target set to 2.x
Comment 5 Martin Hollmichel 2007-09-10 13:36:07 UTC
move target to 3.x according
Comment 6 Marcus 2017-05-20 11:17:39 UTC
Reset assigne to the default "".