有的时候希望查询一个服务或者接口有哪些方法通过msgbox查看不太方便,于是想到一个方法将其输出到odt文档然后通过查找功能查找即可
REM ***** BASIC *****
Sub Main
InsertStringToOdt(thiscomponent.dbg_methods)
End Sub
Function InsertStringToOdt(str as string)
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oText = ThisComponent.GetText()
oCurs = ThisComponent.getCurrentController().getViewCursor()
oText.insertString(oCurs, str, False)
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertPara", "", 0, Array())
End Function