From b09b5f8f7cfd2d7f3125dab93ebe996c160e1e0c Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Thu, 22 May 2014 23:19:05 +0200 Subject: Prefer cppu::UnoType::get() to ::getCppuType((T*)0) part19 Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9 --- .../source/drivers/postgresql/pq_baseresultset.cxx | 16 +++++----- .../postgresql/pq_fakedupdateableresultset.cxx | 4 +-- .../drivers/postgresql/pq_preparedstatement.cxx | 18 ++++++------ .../source/drivers/postgresql/pq_statement.cxx | 16 +++++----- .../source/drivers/postgresql/pq_tools.cxx | 6 ++-- .../drivers/postgresql/pq_updateableresultset.cxx | 34 +++++++++++----------- .../source/drivers/postgresql/pq_xbase.cxx | 12 ++++---- .../source/drivers/postgresql/pq_xcontainer.cxx | 6 ++-- .../source/drivers/postgresql/pq_xindex.cxx | 4 +-- connectivity/source/drivers/postgresql/pq_xkey.cxx | 4 +-- .../source/drivers/postgresql/pq_xtable.cxx | 16 +++++----- .../source/drivers/postgresql/pq_xuser.cxx | 2 +- .../source/drivers/postgresql/pq_xview.cxx | 2 +- 13 files changed, 70 insertions(+), 70 deletions(-) (limited to 'connectivity/source/drivers/postgresql') 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 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::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::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::get(), + cppu::UnoType::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::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::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::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::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::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::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::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::get(), + cppu::UnoType::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::get(), + cppu::UnoType::get(), +// cppu::UnoType::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::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), // OComponentHelper + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::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::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::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::get(); } }; @@ -120,7 +120,7 @@ public: virtual Type getType() const SAL_OVERRIDE { - return getCppuType( (Reference< XContainerListener > *)0 ); + return cppu::UnoType::get(); } }; @@ -141,7 +141,7 @@ public: virtual Type getType() const SAL_OVERRIDE { - return getCppuType( (Reference< XContainerListener > *)0 ); + return cppu::UnoType::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 Index::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType::get(), ReflectionBase::getTypes()); pCollection = &collection; } @@ -207,7 +207,7 @@ Sequence IndexDescriptor::getTypes() throw( RuntimeException, std::except if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType::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 Key::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType::get(), ReflectionBase::getTypes()); pCollection = &collection; } @@ -204,7 +204,7 @@ Sequence KeyDescriptor::getTypes() throw( RuntimeException, std::exceptio if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType::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 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::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), + cppu::UnoType::get(), ReflectionBase::getTypes()); pCollection = &collection; } @@ -405,9 +405,9 @@ Sequence 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::get(), + cppu::UnoType::get(), + cppu::UnoType::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 User::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XUser> *) 0 ), + cppu::UnoType::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 View::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XRename> *) 0 ), + cppu::UnoType::get(), ReflectionBase::getTypes()); pCollection = &collection; } -- cgit