vcl::Window Get/SetUniqueId - is it still needed?

Caolán McNamara caolanm at
Wed May 25 10:20:01 UTC 2016

On Wed, 2016-05-25 at 10:26 +0200, Katarina Behrens wrote:
> Hello world, 
> as it happens, I need to write a method of vcl::Window that will
> return its unique id. In most of the cases it'll be the same as its
> help id (i.e. path/to/ui/file/widget/within), but sometimes it won't.

> * What is vcl::Window Get/SetUniqueId good for and is it still needed
> nowadays, when most of the dialogs are not resource-based? 

A git grep on GetUniqueId seems to show that there is very little use
of this string anymore. A little in formula to identify widgets which
could be changed easily enough, and then mostly the rest are used to
set SetUniqueId on other things, which is a bit useless at this point.

So, yeah at this point I think we are pretty close to being able to
drop the UniqueId stuff.

It indeed *used* to be used a lot more before .ui-ification. But the
auto setting of help ids based on the widget tree removed a lot of the
need for it.

I guess it would be a pity if you needed to add a *new* UniqueID for
some reason when we should be removing the *old* UniqueID :-)

> * For some windows, argument of SetHelpId as well as SetUniqueId is
> the same (example:  sd/source/ui/view/drviewsa.cxx,
> DrawViewShell::Construct ). Isn't SetUniqueId call redundant in such
> case?

Those ones almost certainly do nothing of any use anymore.

> * For yet another windows that set their unique ID, this ID is
> referenced only in helpcontent2/helpers/help_hid.lst and nowhere else
> (i.e. in no .xhp file). 
> Can such ids be dropped? What is help_hid.list used for anyway?

I don't think help_hid.list is used by anything. At one point it might
have been used by Sun's qa/translators to track what's translated or
has help or something, but I've no idea what it was really for.


More information about the LibreOffice mailing list