|
tools 
拡張機能などでの利用。
tools.py
0
1
2
3
4
5
6
7
8
9
10
11
12
13
| | def get_extension_dirurl(ctx, extid):
"""Get extension directory url from the extension id."""
pip_name = u'/singletons/com.sun.star.deployment.PackageInformationProvider'
if ctx.hasByName(pip_name):
pip = ctx.getByName(pip_name)
return pip.getPackageLocation(extid)
return u''
def create_dialog_from_url(ctx, dlg_url):
"""Create dialog from URL."""
dlgprov = ctx.ServiceManager.createInstanceWithContext(
u'com.sun.star.awt.DialogProvider', ctx )
return dlgprov.createDialog(dlg_url)
|
|