Apache OpenOffice (AOO) Bugzilla – Issue 33886
Cant create a textCursor on Redline's XText interface
Last modified: 2013-08-07 14:38:26 UTC
The XText interfaces has functions for creating TextCursor. Every Redline has an XText interface and trying to create a TextCursor with a redline's XText interface causes an exception. redlineEnum = document.getRedlines() while redlineEnum.hasMoreElements(): nextRedline = redlineEnum.nextElement() try: textCursor = nextRedline.Text.createTextCursor() except Exception, e: print "x" print e Prints out: x
MRU->SW: Is this API stuff?
SW->TL: to reproduce just record changes with "Edit-changes-record" and type something in your testdocument. Afterwards execute the following macro Sub Main On Error goto buah redlineEnum = thiscomponent.getRedlines() msgbox redlineEnum.Count nextOne = redLineEnum(0) msgbox nextOne.String textCursor = nextOne.Text.createTextCursor() msgbox testcursor.dbg_methods exit sub buah: print "exception" End Sub => a message box stating that an exception appeared pops up
According to OS the implementation of redlining is planned to be changed considerably in the next release and fixing this will become considerable easier. Thus we should wait until redlining implementation has changed.
Adding mtg as CC