Apache OpenOffice (AOO) Bugzilla – Issue 67878
creation of bookmarks with dimension does not work with some XTextRanges
Last modified: 2017-05-20 11:17:39 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 mytext.setString("Hallo") range = mytext 'range = mytext.createTextCursorByRange(mytext) bookmark = doc.createInstance("com.sun.star.text.Bookmark") bookmark.setName("test") range.Text.insertTextContent(range, bookmark, true) End Sub
jsc -> os: mmh i think this is one for you or better TL
Changing plattform and os to all. Can someone please confirm this?
SwXBookmark::attachToRange() accepts SwXTextCursor and SwXTextRange, only.
Component changed, Target set to 2.x
move target to 3.x according http://wiki.services.openoffice.org/wiki/Target_3x
Reset assigne to the default "issues@openoffice.apache.org".