Kaydet (Commit) 99661d3f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Deprecate getCppuType et al in favor of cppu::UnoType

...which doesn't suffer from the sal_uInt16 vs. sal_Unicode ambiguity.

Change-Id: I4de265145e720615652e88b6a68e03903ad8cba2
üst 42c848c5
......@@ -357,7 +357,7 @@ void CppuType::dumpGetCppuTypePostamble(FileStream & out) {
}
}
dumpTemplateHead(out);
out << ("inline ::css::uno::Type const & SAL_CALL"
out << ("SAL_DEPRECATED(\"use cppu::UnoType\") inline ::css::uno::Type const & SAL_CALL"
" getCppuType(SAL_UNUSED_PARAMETER ");
dumpType(out, name_);
dumpTemplateParameters(out);
......@@ -560,7 +560,7 @@ void CppuType::dumpHFileContent(
}
out << "\n";
dumpTemplateHead(out);
out << "inline ::css::uno::Type const & SAL_CALL getCppuType(";
out << "SAL_DEPRECATED(\"use cppu::UnoType\") inline ::css::uno::Type const & SAL_CALL getCppuType(";
dumpType(out, name_, true);
dumpTemplateParameters(out);
out << " *);\n\n#endif\n";
......@@ -569,7 +569,7 @@ void CppuType::dumpHFileContent(
void CppuType::dumpGetCppuType(FileStream & out) {
if (name_ == "com.sun.star.uno.XInterface") {
out << indent()
<< ("inline ::css::uno::Type const & SAL_CALL"
<< ("SAL_DEPRECATED(\"use cppu::UnoType\") inline ::css::uno::Type const & SAL_CALL"
" getCppuType(SAL_UNUSED_PARAMETER ");
dumpType(out, name_, true);
out << " *) {\n";
......@@ -581,7 +581,7 @@ void CppuType::dumpGetCppuType(FileStream & out) {
out << indent() << "}\n";
} else if (name_ == "com.sun.star.uno.Exception") {
out << indent()
<< ("inline ::css::uno::Type const & SAL_CALL"
<< ("SAL_DEPRECATED(\"use cppu::UnoType\") inline ::css::uno::Type const & SAL_CALL"
" getCppuType(SAL_UNUSED_PARAMETER ");
dumpType(out, name_, true);
out << " *) {\n";
......@@ -1110,9 +1110,9 @@ void InterfaceType::dumpHxxFile(
<< codemaker::cpp::scopedCppName(u2b(name_))
<< "::static_type(SAL_UNUSED_PARAMETER void *) {\n";
inc();
out << indent() << "return ::getCppuType(static_cast< ";
dumpType(out, name_);
out << " * >(0));\n";
out << indent() << "return ::cppu::UnoType< ";
dumpType(out, name_, false, false, true);
out << " >::get();\n";
dec();
out << "}\n\n#endif // "<< headerDefine << "\n";
}
......
......@@ -376,7 +376,11 @@ inline bool SAL_CALL operator == ( const Any & rAny, const BaseReference & value
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type any
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::com::sun::star::uno::Any * )
{
return ::cppu::UnoType< ::com::sun::star::uno::Any >::get();
......
......@@ -281,8 +281,11 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
@tparam E element type of sequence
@return type of IDL sequence
@deprecated
Use cppu::UnoType instead.
*/
template< class E >
template< class E > SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type &
SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< E > * );
......@@ -295,8 +298,11 @@ SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< E > * );
@tparam E element type of sequence
@param rElementType element type of sequence
@return type of IDL sequence
@deprecated
Use cppu::UnoType instead.
*/
template< class E >
template< class E > SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type &
SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType );
......@@ -306,7 +312,11 @@ SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType )
The dummy parameter is just a typed pointer for function signature.
@return type of IDL sequence< char >
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type &
SAL_CALL getCharSequenceCppuType();
......
......@@ -210,28 +210,48 @@ public:
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type "type"
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * );
/** Gets the meta type of IDL type void.
@return type of IDL type void
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType();
/** Gets the meta type of IDL type void.
@return type of IDL type void
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType();
/** Gets the meta type of IDL type boolean.
@return type of IDL type boolean
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType();
/** Gets the meta type of IDL type boolean.
@return type of IDL type boolean
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType();
/** Gets the meta type of IDL type boolean.
......@@ -241,7 +261,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType();
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type boolean
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * );
/** Gets the meta type of IDL type boolean.
......@@ -251,19 +275,31 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type boolean
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType(
bool const * );
/** Gets the meta type of IDL type char.
@return type of IDL type char
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType();
/** Gets the meta type of IDL type char.
@return type of IDL type char
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType();
/** Gets the meta type of IDL type byte.
......@@ -274,7 +310,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType();
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type byte
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * );
/** Gets the meta type of IDL type string.
......@@ -285,7 +325,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type string
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * );
/** Gets the meta type of IDL type short.
......@@ -296,7 +340,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OU
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type short
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * );
/** Gets the meta type of IDL type unsigned short.
......@@ -307,7 +355,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type unsigned short
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * );
/** Gets the meta type of IDL type long.
......@@ -318,7 +370,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt1
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type long
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * );
/** Gets the meta type of IDL type unsigned long.
......@@ -329,7 +385,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type unsigned long
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * );
/** Gets the meta type of IDL type hyper.
......@@ -340,7 +400,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt3
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type hyper
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * );
/** Gets the meta type of IDL type unsigned hyper.
......@@ -351,7 +415,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type unsigned hyper
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * );
/** Gets the meta type of IDL type float.
......@@ -362,7 +430,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt6
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type float
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * );
/** Gets the meta type of IDL type double.
......@@ -373,7 +445,11 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * )
The dummy parameter is just a typed pointer for function signature.
@return type of IDL type double
@deprecated
Use cppu::UnoType instead.
*/
SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * );
/** Gets the meta type of an IDL type.
......@@ -394,7 +470,8 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double *
@since UDK 3.2.0
*/
template< typename T > inline const ::com::sun::star::uno::Type & SAL_CALL
template< typename T > SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL
getCppuType();
/** Gets the meta type of IDL type char.
......@@ -408,7 +485,8 @@ getCppuType();
@since UDK 3.2.0
*/
template<> inline const ::com::sun::star::uno::Type & SAL_CALL
template<> SAL_DEPRECATED("use cppu::UnoType")
inline const ::com::sun::star::uno::Type & SAL_CALL
getCppuType< sal_Unicode >();
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment