Hi, I see. The problem is there in the framework::AddonsOptions_Impl::ReadMenuItem method. If the menu item has own sub menu item, the URL for the item is replaced with internally generated URL like private:menu/Addon prefix with incremented number. So there is no way to know the assigned URL for the addon. When I add "hid/private:menu/Addon1" to the help file, the tooltip was shown correctly. But this way is useless.
Regards 2015-09-12 1:55 GMT+09:00 Keith Alcock <ke...@keithalcock.com>: > Tsutomu, > > Thank you, however this doesn't work for me on OpenOffice 4.0.1 and > Windows. I will double check on Linux. With your new code, the submenu or > menuitem "Menu1" is added and it will show a tooltip matching the copy > command, but the original menu "MenuWithTip" will lose its own tooltip when > the submenu is added. That's the problem I'm trying to solve and this is a > good demonstration of it. > > When I install your first example and check to see what the helpUrl is, I > see "swriter: foo.bar: MenuHelpTip" and the tooltip appears. When I > install the second example, without the first, and check, I see "swriter: > private:menu/Addon1" and no tooltip appears. Do you see the same thing? > > Thanks for your help. It may be time to check through the bug list. This > seems like a design problem that won't be easily fixed. > > Keith > > 2015-09-10 21:13 GMT-07:00 Tsutomu Uchino <hanya.r...@gmail.com>: > > > Hi, > > Like the following. I needed to add oor:op="replace" to node "a1". > > Regards > > > > > > <?xml version='1.0' encoding='UTF-8'?> > > <oor:component-data > > xmlns:oor="http://openoffice.org/2001/registry" > > xmlns:xs="http://www.w3.org/2001/XMLSchema" > > oor:package="org.openoffice.Office" > > oor:name="Addons"> > > <node oor:name="AddonUI"> > > <node oor:name="OfficeMenuBarMerging"> > > <node oor:name="foo.bar.MenuHelpTip" oor:op="fuse"> > > <node oor:name="foo.bar.MenuHelpTip.sub" oor:op="replace"> > > <prop oor:name="MergePoint"> > > <value>.uno:HelpMenu</value> > > </prop> > > <prop oor:name="MergeCommand"> > > <value>AddBefore</value> > > </prop> > > <prop oor:name="MergeFallback"> > > <value>AddPath</value> > > </prop> > > <prop oor:name="MergeContext"> > > <value></value> > > </prop> > > <node oor:name="MenuItems"> > > <node oor:name="child" oor:op="replace"> > > <prop oor:name="Title"> > > <value xml:lang="en-US">~MenuWithTip</value> > > </prop> > > <prop oor:name="URL"> > > <value>foo.bar:MenuHelpTip</value> > > </prop> > > <prop oor:name="Target"> > > <value>_self</value> > > </prop> > > <prop oor:name="Context"> > > <value></value> > > </prop> > > <node oor:name="Submenu"> > > <node oor:name="a1" oor:op="replace"> > > <prop oor:name="Title"> > > <value>Menu1</value> > > </prop> > > <prop oor:name="URL"> > > <value>.uno:Copy</value> > > </prop> > > <prop oor:name="Target"> > > <value>_self</value> > > </prop> > > <prop oor:name="Context"> > > <value></value> > > </prop> > > </node> > > </node> > > </node> > > </node> > > </node> > > </node> > > </node> > > </node> > > </oor:component-data> > > > > 2015-09-11 5:31 GMT+09:00 Keith Alcock <ke...@keithalcock.com>: > > > > > Tsutomu, > > > > > > Thanks! I do get an empty menu titled "MenuWithTip" in the menu bar > > with a > > > tooltip "This menu is a tooltip example." However, it is an empty menu > > > that has no menu items when it opens. If I try to add some menu items, > > > they don't appear. Perhaps I'm doing it wrong. Your menu is one level > > > further down in the node hierarchy. Perhaps it does not support > > subnodes. > > > Can you add some menu items and still have the tooltip work? Thanks. > > > > > > Keith > > > > > > 2015-09-10 4:26 GMT-07:00 Tsutomu Uchino <hanya.r...@gmail.com>: > > > > > > > Hi, > > > > > > > > Here is an example to specify tooltip to the menu inserted by the > > > > Addons.xcu file. > > > > https://dl.dropboxusercontent.com/u/91791736/MenuHelpTip.oxt > > > > > > > > The entry has "foo.bar:MenuHelpTip" URL and index.xhp file contains > the > > > > following bookmark and > > > > ahelp: > > > > <bookmark branch="hid/foo.bar:MenuHelpTip" id="bm_idfoobar12" > > > > localize="false"/> > > > > ... > > > > <paragraph role="paragraph" id="par_idfoobartip"><ahelp hid=".">This > > menu > > > > is a tooltip example.</ahelp></paragraph> > > > > The branch attribute have to match with the menu URL. > > > > > > > > > > > > Jump to a specified position in the help file is work well but > > sometimes > > > > not its not work because of the > > > > loading duration. > > > > > > > > Regards > > > > > > > > > > > > 2015-09-08 5:19 GMT+09:00 Keith Alcock <ke...@keithalcock.com>: > > > > > > > > > API, > > > > > > > > > > I noticed that the standard menus for Writer (File, Edit, View,...) > > > when > > > > > open and hovered over will show tooltips. For Edit, this is "This > > menu > > > > > contains commands for editing the contents of the current > document." > > > My > > > > > extension also has a menu, specified in Addons.xcu, but there is no > > > such > > > > > tooltip. I have menu items which have URLs which will show the > > > tooltips > > > > > specified in *.xhp file bookmarks. This much works like the > standard > > > > menu > > > > > items, but how do I provide a tooltip for the menu itself? > > > > > > > > > > If I set HELP_DEBUG=TRUE and hover over menus, then the one for > mine > > > has > > > > a > > > > > URL of "swriter: private:menu/Addon1" Using the entirety or just > > > > > "private:menu/Addon1" in an *.xhp file will not get me the tooltip. > > > Even > > > > > if it did, the solution would not be general. How can this be > done? > > > > > > > > > > Also does anyone know if it is possible to jump to a certain > position > > > in > > > > a > > > > > help file when the corresponding control in a dialog is selected? > I > > > can > > > > > easily get the correct help page to appear when the dialog is open > > and > > > F1 > > > > > is pressed, but I can't automatically scroll down the page so that > > the > > > > most > > > > > pertinent content is displayed. It's as if all bookmarks and ahelp > > > tags > > > > > may as well be at the top of the page. Is this scrolling > > implemented? > > > > > > > > > > Thanks, > > > > > > > > > > Keith > > > > > > > > > > > > > > >