create a new page, using Extensions/OpenHelp as a template.
Front page
Search
掲示板
Reload
Help
Browse Log
掲示板の使い方
OOo 掲示板3
OOo 掲示板2
OOo 掲示板
掲示板
雑談掲示板
New
List of pages
Recent changes
Backup
簡単ヘルプ
整形ルール
Start:
* 拡張ヘルプを開く [#ja0c4031]
拡張機能のヘルプをコードから開くにはいくつかの方法があり...
#contents
** ボタン [#ofc5cd24]
ダイアログなどのボタンから開く場合にはボタンの種類を Help...
ページのアドレスの場合には mytools.calc.WacthingWindow/in...
** コントロール [#sec609e3]
ダイアログのコントロールの HelpURL に ahelp の hid を指定...
** What's this? [#z654d9b1]
.uno:ExtendedHelp コマンドを実行するとマウスカーソルの形...
** コード [#mfd16a3d]
コードから特定のヘルプのページを開く簡単な方法はありませ...
下記は無理やり開きます。
#code(python){{
class ...
def open_help(self):
help_exists = get_configvalue(
self.cast.ctx,u'/org.openoffice.Office.SFX',u'Help')
if not help_exists:
# cannnot open help
print(u'Faild to open help files. ", "Help system is n...
return
system_type = get_configvalue(self.cast.ctx,
u'/org.openoffice.Office.Common/Help',u'System')
lang_type = get_configvalue(self.cast.ctx,
u'/org.openoffice.Setup/L10N',u'ooLocale')
if not system_type:
system_type = u'WIN'
if not lang_type:
lang_type = get_configvalue(self.cast.ctx,
u'/org.openoffice.Office.Linguistic/General',u'Defaul...
hpage = u'vnd.sun.star.help://shared/mytools.mri%2Finde...
lang_type + u'&System=' + system_type + u'#bm_idindex'
help_frame = open_help(self.cast.desktop,hpage)
if not help_frame:
# retry
call_dispatch(self.cast.ctx,self.cast.desktop,u'.uno:H...
help_frame = open_help(self.cast.desktop,hpage)
if not help_frame:
print(u'Faild to open help files. \nHelp system is no...
return
call_dispatch(self.cast.ctx,help_frame,hpage)
# open help url (vnd.sun.star.help:...)
def open_help(desktop,url):
if not desktop: return None
task_frame = None
task_frame = desktop.findFrame(u'OFFICE_HELP_TASK',FSF_C...
if not task_frame: return None
help_frame = None
help_frame = task_frame.findFrame(u'OFFICE_HELP',FSF_CHI...
if not help_frame: return None
return help_frame
def call_dispatch(ctx,frame,cmdurl):
from com.sun.star.util import URL
url = URL()
url.Complete = cmdurl
transformer = ctx.ServiceManager.createInstanceWithConte...
u'com.sun.star.util.URLTransformer',ctx)
dummy,url = transformer.parseStrict(url)
dispatcher = frame.queryDispatch(url,u'_self',0)
if dispatcher:
dispatcher.dispatch(url,())
return True
return False
# read config value from the node and the property name
def get_configvalue(ctx,nodepath,prop):
from com.sun.star.beans import PropertyValue
ConfigProvider = ctx.ServiceManager.createInstanceWithCo...
u'com.sun.star.configuration.ConfigurationProvider',ctx)
node = PropertyValue()
node.Name = u'nodepath'
node.Value = nodepath
try:
ConfigReader = ConfigProvider.createInstanceWithArgumen...
u'com.sun.star.configuration.ConfigurationAccess',(nod...
if ConfigReader and (ConfigReader.hasByName(prop)):
return ConfigReader.getPropertyValue(prop)
except:
return None
}}
** アクティブヘルプ [#o9311aa3]
アクティブヘルプは次のような URI で取得できます。
vnd.sun.star.help://swriter/.uno%3AQuit?Language=en-US&S...
End:
* 拡張ヘルプを開く [#ja0c4031]
拡張機能のヘルプをコードから開くにはいくつかの方法があり...
#contents
** ボタン [#ofc5cd24]
ダイアログなどのボタンから開く場合にはボタンの種類を Help...
ページのアドレスの場合には mytools.calc.WacthingWindow/in...
** コントロール [#sec609e3]
ダイアログのコントロールの HelpURL に ahelp の hid を指定...
** What's this? [#z654d9b1]
.uno:ExtendedHelp コマンドを実行するとマウスカーソルの形...
** コード [#mfd16a3d]
コードから特定のヘルプのページを開く簡単な方法はありませ...
下記は無理やり開きます。
#code(python){{
class ...
def open_help(self):
help_exists = get_configvalue(
self.cast.ctx,u'/org.openoffice.Office.SFX',u'Help')
if not help_exists:
# cannnot open help
print(u'Faild to open help files. ", "Help system is n...
return
system_type = get_configvalue(self.cast.ctx,
u'/org.openoffice.Office.Common/Help',u'System')
lang_type = get_configvalue(self.cast.ctx,
u'/org.openoffice.Setup/L10N',u'ooLocale')
if not system_type:
system_type = u'WIN'
if not lang_type:
lang_type = get_configvalue(self.cast.ctx,
u'/org.openoffice.Office.Linguistic/General',u'Defaul...
hpage = u'vnd.sun.star.help://shared/mytools.mri%2Finde...
lang_type + u'&System=' + system_type + u'#bm_idindex'
help_frame = open_help(self.cast.desktop,hpage)
if not help_frame:
# retry
call_dispatch(self.cast.ctx,self.cast.desktop,u'.uno:H...
help_frame = open_help(self.cast.desktop,hpage)
if not help_frame:
print(u'Faild to open help files. \nHelp system is no...
return
call_dispatch(self.cast.ctx,help_frame,hpage)
# open help url (vnd.sun.star.help:...)
def open_help(desktop,url):
if not desktop: return None
task_frame = None
task_frame = desktop.findFrame(u'OFFICE_HELP_TASK',FSF_C...
if not task_frame: return None
help_frame = None
help_frame = task_frame.findFrame(u'OFFICE_HELP',FSF_CHI...
if not help_frame: return None
return help_frame
def call_dispatch(ctx,frame,cmdurl):
from com.sun.star.util import URL
url = URL()
url.Complete = cmdurl
transformer = ctx.ServiceManager.createInstanceWithConte...
u'com.sun.star.util.URLTransformer',ctx)
dummy,url = transformer.parseStrict(url)
dispatcher = frame.queryDispatch(url,u'_self',0)
if dispatcher:
dispatcher.dispatch(url,())
return True
return False
# read config value from the node and the property name
def get_configvalue(ctx,nodepath,prop):
from com.sun.star.beans import PropertyValue
ConfigProvider = ctx.ServiceManager.createInstanceWithCo...
u'com.sun.star.configuration.ConfigurationProvider',ctx)
node = PropertyValue()
node.Name = u'nodepath'
node.Value = nodepath
try:
ConfigReader = ConfigProvider.createInstanceWithArgumen...
u'com.sun.star.configuration.ConfigurationAccess',(nod...
if ConfigReader and (ConfigReader.hasByName(prop)):
return ConfigReader.getPropertyValue(prop)
except:
return None
}}
** アクティブヘルプ [#o9311aa3]
アクティブヘルプは次のような URI で取得できます。
vnd.sun.star.help://swriter/.uno%3AQuit?Language=en-US&S...
Page: