[Solved] Bind xhp to options dialog via help-url

Creating a macro - Writing a Script - Using the API

[Solved] Bind xhp to options dialog via help-url

Postby test357 » Wed Jun 10, 2020 11:12 am

tags: pyuno, xdl, xhp, help

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.


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

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">
      <topic id="topic_d1e3" indexer="include" status="PUBLISH">
         <title xml-lang="en" id="title_d1e3">Translation settings</title>
   <bookmark id="bm_d1e7"

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).
Last edited by test357 on Fri Jun 12, 2020 6:39 am, edited 2 times in total.
OpenOffice 4.0 on Ubuntu 19.04
Posts: 2
Joined: Wed Jun 10, 2020 10:30 am

Re: Bind xhp to options dialog via help-uri=/bookmrk branch=

Postby test357 » Fri Jun 12, 2020 6:36 am

I'm voting to close this question as off-topic, as it's no longer reproducible
or was caused by a typo, and is unlikely to help future readers.

So, it should have been `dlg:help-url=` and not `-uri` all along.
(Not sure where I found that sample. And for once it's indeed a locator, not an identifier.)

Code: Select all   Expand viewCollapse view

Which kinda makes the help button and F1 context-sensitive.
You still need to hit something in the settings dialog beforehand, but nevermind.

And presumably you can also use `dlg:help-url="pkgname:page"`, but haven't tested that.

Unfortunately there seems to be no way to get an hid/ or .uno: for any of the dialog widgets.
Btw, DEBUG_HELP=1 only works with Shift-F1 or Extended Tooltips enabled. → Shows some generic `cid/…/box` ID for all dialog widgets.
OpenOffice 4.0 on Ubuntu 19.04
Posts: 2
Joined: Wed Jun 10, 2020 10:30 am

Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests