Questions about getCppuType
sbergman at redhat.com
Mon May 5 00:07:39 PDT 2014
On 04/25/2014 11:06 PM, julien2412 [via Document Foundation Mail
> I've begun to replace some parts and had this when I've changed this:
> else if ( pType == ::getCppuType((const sal_uInt16*)0) )
> into this:
> else if ( pType == cppu::UnoType<const sal_uInt16>::get() )
That's the problem with getCppuType, that sal_uInt16 (representing UNO
UNSIGNED SHORT) and sal_Unicode (representing UNO CHAR) can be typedefs
for one and the same type, so getCppuType arbitrarily has to decide for
one of those.
With cppu::UnoType, instead use cppu::UnoUnsignedShortType and
cppu::UnoCharType as template arguments, respectively. (And do get rid
of the useless "const" in the template arguments.)
View this message in context: http://nabble.documentfoundation.org/Questions-about-getCppuType-tp4106361p4107618.html
Sent from the Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LibreOffice