From 5ec7a589bed7991ffe8ad9a2f544a6699d159765 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 10 May 2014 00:14:44 +0200 Subject: Prefer cppu::UnoType::get() to ::getCppuType((T*)0) part8 Change-Id: Ie16923d17541e84e0d7424fffe37caf410786abf --- connectivity/source/drivers/ado/Aolevariant.cxx | 10 +++++----- .../source/drivers/postgresql/pq_baseresultset.cxx | 10 +++++----- .../source/drivers/postgresql/pq_preparedstatement.cxx | 16 ++++++++-------- connectivity/source/drivers/postgresql/pq_statement.cxx | 16 ++++++++-------- connectivity/source/drivers/postgresql/pq_statics.cxx | 4 ++-- 5 files changed, 28 insertions(+), 28 deletions(-) (limited to 'connectivity/source') diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx index af91f6fe7af6..02e6fa268a59 100644 --- a/connectivity/source/drivers/ado/Aolevariant.cxx +++ b/connectivity/source/drivers/ado/Aolevariant.cxx @@ -699,16 +699,16 @@ SAFEARRAY* OLEVariant::getUI1SAFEARRAYPtr() const aValue.setValue(NULL, Type()); break; case VT_I2: - aValue.setValue( & iVal, getCppuType( (sal_Int16*)0)); + aValue.setValue( & iVal, cppu::UnoType::get()); break; case VT_I4: - aValue.setValue( & lVal, getCppuType( (sal_Int32*)0)); + aValue.setValue( & lVal, cppu::UnoType::get()); break; case VT_R4: - aValue.setValue( & fltVal, getCppuType( (float*)0)); + aValue.setValue( & fltVal, cppu::UnoType::get()); break; case VT_R8: - aValue.setValue(& dblVal, getCppuType( (double*)0)); + aValue.setValue(& dblVal, cppu::UnoType::get()); break; case VT_CY: { @@ -746,7 +746,7 @@ SAFEARRAY* OLEVariant::getUI1SAFEARRAYPtr() const aValue.setValue( & ulVal, getCppuType( (sal_uInt32*)0)); break; case VT_INT: - aValue.setValue( & intVal, getCppuType( (sal_Int32*)0)); + aValue.setValue( & intVal, cppu::UnoType::get()); break; case VT_UINT: aValue.setValue( & uintVal, getCppuType( (sal_uInt32*)0)); diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx index 5b4a03066cb0..a8af6d40eb74 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx @@ -104,25 +104,25 @@ static ::cppu::IPropertyArrayHelper & getResultSetPropertyArrayHelper() // At least use for the handles the #define'd values in .hxx file... Property( OUString("CursorName"), 0, - ::getCppuType( (OUString *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("EscapeProcessing"), 1, ::getBooleanCppuType() , 0 ), Property( OUString("FetchDirection"), 2, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("FetchSize"), 3, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("IsBookmarkable"), 4, ::getBooleanCppuType() , 0 ), Property( OUString("ResultSetConcurrency"), 5, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("ResultSetType"), 6, - ::getCppuType( (sal_Int32 *)0) , 0 ) + ::cppu::UnoType::get() , 0 ) }; OSL_ASSERT( sizeof(aTable) / sizeof(Property) == BASERESULTSET_SIZE ); static ::cppu::OPropertyArrayHelper arrayHelper( aTable, BASERESULTSET_SIZE, sal_True ); diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 83dbdbf9d3d8..55c0175e48fa 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -107,31 +107,31 @@ static ::cppu::IPropertyArrayHelper & getPreparedStatementPropertyArrayHelper() { Property( OUString("CursorName"), 0, - ::getCppuType( (OUString *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("EscapeProcessing"), 1, ::getBooleanCppuType() , 0 ), Property( OUString("FetchDirection"), 2, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("FetchSize"), 3, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("MaxFieldSize"), 4, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("MaxRows"), 5, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("QueryTimeOut"), 6, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("ResultSetConcurrency"), 7, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("ResultSetType"), 8, - ::getCppuType( (sal_Int32 *)0) , 0 ) + ::cppu::UnoType::get() , 0 ) }; OSL_ASSERT( sizeof(aTable)/ sizeof(Property) == PREPARED_STATEMENT_SIZE ); static ::cppu::OPropertyArrayHelper arrayHelper( aTable, PREPARED_STATEMENT_SIZE, sal_True ); diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index e002067039a2..23727dbf126a 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -120,31 +120,31 @@ static ::cppu::IPropertyArrayHelper & getStatementPropertyArrayHelper() { Property( OUString("CursorName"), 0, - ::getCppuType( (OUString *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("EscapeProcessing"), 1, ::getBooleanCppuType() , 0 ), Property( OUString("FetchDirection"), 2, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("FetchSize"), 3, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("MaxFieldSize"), 4, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("MaxRows"), 5, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("QueryTimeOut"), 6, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("ResultSetConcurrency"), 7, - ::getCppuType( (sal_Int32 *)0) , 0 ), + ::cppu::UnoType::get() , 0 ), Property( OUString("ResultSetType"), 8, - ::getCppuType( (sal_Int32 *)0) , 0 ) + ::cppu::UnoType::get() , 0 ) }; OSL_ASSERT( sizeof(aTable)/ sizeof(Property) == STATEMENT_SIZE ); static ::cppu::OPropertyArrayHelper arrayHelper( aTable, STATEMENT_SIZE, sal_True ); diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx index 0b6a15ca1d92..0d349a896289 100644 --- a/connectivity/source/drivers/postgresql/pq_statics.cxx +++ b/connectivity/source/drivers/postgresql/pq_statics.cxx @@ -197,8 +197,8 @@ Statics & getStatics() statics.CATALOG = "Catalog"; - Type tString = getCppuType( (OUString *) 0 ); - Type tInt = getCppuType( (sal_Int32 * ) 0 ); + Type tString = cppu::UnoType::get(); + Type tInt = cppu::UnoType::get(); Type tBool = getBooleanCppuType(); Type tStringSequence = getCppuType( (com::sun::star::uno::Sequence< OUString > *) 0); -- cgit v1.2.3