vcl checkbox behaviour

Noel Power nopower at
Wed Jul 4 12:12:38 PDT 2012

On 29/06/12 10:09, Noel Power wrote:
> On 28/06/12 19:02, Jan Holesovsky wrote:
> [...]
>> Actually the "for quite a while" spans to 
>> 8ab086b6cc054501bfbf7ef6fa509c393691e860, the inital import of 
>> button.cxx to CVS :-( - it has been imported in 2000 with this 
>> already in place. Looking deeper, I thought that the 'alignment of 
>> checkboxes without text' behavior might make sense for the dialogs 
>> like Tools -> Options -> Load/Save -> Microsoft Office and alike, 
>> where you'd want to center the checkbox;
> sure and any such instances could be covered by setting the bounding 
> box of the checkbox appropriately I guess
>> but it seems to me that it is actually SvLBoxButton that is used 
>> there, not CheckBox.
> so no issue there ( but don't forget radio buttons afaict are also 
> treated the same way and probably would make sense to change them also )
>> So - can you in any way check if we are actually using this CheckBox 
>> feature anywhere in the UI? [Ie. if we construct a CheckBox without 
>> text, but with WB_CENTER or WB_RIGHT?] If we do not use it, I'd get 
>> rid of that [even in UNO controls and everywhere], as you proposed. 
>> Regards, Kendy 
> yes, I will try to check ( hopefully without missing anything ) :-) I 
> would also like to make an enhancement to really control the alignment 
> of the control itself e.g. either left or right. This would not affect 
> the behaviour previously described ( which is more about the 
> justification of the label ) but the position of the label relative to 
> the control e.g.
> - control aligned left:
> [x] some label
> - control aligned right:
> some label [x]

So, I spent quite some time today trolling through the source code, I 
could only find one place where either RadioButton or CheckBox had 
either WB_LEFT, WB_RIGHT or WB_CENTER set for the control ( and where 
there was no label ) It actually isn't even a vcl CheckBox but a 
TriStateBox that has WB_CENTER applied and then only in the specific 
case of the CheckBoxControl 
This class is used quite abit in dbaccess and also in one place in sw. 
So, I am going to take the plunge and remove this behaviour. Of course I 
am also going to try and modify CheckBoxControl to do the right thing 
without depending on this strange behaviour ( and cross fingers etc. 
that I didn't miss some usage of the weird 'feature' )

So.. basically last chance if you know of some reason why we really want 
to preserve the present behaviour.


More information about the LibreOffice mailing list