summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-03-09 09:44:54 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-03-09 09:44:54 +0000
commitbd314b878a7177e4ad086e81e33e8af2b514e0a3 (patch)
tree7ca1df23216d72bace91d9ba7af9e8d3eb248e62
parent1177131400952f99d876efa9082e740f217ff0c3 (diff)
INTEGRATION: CWS jl31 (1.3.8); FILE MERGED
2006/02/20 16:00:30 sb 1.3.8.1: #i62339# Introduced (internal-only) cppu::getTypeFavourUnsigned as (working) replacement of now deprecated getCppuType<> template.
-rw-r--r--cppu/inc/cppu/unotype.hxx59
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