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

Katarina Behrens Katarina.Behrens at cib.de
Wed May 25 10:53:36 UTC 2016


> > 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. 
... 
> 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 :-)

I guess I should've made it clear what do I need vcl::Window's unique ID for: 
it's for the purpose of dialog screenshots, where some identifier is needed to 
distinguish between more possible "configurations" of the dialog or tabpage 
(example: font effects tabpage showing different set of widgets when opened in 
Writer vs. Impress or Calc).

In most of the cases, this ID would be the same as the dialog's/widget's help 
ID. In cases where it'd be different, SetUniqueId method would be overridden 
for the given tabpage, to return different strings depending on the state the 
tabpage is in. 

So it's not really about dropping Get/SetUniqueId, it's more about re-
purposing it :) Of course it can be named differently, it's just that 
Get/SetUniqueId was the first name that came to my mind and then I realized it 
already exists


-- 

Katarina Behrens

Softwareentwicklerin LibreOffice
–––
CIB software GmbH
Geschäftsstelle Hamburg
Flachsland 10
22083 Hamburg
–––
T +49 (40) / 28 48 42 -235
F +49 (40) / 28 48 42 -100

Katarina.Behrens at cib.de
www.cib.de
–––
Sitz: München
Registergericht München, HRB 123286
Geschäftsführer: Dipl.-Ing. Ulrich Brandner


More information about the LibreOffice mailing list