openoffice如何把光标跳转到当前段落的段首或者段尾(宏实现)
Sub Main
oDoc = ThisComponent 'Get the current active document.
oViewCur = oDoc.getCurrentController().getViewCursor()
'msgbox oViewCur.dbg_methods
oTextCur = oDoc.getText().createTextCursorByRange(oViewCur)
'msgbox oTextCur.isStartOfParagraph()
oTextCur.gotoStartOfParagraph(false)
rem oTextCur.gotoStartOfParagraph(false) rem 段尾
'msgbox oTextCur.isStartOfParagraph()
oViewCur.gotoRange(oTextCur,false)