diff options
Diffstat (limited to 'cppu/inc')
-rw-r--r-- | cppu/inc/cppu/unotype.hxx | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/cppu/inc/cppu/unotype.hxx b/cppu/inc/cppu/unotype.hxx index aa3935461803..a633151aa962 100644 --- a/cppu/inc/cppu/unotype.hxx +++ b/cppu/inc/cppu/unotype.hxx @@ -4,9 +4,9 @@ * * $RCSfile: unotype.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: hr $ $Date: 2006-01-26 17:46:21 $ + * last change: $Author: rt $ $Date: 2006-03-09 10:44:54 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -320,7 +320,7 @@ getTypeFavourUnsigned(T const *) { @since UDK 3.2.2 */ inline ::com::sun::star::uno::Type const & -getTypeFavourUnsigned(sal_uInt16 const *) { +getTypeFavourUnsigned(::sal_uInt16 const *) { return ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get(); } @@ -338,6 +338,59 @@ template< typename T > inline ::com::sun::star::uno::Type const & getTypeFavourUnsigned(::com::sun::star::uno::Sequence< T > const *); // defined in com/sun/star/uno/Sequence.hxx +/** + A working replacement for getCppuType (see there). + + There are three overloads of this function that together form the replacement + of the getCppuType template. The replacement has exactly the same semantics + as the getCppuType template, in that it returns correct results for the UNO + type CHAR but not for the UNO type UNSIGNED SHORT. Additionally, it also + returns the intended results for sequence types. + + @internal + + @since UDK 3.2.3 +*/ +template< typename T > inline ::com::sun::star::uno::Type const & +getTypeFavourChar(T const *) { + return ::cppu::UnoType< T >::get(); +} + +/** + A working replacement for getCppuType (see there). + + There are three overloads of this function that together form the replacement + of the getCppuType template. The replacement has exactly the same semantics + as the getCppuType template, in that it returns correct results for the UNO + type CHAR but not for the UNO type UNSIGNED SHORT. Additionally, it also + returns the intended results for sequence types. + + @internal + + @since UDK 3.2.3 +*/ +inline ::com::sun::star::uno::Type const & +getTypeFavourChar(::sal_Unicode const *) { + return ::cppu::UnoType< ::cppu::UnoCharType >::get(); +} + +/** + A working replacement for getCppuType (see there). + + There are three overloads of this function that together form the replacement + of the getCppuType template. The replacement has exactly the same semantics + as the getCppuType template, in that it returns correct results for the UNO + type CHAR but not for the UNO type UNSIGNED SHORT. Additionally, it also + returns the intended results for sequence types. + + @internal + + @since UDK 3.2.3 +*/ +template< typename T > inline ::com::sun::star::uno::Type const & +getTypeFavourChar(::com::sun::star::uno::Sequence< T > const *); + // defined in com/sun/star/uno/Sequence.hxx + } #endif |