summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/odbc
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-22 23:19:05 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-22 23:21:18 +0200
commitb09b5f8f7cfd2d7f3125dab93ebe996c160e1e0c (patch)
treedacb87512726af1941d0c6b072d0b3626335cc4c /connectivity/source/drivers/odbc
parent87c1aa16a95dcff9247ae12a4bb5ea2d866b1772 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
Diffstat (limited to 'connectivity/source/drivers/odbc')
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx6
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx6
-rw-r--r--connectivity/source/drivers/odbc/OStatement.cxx10
3 files changed, 11 insertions, 11 deletions
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index 46ef1809b87a..7a2d3dc947d4 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -125,9 +125,9 @@ void SAL_CALL ODatabaseMetaDataResultSet::release() throw()
Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(RuntimeException, std::exception)
{
- ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ),
- ::getCppuType( (const Reference< XFastPropertySet > *)0 ),
- ::getCppuType( (const Reference< XPropertySet > *)0 ));
+ ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(),
+ cppu::UnoType<XFastPropertySet>::get(),
+ cppu::UnoType<XPropertySet>::get());
return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes());
}
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index 76e53b9d8f26..f5a79b0d283f 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -362,9 +362,9 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep
Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException, std::exception)
{
- OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ),
- ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ),
- ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 ));
+ OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(),
+ cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(),
+ cppu::UnoType<com::sun::star::beans::XPropertySet>::get());
return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes());
}
diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx
index 40466b8301c8..c9391e84ecfb 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -131,7 +131,7 @@ void SAL_CALL OStatement_BASE2::release() throw()
Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(RuntimeException, std::exception)
{
- if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() && rType == ::getCppuType( (const Reference< XGeneratedResultSet > *)0 ) )
+ if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() && rType == cppu::UnoType<XGeneratedResultSet>::get())
return Any();
Any aRet = OStatement_BASE::queryInterface(rType);
return aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface(rType);
@@ -139,14 +139,14 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(Runtime
Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException, std::exception)
{
- ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ),
- ::getCppuType( (const Reference< XFastPropertySet > *)0 ),
- ::getCppuType( (const Reference< XPropertySet > *)0 ));
+ ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(),
+ cppu::UnoType<XFastPropertySet>::get(),
+ cppu::UnoType<XPropertySet>::get());
Sequence< Type > aOldTypes = OStatement_BASE::getTypes();
if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() )
{
::std::remove(aOldTypes.getArray(),aOldTypes.getArray() + aOldTypes.getLength(),
- ::getCppuType( (const Reference< XGeneratedResultSet > *)0 ));
+ cppu::UnoType<XGeneratedResultSet>::get());
aOldTypes.realloc(aOldTypes.getLength() - 1);
}