> On Aug 4, 2021, at 7:54 AM, Arrigo Marchiori <ard...@yahoo.it.INVALID> wrote: > > Hello Jim, > > On Wed, Aug 04, 2021 at 07:39:14AM -0400, Jim Jagielski wrote: > >> Can you apply the below to your catalina branch build and see how it works? >> >> diff --git a/main/comphelper/inc/comphelper/extract.hxx >> b/main/comphelper/inc/comphelper/extract.hxx >> index dc67c5dc58..97c4d080f4 100644 >> --- a/main/comphelper/inc/comphelper/extract.hxx >> +++ b/main/comphelper/inc/comphelper/extract.hxx >> @@ -131,16 +131,22 @@ inline sal_Bool SAL_CALL extractInterface( >> inline sal_Bool SAL_CALL any2bool( const ::com::sun::star::uno::Any & rAny ) >> throw( ::com::sun::star::lang::IllegalArgumentException ) >> { >> - if (rAny.getValueTypeClass() == >> ::com::sun::star::uno::TypeClass_BOOLEAN) >> + bool bValue; >> + sal_Bool sBValue; >> + if ( rAny >>= bValue ) >> { >> - return *(sal_Bool *)rAny.getValue(); >> + return *(sal_Bool *)bValue; // Why not just >> (sal_Bool)bValue ? > > Are you sure about returning "*(sal_Bool *)bValue"? Are we not > treating bValue as a pointer here, while it is a bool? > To me it looks like returning either *0 or *1... >
Well, 2 things: 1. As you can see, the format is the exact that we've had all along 2. We cast as a pointer to a sal_Bool and then get the contents of the pointer (ie: re return the deref of the pointer, not the pointer Why we do that (cast as a pointer and then deref) is curious, hence the comment > Thank you in advance and best regards, > -- > Arrigo > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org > <mailto:dev-unsubscr...@openoffice.apache.org> > For additional commands, e-mail: dev-h...@openoffice.apache.org > <mailto:dev-h...@openoffice.apache.org>