diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-22 23:19:05 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-22 23:21:18 +0200 |
commit | b09b5f8f7cfd2d7f3125dab93ebe996c160e1e0c (patch) | |
tree | dacb87512726af1941d0c6b072d0b3626335cc4c /connectivity/source/drivers/postgresql | |
parent | 87c1aa16a95dcff9247ae12a4bb5ea2d866b1772 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
Diffstat (limited to 'connectivity/source/drivers/postgresql')
13 files changed, 70 insertions, 70 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx index a8af6d40eb74..55a670291f77 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx @@ -202,14 +202,14 @@ Sequence<Type > BaseResultSet::getTypes() throw( RuntimeException, std::exceptio if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSet> *) 0 ), - getCppuType( (Reference< XResultSetMetaDataSupplier> *) 0 ), - getCppuType( (Reference< XRow> *) 0 ), - getCppuType( (Reference< XColumnLocate> *) 0 ), - getCppuType( (Reference< XCloseable> *) 0 ), - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), + cppu::UnoType<XResultSet>::get(), + cppu::UnoType<XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XRow>::get(), + cppu::UnoType<XColumnLocate>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), OComponentHelper::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx index b37c3b2e03fd..78a67428baf9 100644 --- a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx @@ -96,8 +96,8 @@ com::sun::star::uno::Sequence< com::sun::star::uno::Type > FakedUpdateableResult if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSetUpdate> *) 0 ), - getCppuType( (Reference< XRowUpdate> *) 0 ), + cppu::UnoType<XResultSetUpdate>::get(), + cppu::UnoType<XRowUpdate>::get(), ResultSet::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 55c0175e48fa..dcaa620eaa8f 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -269,15 +269,15 @@ Sequence< Type > PreparedStatement::getTypes() throw ( RuntimeException, std::ex if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XWarningsSupplier> *) 0 ), - getCppuType( (Reference< XPreparedStatement> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbc::XResultSetMetaDataSupplier> *) 0 ), - getCppuType( (Reference< XParameters> *) 0 ), - getCppuType( (Reference< XCloseable> *) 0 ), - getCppuType( (Reference< XGeneratedResultSet> *) 0 ), - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), + cppu::UnoType<XWarningsSupplier>::get(), + cppu::UnoType<XPreparedStatement>::get(), + cppu::UnoType<com::sun::star::sdbc::XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XParameters>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XGeneratedResultSet>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), OComponentHelper::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 23727dbf126a..629d362866b9 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -215,14 +215,14 @@ Sequence< Type > Statement::getTypes() throw ( RuntimeException, std::exception if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XWarningsSupplier> *) 0 ), - getCppuType( (Reference< XStatement> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbc::XResultSetMetaDataSupplier> *) 0 ), - getCppuType( (Reference< XCloseable> *) 0 ), - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), - getCppuType( (Reference< XGeneratedResultSet > *) 0 ), + cppu::UnoType<XWarningsSupplier>::get(), + cppu::UnoType<XStatement>::get(), + cppu::UnoType<com::sun::star::sdbc::XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XGeneratedResultSet>::get(), OComponentHelper::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index ff89568e214e..17428fd96fe2 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -1209,11 +1209,11 @@ bool implSetObject( const Reference< XParameters >& _rxParameters, bSuccessfullyReRouted = false; break; case typelib_TypeClass_STRUCT: - if (_rValue.getValueType() == ::getCppuType((const com::sun::star::util::DateTime*)0)) + if (_rValue.getValueType() == cppu::UnoType<com::sun::star::util::DateTime>::get()) _rxParameters->setTimestamp(_nColumnIndex, *(com::sun::star::util::DateTime*)_rValue.getValue()); - else if (_rValue.getValueType() == ::getCppuType((const com::sun::star::util::Date*)0)) + else if (_rValue.getValueType() == cppu::UnoType<com::sun::star::util::Date>::get()) _rxParameters->setDate(_nColumnIndex, *(com::sun::star::util::Date*)_rValue.getValue()); - else if (_rValue.getValueType() == ::getCppuType((const com::sun::star::util::Time*)0)) + else if (_rValue.getValueType() == cppu::UnoType<com::sun::star::util::Time>::get()) _rxParameters->setTime(_nColumnIndex, *(com::sun::star::util::Time*)_rValue.getValue()); else bSuccessfullyReRouted = false; diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx index ac7b755faf90..dfe3f42c0e9b 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx @@ -157,8 +157,8 @@ com::sun::star::uno::Sequence< com::sun::star::uno::Type > UpdateableResultSet:: if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSetUpdate> *) 0 ), - getCppuType( (Reference< XRowUpdate> *) 0 ), + cppu::UnoType<XResultSetUpdate>::get(), + cppu::UnoType<XRowUpdate>::get(), SequenceResultSet::getTypes()); pCollection = &collection; } @@ -549,27 +549,27 @@ Sequence< Type > UpdateableResultSet::getStaticTypes( bool updateable ) if( updateable ) { cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSetUpdate> *) 0 ), - getCppuType( (Reference< XRowUpdate> *) 0 ), -// getCppuType( (Reference< com::sun::star::sdbcx::XRowLocate > *) 0 ), + cppu::UnoType<XResultSetUpdate>::get(), + cppu::UnoType<XRowUpdate>::get(), +// cppu::UnoType<com::sun::star::sdbcx::XRowLocate>::get(), getStaticTypes( false /* updateable */ ) ); return collection.getTypes(); } else { cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSet> *) 0 ), - getCppuType( (Reference< XResultSetMetaDataSupplier> *) 0 ), - getCppuType( (Reference< XRow> *) 0 ), - getCppuType( (Reference< XColumnLocate> *) 0 ), - getCppuType( (Reference< XCloseable> *) 0 ), - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), - getCppuType( (const Reference< com::sun::star::lang::XComponent > *)0 ), // OComponentHelper - getCppuType( (const Reference< com::sun::star::lang::XTypeProvider > *)0 ), - getCppuType( (const Reference< com::sun::star::uno::XAggregation > *)0 ), - getCppuType( (const Reference< com::sun::star::uno::XWeak > *)0 ) ); + cppu::UnoType<XResultSet>::get(), + cppu::UnoType<XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XRow>::get(), + cppu::UnoType<XColumnLocate>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::lang::XComponent>::get(), // OComponentHelper + cppu::UnoType<com::sun::star::lang::XTypeProvider>::get(), + cppu::UnoType<com::sun::star::uno::XAggregation>::get(), + cppu::UnoType<com::sun::star::uno::XWeak>::get()); return collection.getTypes(); } } diff --git a/connectivity/source/drivers/postgresql/pq_xbase.cxx b/connectivity/source/drivers/postgresql/pq_xbase.cxx index 02cd0fc97dfd..3539abe8abf3 100644 --- a/connectivity/source/drivers/postgresql/pq_xbase.cxx +++ b/connectivity/source/drivers/postgresql/pq_xbase.cxx @@ -164,12 +164,12 @@ Sequence< com::sun::star::uno::Type > ReflectionBase::getTypes() { osl::MutexGuard guard( m_refMutex->mutex ); static cppu::OTypeCollection collection( - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), - getCppuType( (Reference< com::sun::star::lang::XServiceInfo > *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XDataDescriptorFactory > *) 0 ), - getCppuType( (Reference< com::sun::star::container::XNamed > *) 0 ), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::lang::XServiceInfo>::get(), + cppu::UnoType<com::sun::star::sdbcx::XDataDescriptorFactory>::get(), + cppu::UnoType<com::sun::star::container::XNamed>::get(), OComponentHelper::getTypes()); return collection.getTypes(); } diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx index b4ae905bab0f..2af77d5004a2 100644 --- a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx @@ -98,7 +98,7 @@ public: } virtual Type getType() const SAL_OVERRIDE { - return getCppuType( (Reference< XContainerListener > *)0 ); + return cppu::UnoType<XContainerListener>::get(); } }; @@ -120,7 +120,7 @@ public: virtual Type getType() const SAL_OVERRIDE { - return getCppuType( (Reference< XContainerListener > *)0 ); + return cppu::UnoType<XContainerListener>::get(); } }; @@ -141,7 +141,7 @@ public: virtual Type getType() const SAL_OVERRIDE { - return getCppuType( (Reference< XContainerListener > *)0 ); + return cppu::UnoType<XContainerListener>::get(); } }; diff --git a/connectivity/source/drivers/postgresql/pq_xindex.cxx b/connectivity/source/drivers/postgresql/pq_xindex.cxx index 9c81b6ce47f5..6ce1c9c2099a 100644 --- a/connectivity/source/drivers/postgresql/pq_xindex.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindex.cxx @@ -134,7 +134,7 @@ Sequence<Type > Index::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } @@ -207,7 +207,7 @@ Sequence<Type > IndexDescriptor::getTypes() throw( RuntimeException, std::except if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_xkey.cxx b/connectivity/source/drivers/postgresql/pq_xkey.cxx index 7aacf2a72fcd..e47a0434706e 100644 --- a/connectivity/source/drivers/postgresql/pq_xkey.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkey.cxx @@ -136,7 +136,7 @@ Sequence<Type > Key::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } @@ -204,7 +204,7 @@ Sequence<Type > KeyDescriptor::getTypes() throw( RuntimeException, std::exceptio if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx index e6e1363c8117..f907597c12c4 100644 --- a/connectivity/source/drivers/postgresql/pq_xtable.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx @@ -291,11 +291,11 @@ Sequence<Type > Table::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XIndexesSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XKeysSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XRename> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XAlterTable> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XIndexesSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XKeysSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XRename>::get(), + cppu::UnoType<com::sun::star::sdbcx::XAlterTable>::get(), ReflectionBase::getTypes()); pCollection = &collection; } @@ -405,9 +405,9 @@ Sequence<Type > TableDescriptor::getTypes() throw( RuntimeException, std::except if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XIndexesSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XKeysSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XIndexesSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XKeysSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx index 1ebf29df7d05..63875eb9c2c9 100644 --- a/connectivity/source/drivers/postgresql/pq_xuser.cxx +++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx @@ -115,7 +115,7 @@ Sequence<Type > User::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XUser> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XUser>::get(), ReflectionBase::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_xview.cxx b/connectivity/source/drivers/postgresql/pq_xview.cxx index ca2202f6e8f0..e2e0aaf10845 100644 --- a/connectivity/source/drivers/postgresql/pq_xview.cxx +++ b/connectivity/source/drivers/postgresql/pq_xview.cxx @@ -187,7 +187,7 @@ Sequence<Type > View::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XRename> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XRename>::get(), ReflectionBase::getTypes()); pCollection = &collection; } |