Issue 67878

Summary: creation of bookmarks with dimension does not work with some XTextRanges
Product: Writer Reporter: clutz <chrlutz>
Component: codeAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: baumux, chris_mux, issues, mux2005
Version: OOo 2.0.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

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 "".