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 /basic/source/classes | |
parent | 87c1aa16a95dcff9247ae12a4bb5ea2d866b1772 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
Diffstat (limited to 'basic/source/classes')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 85343b2dc4ae..86881eeca526 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -847,7 +847,7 @@ Type getUnoTypeForSbxBaseType( SbxDataType eType ) Type aRetType = getCppuVoidType(); switch( eType ) { - case SbxNULL: aRetType = ::getCppuType( (const Reference< XInterface > *)0 ); break; + case SbxNULL: aRetType = cppu::UnoType<XInterface>::get(); break; case SbxINTEGER: aRetType = cppu::UnoType<sal_Int16>::get(); break; case SbxLONG: aRetType = cppu::UnoType<sal_Int32>::get(); break; case SbxSINGLE: aRetType = cppu::UnoType<float>::get(); break; @@ -891,7 +891,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal ) SbxBaseRef xObj = (SbxBase*)pVal->GetObject(); if( !xObj ) { - aRetType = getCppuType( static_cast<Reference<XInterface> *>(0) ); + aRetType = cppu::UnoType<XInterface>::get(); return aRetType; } @@ -1592,7 +1592,7 @@ Any invokeAutomationMethod( const OUString& Name, Sequence< Any >& args, SbxArra // Debugging help method to readout the imlemented interfaces of an object OUString Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< XIdlClass >& xClass, sal_uInt16 nRekLevel ) { - Type aIfaceType = ::getCppuType( (const Reference< XInterface > *)0 ); + Type aIfaceType = cppu::UnoType<XInterface>::get(); static Reference< XIdlClass > xIfaceClass = TypeToIdlClass( aIfaceType ); OUStringBuffer aRetStr; @@ -2117,7 +2117,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, } } // get the value - Reference< XPropertySet > xPropSet( mxUnoAccess->queryAdapter( ::getCppuType( (const Reference< XPropertySet > *)0 ) ), UNO_QUERY ); + Reference< XPropertySet > xPropSet( mxUnoAccess->queryAdapter( cppu::UnoType<XPropertySet>::get()), UNO_QUERY ); Any aRetAny = xPropSet->getPropertyValue( pProp->GetName() ); // The use of getPropertyValue (instead of using the index) is // suboptimal, but the refactoring to XInvocation is already pending @@ -2188,7 +2188,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, try { // set the value - Reference< XPropertySet > xPropSet( mxUnoAccess->queryAdapter( ::getCppuType( (const Reference< XPropertySet > *)0 ) ), UNO_QUERY ); + Reference< XPropertySet > xPropSet( mxUnoAccess->queryAdapter( cppu::UnoType<XPropertySet>::get()), UNO_QUERY ); xPropSet->setPropertyValue( pProp->GetName(), aAnyValue ); // The use of getPropertyValue (instead of using the index) is // suboptimal, but the refactoring to XInvocation is already pending @@ -2701,7 +2701,7 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, SbxClassType t ) { try { - Reference< XNameAccess > xNameAccess( mxUnoAccess->queryAdapter( ::getCppuType( (const Reference< XPropertySet > *)0 ) ), UNO_QUERY ); + Reference< XNameAccess > xNameAccess( mxUnoAccess->queryAdapter( cppu::UnoType<XPropertySet>::get()), UNO_QUERY ); OUString aUName2( rName ); if( xNameAccess.is() && xNameAccess->hasByName( aUName2 ) ) |