Bug 163051 - Use UI path and widget ID instead of HID for integrating help
Summary: Use UI path and widget ID instead of HID for integrating help
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillDocumentation, topicCleanup, topicDoc
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2024-09-19 14:13 UTC by Hossein
Modified: 2024-10-05 16:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2024-09-19 14:13:25 UTC
Description:
As described in the Wiki page around integrated help, bookmarks are used to link the UI with HTML help contents:
https://wiki.documentfoundation.org/Development/Help

Some of these links are HIDs, defined in header files:
core/avmedia/inc/helpids.h

inline constexpr OUString HID_AVMEDIA_TOOLBOXITEM_PLAY   = u"AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PLAY"_ustr;

And they are used in the code, like this:
avmedia/source/framework/MediaControlBase.cxx

mxPlayToolBox->set_item_help_id(u"play"_ustr, HID_AVMEDIA_TOOLBOXITEM_PLAY);

If you search for that inside helpcontents2 submodule, you will find:

$ git grep HID_AVMEDIA_TOOLBOXITEM_PLAY
helpers/help_hid.lst:HID_AVMEDIA_TOOLBOXITEM_PLAY,63008,
source/text/shared/01/mediaplayer.xhp:<bookmark xml-lang="en-US" branch="hid/AVMEDIA_HID_AVMEDIA_TOOLBOXITEM_PLAY" id="bm_id8777736" localize="false"/>

The file helpers/help_hid.lst is not used, so it is only the xhp file.

The task here is to use UI path and widget ID instead of HID for integrating help. For example, here you may write:

<bookmark xml-lang="en-US" branch="hid/svx/ui/mediaplayback/play" id="bm_id8777737" localize="false"/> 

Please note that:
1. You have to search and find the related .ui file.
2. You should open the .ui file, and find the widget ID. Here, it was "play".
3. The extension, .ui is removed, 'hid/' is the prefix and '/play' is the suffix.

You may have to update other links to this bookmark in helpcontents2.