summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-10 00:14:44 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-10 06:19:42 +0200
commit5ec7a589bed7991ffe8ad9a2f544a6699d159765 (patch)
treef9020375a29477fe7e4d22970a4040c36abadbdf /connectivity/source
parent83a88b942134314e86ac612d0ef70a8e4919e4af (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part8
Change-Id: Ie16923d17541e84e0d7424fffe37caf410786abf
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/ado/Aolevariant.cxx10
-rw-r--r--connectivity/source/drivers/postgresql/pq_baseresultset.cxx10
-rw-r--r--connectivity/source/drivers/postgresql/pq_preparedstatement.cxx16
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx16
-rw-r--r--connectivity/source/drivers/postgresql/pq_statics.cxx4
5 files changed, 28 insertions, 28 deletions
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<sal_Int16>::get());
break;
case VT_I4:
- aValue.setValue( & lVal, getCppuType( (sal_Int32*)0));
+ aValue.setValue( & lVal, cppu::UnoType<sal_Int32>::get());
break;
case VT_R4:
- aValue.setValue( & fltVal, getCppuType( (float*)0));
+ aValue.setValue( & fltVal, cppu::UnoType<float>::get());
break;
case VT_R8:
- aValue.setValue(& dblVal, getCppuType( (double*)0));
+ aValue.setValue(& dblVal, cppu::UnoType<double>::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<sal_Int32>::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<OUString>::get() , 0 ),
Property(
OUString("EscapeProcessing"), 1,
::getBooleanCppuType() , 0 ),
Property(
OUString("FetchDirection"), 2,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("FetchSize"), 3,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("IsBookmarkable"), 4,
::getBooleanCppuType() , 0 ),
Property(
OUString("ResultSetConcurrency"), 5,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("ResultSetType"), 6,
- ::getCppuType( (sal_Int32 *)0) , 0 )
+ ::cppu::UnoType<sal_Int32>::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<OUString>::get() , 0 ),
Property(
OUString("EscapeProcessing"), 1,
::getBooleanCppuType() , 0 ),
Property(
OUString("FetchDirection"), 2,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("FetchSize"), 3,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("MaxFieldSize"), 4,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("MaxRows"), 5,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("QueryTimeOut"), 6,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("ResultSetConcurrency"), 7,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("ResultSetType"), 8,
- ::getCppuType( (sal_Int32 *)0) , 0 )
+ ::cppu::UnoType<sal_Int32>::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<OUString>::get() , 0 ),
Property(
OUString("EscapeProcessing"), 1,
::getBooleanCppuType() , 0 ),
Property(
OUString("FetchDirection"), 2,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("FetchSize"), 3,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("MaxFieldSize"), 4,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("MaxRows"), 5,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("QueryTimeOut"), 6,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("ResultSetConcurrency"), 7,
- ::getCppuType( (sal_Int32 *)0) , 0 ),
+ ::cppu::UnoType<sal_Int32>::get() , 0 ),
Property(
OUString("ResultSetType"), 8,
- ::getCppuType( (sal_Int32 *)0) , 0 )
+ ::cppu::UnoType<sal_Int32>::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<OUString>::get();
+ Type tInt = cppu::UnoType<sal_Int32>::get();
Type tBool = getBooleanCppuType();
Type tStringSequence = getCppuType( (com::sun::star::uno::Sequence< OUString > *) 0);