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 /dbaccess | |
parent | 87c1aa16a95dcff9247ae12a4bb5ea2d866b1772 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/core/api/View.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/callablestatement.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/column.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/core/api/datacolumn.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/preparedstatement.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/core/api/resultset.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/statement.cxx | 18 | ||||
-rw-r--r-- | dbaccess/source/core/api/table.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasecontext.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/definitioncontainer.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/misc/apitools.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/formadapter.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 4 |
15 files changed, 48 insertions, 49 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 644b937183d7..f8ba99e50f4b 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -170,7 +170,7 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::uno::XComponentContext >& _ m_aPrematureParamValues.get().resize( 0 ); // sdb.RowSet Properties - registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT|PropertyAttribute::BOUND, &m_aActiveConnection, ::getCppuType(static_cast< Reference< XConnection >* >(0))); + registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT|PropertyAttribute::BOUND, &m_aActiveConnection, cppu::UnoType<XConnection>::get()); registerProperty(PROPERTY_DATASOURCENAME, PROPERTY_ID_DATASOURCENAME, PropertyAttribute::BOUND, &m_aDataSourceName, ::cppu::UnoType<OUString>::get()); registerProperty(PROPERTY_COMMAND, PROPERTY_ID_COMMAND, PropertyAttribute::BOUND, &m_aCommand, ::cppu::UnoType<OUString>::get()); registerProperty(PROPERTY_COMMAND_TYPE, PROPERTY_ID_COMMAND_TYPE, PropertyAttribute::BOUND, &m_nCommandType, ::cppu::UnoType<sal_Int32>::get()); @@ -184,7 +184,7 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::uno::XComponentContext >& _ registerProperty(PROPERTY_PRIVILEGES, PROPERTY_ID_PRIVILEGES, nRT, &m_nPrivileges, ::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_ISMODIFIED, PROPERTY_ID_ISMODIFIED, nBT, &m_bModified, ::getBooleanCppuType()); registerProperty(PROPERTY_ISNEW, PROPERTY_ID_ISNEW, nRBT, &m_bNew, ::getBooleanCppuType()); - registerProperty(PROPERTY_SINGLESELECTQUERYCOMPOSER,PROPERTY_ID_SINGLESELECTQUERYCOMPOSER, nRT, &m_xComposer, ::getCppuType(static_cast< Reference< XSingleSelectQueryComposer >* >(0))); + registerProperty(PROPERTY_SINGLESELECTQUERYCOMPOSER,PROPERTY_ID_SINGLESELECTQUERYCOMPOSER, nRT, &m_xComposer, cppu::UnoType<XSingleSelectQueryComposer>::get()); // sdbcx.ResultSet Properties registerProperty(PROPERTY_ISBOOKMARKABLE, PROPERTY_ID_ISBOOKMARKABLE, nRT, &m_bIsBookmarkable, ::getBooleanCppuType()); @@ -198,7 +198,7 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::uno::XComponentContext >& _ // sdbc.RowSet Properties registerProperty(PROPERTY_URL, PROPERTY_ID_URL, 0, &m_aURL, ::cppu::UnoType<OUString>::get()); registerProperty(PROPERTY_TRANSACTIONISOLATION, PROPERTY_ID_TRANSACTIONISOLATION, PropertyAttribute::TRANSIENT, &m_nTransactionIsolation,::cppu::UnoType<sal_Int32>::get()); - registerMayBeVoidProperty(PROPERTY_TYPEMAP, PROPERTY_ID_TYPEMAP, PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT, &m_aTypeMap, ::getCppuType(static_cast< Reference< XNameAccess >* >(0))); + registerMayBeVoidProperty(PROPERTY_TYPEMAP, PROPERTY_ID_TYPEMAP, PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT, &m_aTypeMap, cppu::UnoType<XNameAccess>::get()); registerProperty(PROPERTY_ESCAPE_PROCESSING,PROPERTY_ID_ESCAPE_PROCESSING, PropertyAttribute::BOUND, &m_bUseEscapeProcessing,::getBooleanCppuType() ); registerProperty(PROPERTY_QUERYTIMEOUT, PROPERTY_ID_QUERYTIMEOUT, PropertyAttribute::TRANSIENT, &m_nQueryTimeOut, ::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_MAXFIELDSIZE, PROPERTY_ID_MAXFIELDSIZE, PropertyAttribute::TRANSIENT, &m_nMaxFieldSize, ::cppu::UnoType<sal_Int32>::get()); @@ -416,9 +416,9 @@ void SAL_CALL ORowSet::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const // com::sun::star::XTypeProvider Sequence< Type > SAL_CALL ORowSet::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), ::comphelper::concatSequences(ORowSet_BASE1::getTypes(),ORowSetBase::getTypes())); return aTypes.getTypes(); } @@ -2826,7 +2826,7 @@ ORowSetClone::ORowSetClone( const Reference<XComponentContext>& _rContext, ORowS sal_Int32 nRT = PropertyAttribute::READONLY | PropertyAttribute::TRANSIENT; // sdb.RowSet Properties - registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, &rParent.m_aActiveConnection, ::getCppuType(static_cast< Reference< XConnection >* >(0))); + registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, &rParent.m_aActiveConnection, cppu::UnoType<XConnection>::get()); registerProperty(PROPERTY_RESULTSETCONCURRENCY, PROPERTY_ID_RESULTSETCONCURRENCY, PropertyAttribute::READONLY, &m_nResultSetConcurrency,::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_RESULTSETTYPE, PROPERTY_ID_RESULTSETTYPE, PropertyAttribute::READONLY, &m_nResultSetType, ::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_FETCHDIRECTION, PROPERTY_ID_FETCHDIRECTION, PropertyAttribute::TRANSIENT, &m_nFetchDirection, ::cppu::UnoType<sal_Int32>::get()); diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx index e48a5ce82dfa..2cf497bf8fc8 100644 --- a/dbaccess/source/core/api/View.cxx +++ b/dbaccess/source/core/api/View.cxx @@ -82,7 +82,7 @@ namespace dbaccess Any SAL_CALL View::queryInterface( const Type & _rType ) throw(RuntimeException, std::exception) { - if(_rType == getCppuType( (Reference<XAlterView>*)0) && !m_xViewAccess.is() ) + if(_rType == cppu::UnoType<XAlterView>::get()&& !m_xViewAccess.is() ) return Any(); Any aReturn = View_Base::queryInterface( _rType ); if ( !aReturn.hasValue() ) @@ -92,7 +92,7 @@ namespace dbaccess Sequence< Type > SAL_CALL View::getTypes( ) throw(RuntimeException, std::exception) { - Type aAlterType = getCppuType( (Reference<XAlterView>*)0); + Type aAlterType = cppu::UnoType<XAlterView>::get(); Sequence< Type > aTypes( ::comphelper::concatSequences(View_Base::getTypes(),View_IBASE::getTypes()) ); ::std::vector<Type> aOwnTypes; diff --git a/dbaccess/source/core/api/callablestatement.cxx b/dbaccess/source/core/api/callablestatement.cxx index 988726e0ccc9..d0940967cff6 100644 --- a/dbaccess/source/core/api/callablestatement.cxx +++ b/dbaccess/source/core/api/callablestatement.cxx @@ -35,8 +35,8 @@ using namespace ::osl; // com::sun::star::lang::XTypeProvider Sequence< Type > OCallableStatement::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XRow > *)0 ), - ::getCppuType( (const Reference< XOutParameters > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XRow>::get(), + cppu::UnoType<XOutParameters>::get(), OPreparedStatement::getTypes() ); return aTypes.getTypes(); diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index 2949515ddf41..9678304d00f1 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -291,9 +291,9 @@ Any SAL_CALL OColumns::queryInterface( const Type & rType ) throw(RuntimeExcepti } else if(!m_pTable || (m_pTable && !m_pTable->isNew())) { - if(!m_bAddColumn && rType == getCppuType( (Reference<XAppend>*)0)) + if(!m_bAddColumn && rType == cppu::UnoType<XAppend>::get()) return Any(); - if(!m_bDropColumn && rType == getCppuType( (Reference<XDrop>*)0)) + if(!m_bDropColumn && rType == cppu::UnoType<XDrop>::get()) return Any(); } @@ -308,8 +308,8 @@ Sequence< Type > SAL_CALL OColumns::getTypes( ) throw(RuntimeException, std::ex bool bAppendFound = false,bDropFound = false; sal_Int32 nSize = 0; - Type aAppendType = getCppuType( (Reference<XAppend>*)0); - Type aDropType = getCppuType( (Reference<XDrop>*)0); + Type aAppendType = cppu::UnoType<XAppend>::get(); + Type aDropType = cppu::UnoType<XDrop>::get(); if(m_xDrvColumns.is()) { Reference<XTypeProvider> xTypes(m_xDrvColumns,UNO_QUERY); diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx index 8811b7329a80..9582a7e3177b 100644 --- a/dbaccess/source/core/api/datacolumn.cxx +++ b/dbaccess/source/core/api/datacolumn.cxx @@ -58,8 +58,8 @@ ODataColumn::~ODataColumn() // com::sun::star::lang::XTypeProvider Sequence< Type > ODataColumn::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XColumn > *)0 ), - ::getCppuType( (const Reference< XColumnUpdate > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XColumn>::get(), + cppu::UnoType<XColumnUpdate>::get(), OColumn::getTypes()); return aTypes.getTypes(); } diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx index 182212862c72..d3eb2fd217d6 100644 --- a/dbaccess/source/core/api/preparedstatement.cxx +++ b/dbaccess/source/core/api/preparedstatement.cxx @@ -65,11 +65,11 @@ OPreparedStatement::~OPreparedStatement() // com::sun::star::lang::XTypeProvider Sequence< Type > OPreparedStatement::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XServiceInfo > *)0 ), - ::getCppuType( (const Reference< XPreparedStatement > *)0 ), - ::getCppuType( (const Reference< XParameters > *)0 ), - ::getCppuType( (const Reference< XResultSetMetaDataSupplier > *)0 ), - ::getCppuType( (const Reference< XColumnsSupplier > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XServiceInfo>::get(), + cppu::UnoType<XPreparedStatement>::get(), + cppu::UnoType<XParameters>::get(), + cppu::UnoType<XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XColumnsSupplier>::get(), OStatementBase::getTypes() ); return aTypes.getTypes(); diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx index 158c3ede8b85..fca574851ce1 100644 --- a/dbaccess/source/core/api/resultset.cxx +++ b/dbaccess/source/core/api/resultset.cxx @@ -102,7 +102,7 @@ OResultSet::~OResultSet() // com::sun::star::lang::XTypeProvider Sequence< Type > OResultSet::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XPropertySet > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XPropertySet>::get(), OResultSetBase::getTypes()); return aTypes.getTypes(); diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx index 07a48c198fb8..09e0dd0e463c 100644 --- a/dbaccess/source/core/api/statement.cxx +++ b/dbaccess/source/core/api/statement.cxx @@ -62,18 +62,18 @@ OStatementBase::~OStatementBase() // com::sun::star::lang::XTypeProvider Sequence< Type > OStatementBase::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XPropertySet > *)0 ), - ::getCppuType( (const Reference< XWarningsSupplier > *)0 ), - ::getCppuType( (const Reference< XCloseable > *)0 ), - ::getCppuType( (const Reference< XMultipleResults > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::util::XCancellable > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XWarningsSupplier>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XMultipleResults>::get(), + cppu::UnoType<com::sun::star::util::XCancellable>::get(), OSubComponent::getTypes() ); Reference< XGeneratedResultSet > xGRes(m_xAggregateAsSet, UNO_QUERY); if ( xGRes.is() ) - aTypes = OTypeCollection(::getCppuType( (const Reference< XGeneratedResultSet > *)0 ),aTypes.getTypes()); + aTypes = OTypeCollection(cppu::UnoType<XGeneratedResultSet>::get(),aTypes.getTypes()); Reference< XPreparedBatchExecution > xPreparedBatchExecution(m_xAggregateAsSet, UNO_QUERY); if ( xPreparedBatchExecution.is() ) - aTypes = OTypeCollection(::getCppuType( (const Reference< XPreparedBatchExecution > *)0 ),aTypes.getTypes()); + aTypes = OTypeCollection(cppu::UnoType<XPreparedBatchExecution>::get(),aTypes.getTypes()); return aTypes.getTypes(); } @@ -94,13 +94,13 @@ Any OStatementBase::queryInterface( const Type & rType ) throw (RuntimeException if ( !aIface.hasValue() ) { Reference< XGeneratedResultSet > xGRes(m_xAggregateAsSet, UNO_QUERY); - if ( ::getCppuType( (const Reference< XGeneratedResultSet > *)0 ) == rType && xGRes.is() ) + if ( cppu::UnoType<XGeneratedResultSet>::get()== rType && xGRes.is() ) aIface = ::cppu::queryInterface(rType,static_cast< XGeneratedResultSet * >( this )); } if ( !aIface.hasValue() ) { Reference< XPreparedBatchExecution > xGRes(m_xAggregateAsSet, UNO_QUERY); - if ( ::getCppuType( (const Reference< XPreparedBatchExecution > *)0 ) == rType && xGRes.is() ) + if ( cppu::UnoType<XPreparedBatchExecution>::get()== rType && xGRes.is() ) aIface = ::cppu::queryInterface(rType,static_cast< XPreparedBatchExecution * >( this )); } } diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 9fef736143d6..b4e827407390 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -252,17 +252,17 @@ IMPLEMENT_SERVICE_INFO1(ODBTable, "com.sun.star.sdb.dbaccess.ODBTable", SERVICE_ Any SAL_CALL ODBTable::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if(rType == getCppuType( (Reference<XRename>*)0) && !getRenameService().is() ) + if(rType == cppu::UnoType<XRename>::get()&& !getRenameService().is() ) return Any(); - if(rType == getCppuType( (Reference<XAlterTable>*)0) && !getAlterService().is() ) + if(rType == cppu::UnoType<XAlterTable>::get()&& !getAlterService().is() ) return Any(); return OTable_Base::queryInterface( rType); } Sequence< Type > SAL_CALL ODBTable::getTypes( ) throw(RuntimeException, std::exception) { - Type aRenameType = getCppuType( (Reference<XRename>*)0); - Type aAlterType = getCppuType( (Reference<XAlterTable>*)0); + Type aRenameType = cppu::UnoType<XRename>::get(); + Type aAlterType = cppu::UnoType<XAlterTable>::get(); Sequence< Type > aTypes(OTable_Base::getTypes()); ::std::vector<Type> aOwnTypes; diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 994b343b161b..94b3d37f5a95 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -580,7 +580,7 @@ void SAL_CALL ODatabaseContext::removeDatabaseRegistrationsListener( const Refer // ::com::sun::star::container::XElementAccess Type ODatabaseContext::getElementType( ) throw(RuntimeException, std::exception) { - return::getCppuType(static_cast<Reference<XDataSource>*>(NULL)); + returncppu::UnoType<XDataSource>::get(); } sal_Bool ODatabaseContext::hasElements(void) throw( RuntimeException, std::exception ) diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 85f070955393..6bf40a108e9a 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -520,9 +520,9 @@ void ODatabaseSource::setName( const Reference< XDocumentDataSource >& _rxDocume // com::sun::star::lang::XTypeProvider Sequence< Type > ODatabaseSource::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aPropertyHelperTypes( ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 ), - ::getCppuType( (const Reference< XMultiPropertySet > *)0 )); + OTypeCollection aPropertyHelperTypes( cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get()); return ::comphelper::concatSequences( ODatabaseSource_Base::getTypes(), diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index 8a15334ec4c4..226ab22fea70 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -334,7 +334,7 @@ void SAL_CALL ODefinitionContainer::removeContainerApproveListener( const Refere // XElementAccess Type SAL_CALL ODefinitionContainer::getElementType( ) throw (RuntimeException, std::exception) { - return ::getCppuType( static_cast< Reference< XContent >* >(NULL) ); + return cppu::UnoType<XContent>::get(); } sal_Bool SAL_CALL ODefinitionContainer::hasElements( ) throw (RuntimeException, std::exception) diff --git a/dbaccess/source/core/misc/apitools.cxx b/dbaccess/source/core/misc/apitools.cxx index 7a8374eae0ea..bd3e1f2a2dd8 100644 --- a/dbaccess/source/core/misc/apitools.cxx +++ b/dbaccess/source/core/misc/apitools.cxx @@ -47,9 +47,9 @@ OSubComponent::~OSubComponent() // com::sun::star::lang::XTypeProvider Sequence< Type > OSubComponent::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XComponent > *)0 ), - ::getCppuType( (const Reference< XTypeProvider > *)0 ), - ::getCppuType( (const Reference< XWeak > *)0 )); + OTypeCollection aTypes(cppu::UnoType<XComponent>::get(), + cppu::UnoType<XTypeProvider>::get(), + cppu::UnoType<XWeak>::get()); return aTypes.getTypes(); } @@ -112,7 +112,7 @@ void OSubComponent::release() throw ( ) Any OSubComponent::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { Any aReturn; - if (!rType.equals(::getCppuType(static_cast< Reference< XAggregation >* >(NULL)))) + if (!rType.equals(cppu::UnoType<XAggregation>::get())) aReturn = OComponentHelper::queryInterface(rType); return aReturn; diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index 53f0b282703f..bac906e81cc8 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -1491,8 +1491,7 @@ sal_Bool SAL_CALL SbaXFormAdapter::hasByName(const OUString& aName) throw( Runti // ::com::sun::star::container::XElementAccess Type SAL_CALL SbaXFormAdapter::getElementType() throw(RuntimeException, std::exception) { - return ::getCppuType( - static_cast< Reference< ::com::sun::star::form::XFormComponent >* >(NULL)); + return cppu::UnoType<com::sun::star::form::XFormComponent>::get(); } sal_Bool SAL_CALL SbaXFormAdapter::hasElements() throw(RuntimeException, std::exception) diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 1fd968578621..2d7d9c1804c2 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -181,7 +181,7 @@ Sequence< Type > SAL_CALL SbaXGridControl::getTypes( ) throw (RuntimeException, sal_Int32 nTypes = aTypes.getLength(); aTypes.realloc(nTypes + 1); - aTypes[nTypes] = ::getCppuType(static_cast< Reference< ::com::sun::star::frame::XDispatch >* >(NULL)); + aTypes[nTypes] = cppu::UnoType<com::sun::star::frame::XDispatch>::get(); return aTypes; } @@ -526,7 +526,7 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() throw (RuntimeException, std: Sequence< Type > aTypes = FmXGridPeer::getTypes(); sal_Int32 nOldLen = aTypes.getLength(); aTypes.realloc(nOldLen + 1); - aTypes.getArray()[nOldLen] = ::getCppuType( static_cast< Reference< ::com::sun::star::frame::XDispatch >* >(0) ); + aTypes.getArray()[nOldLen] = cppu::UnoType<com::sun::star::frame::XDispatch>::get(); return aTypes; } |