Il 16/02/2012 00:02, Mariusz Dykierek ha scritto:
+ some simplification
> + sal_Bool bLeft = sal_True;
> + if ( ( meAlign == WINDOWALIGN_TOP ) || ( meAlign ==
> WINDOWALIGN_LEFT ) )
> + bLeft = sal_False;
I think that keeping possible values explicit could be a good thing so
what about a switch?
sal_Bool bLeft;
switch (meAlign) {
case WINDOWALIGN_TOP:
case WINDOWALIGN_LEFT:
bLeft = sal_False;
case WINDOWALIGN_BOTTOM:
case WINDOWALIGN_RIGHT:
default:
bLeft = sal_True;
}
Otherwise you can simplify it even more:
sal_Bool bLeft = (meAlign == WINDOWALIGN_TOP || meAlign ==
WINDOWALIGN_LEFT) ? sal_False : sal_True;
cheers
--
Riccardo Magliocchetti
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice