Supposedly you can associate a helpdocument (.xhp) to an UNO extensions` settings dialog. And there's probably more than one way. But I really couldn't fiddle out which URL or path I screwed up. So, while the help page generally exists in the documentation index, it just won't come up when pressing F1 or Help within the settings window.
dlg:help-url="vnd.sun.star.help://help/pkg/page.xhp?…" → OptionsPage.xdl
So, the documentation on help-url= is somewhat scant. But I figured it might honor one of those expand URLs.
And I even got the right one from the bookmarks/userRegistry.xcu:
- Code: Select all Expand viewCollapse view
<dlg:window
xmlns:dlg="http://openoffice.org/2000/dialog"
xmlns:script="http://openoffice.org/2000/script"
dlg:id="OptionsPageTranslate"
dlg:help-uri="vnd.sun.star.help://help/vnd.include-once.pagetranslate/config.xhp?Language=en&System=UNIX&UseDB=no"
However, that neither works when associated to the dialog, nor individual checkboxes/fields/buttons.
Haven't really seen help-uri= being used anywhere, so the scheme is really just a guess.
<bookmark branch="hid/packagename:dialog_id"> → config.xhp
Alternatively it ought to be possible to have the help page associate itself to the dialog, or dialog elements at least.
And I've seen the "hid/pkg:opt" syntax in another extension (albeit for different dialogs and mostly just for fields/buttons).
- Code: Select all Expand viewCollapse view
<helpdocument version="1.0">
<meta>
<topic id="topic_d1e3" indexer="include" status="PUBLISH">
<title xml-lang="en" id="title_d1e3">Translation settings</title>
<filename>/help/vnd.include-once.pagetranslate/config.xhp</filename>
…
<bookmark id="bm_d1e7"
branch="hid/vnd.include-once.pagetranslate:OptionsPageTranslate"
xml-lang="en">
<bookmark_value>settings…</bookmark_value>
</bookmark>
Now the hid/… scheme seems somewhat better documented in https://wiki.documentfoundation.org/Documentation/Help_page_description.
But alas, that also didn't make F1 context-sensitive for my settings dialog and help page.
- Which makes me wonder if the <filename> is relevant to any of this. (Maybe that's what the dlg:help-uri= should refer to?)
- Or if there's an implicit `.uno:Whatever` for the dialog. (Not sure where that's documented. HELP_DEBUG=1 yields nothing.)
- Perhaps the branch=hid/… just needs a different pkgname.module.widget_id string composition? (Still no samples found.)
- Should the context-sensitivity work for the settings dialog at all, or just for widgets within?
(Edit: Bonus question on xslt/xml-stylesheet moved to mailing list..)
(Edit2: changed most `-uri` mentions and title to `-url` as not to further the typo on Google).