Questions about bool or sal_Bool in Any::setValue, makeAny

Matteo Casalin matteo.casalin at yahoo.com
Sun Nov 16 10:57:28 PST 2014


Hi all,
     I was converting all sw call-places to Any::setValue that pass 
sal_Bool to use bool instead. I wonder if this is a good choice or not, 
is there any guideline?
Also some of these call places look like:

     sal_Bool bTrue = sal_True;
     uno::Any aVal(&bTrue, ::getBooleanCppuType());
     some_function_call( aVal );

or

     uno::Any aAny;
     sal_Bool bFalse = sal_False;
     aTmp.setValue(&bFalse, ::getBooleanCppuType()  );
     some_function_call( aTmp );

could these be changed to use makeAny(bool)? Does this hold also if the 
same Any object is used multiple times (each time calling setValue on it)?

Thanks
Matteo


More information about the LibreOffice mailing list