I have a macro in LibreOffice Writer that changes the case of the word the cursor is in. It works great except when the cursor is in a footnote, where it faults out. The partial code:
Document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") oVC = ThisComponent.CurrentController.getViewCursor oTC = ThisComponent.Text.createTextCursorByRange(oVC) ' <-the footnote error ctext = oTC.string ' get selected text
The next to last line, defining oTC, is where the error occurs. Apparently the .Text spec in that line doesn't include footnotes, which is what I also gather reading Andrew's OOME book. But I haven't been able to figure out how to generalize the macro so it will work both in the main document and in footnotes. Any help would be appreciated.