From 227af32d8c6d5e3649c83fcdb274298bc7faa294 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Tue, 20 May 2014 23:29:28 +0200 Subject: Prefer cppu::UnoType::get() to ::getCppuType((T*)0) part18 Change-Id: Ibf958dbfbf7cdbe6ad31d390138be8d4d468c225 --- .../ui/Accessibility/AccessibleCsvControl.cxx | 6 ++--- sc/source/ui/unoobj/dapiuno.cxx | 26 +++++++++++----------- sc/source/ui/unoobj/datauno.cxx | 2 +- sc/source/ui/unoobj/linkuno.cxx | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index d3fb0eda2f2d..335d69708bb4 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -736,7 +736,7 @@ OUString SAL_CALL ScAccessibleCsvRuler::getImplementationName() throw( RuntimeEx Sequence< ::com::sun::star::uno::Type > SAL_CALL ScAccessibleCsvRuler::getTypes() throw( RuntimeException, std::exception ) { Sequence< ::com::sun::star::uno::Type > aSeq( 1 ); - aSeq[ 0 ] = getCppuType( static_cast< const Reference< XAccessibleText >* >( NULL ) ); + aSeq[ 0 ] = cppu::UnoType::get(); return ::comphelper::concatSequences( ScAccessibleCsvControl::getTypes(), aSeq ); } @@ -1234,8 +1234,8 @@ OUString SAL_CALL ScAccessibleCsvGrid::getImplementationName() throw( RuntimeExc Sequence< ::com::sun::star::uno::Type > SAL_CALL ScAccessibleCsvGrid::getTypes() throw( RuntimeException, std::exception ) { Sequence< ::com::sun::star::uno::Type > aSeq( 2 ); - aSeq[ 0 ] = getCppuType( static_cast< const Reference< XAccessibleTable >* >( NULL ) ); - aSeq[ 1 ] = getCppuType( static_cast< const Reference< XAccessibleSelection >* >( NULL ) ); + aSeq[ 0 ] = cppu::UnoType::get(); + aSeq[ 1 ] = cppu::UnoType::get(); return ::comphelper::concatSequences( ScAccessibleCsvControl::getTypes(), aSeq ); } diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 0ca52759bfcd..3ace2c48bd14 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -493,7 +493,7 @@ Any SAL_CALL ScDataPilotTablesObj::getByIndex( sal_Int32 nIndex ) uno::Type SAL_CALL ScDataPilotTablesObj::getElementType() throw(RuntimeException, std::exception) { SolarMutexGuard aGuard; - return getCppuType((Reference*)0); + return cppu::UnoType::get(); } sal_Bool SAL_CALL ScDataPilotTablesObj::hasElements() throw(RuntimeException, std::exception) @@ -620,12 +620,12 @@ Sequence< uno::Type > SAL_CALL ScDataPilotDescriptorBase::getTypes() { aTypes.realloc( 6 ); uno::Type* pPtr = aTypes.getArray(); - pPtr[ 0 ] = getCppuType( (const Reference< XDataPilotDescriptor >*)0 ); - pPtr[ 1 ] = getCppuType( (const Reference< XPropertySet >*)0 ); - pPtr[ 2 ] = getCppuType( (const Reference< XDataPilotDataLayoutFieldSupplier >*)0 ); - pPtr[ 3 ] = getCppuType( (const Reference< lang::XUnoTunnel >*)0 ); - pPtr[ 4 ] = getCppuType( (const Reference< lang::XTypeProvider >*)0 ); - pPtr[ 5 ] = getCppuType( (const Reference< lang::XServiceInfo >*)0 ); + pPtr[ 0 ] = cppu::UnoType::get(); + pPtr[ 1 ] = cppu::UnoType::get(); + pPtr[ 2 ] = cppu::UnoType::get(); + pPtr[ 3 ] = cppu::UnoType::get(); + pPtr[ 4 ] = cppu::UnoType::get(); + pPtr[ 5 ] = cppu::UnoType::get(); } return aTypes; } @@ -1128,8 +1128,8 @@ Sequence< uno::Type > SAL_CALL ScDataPilotTableObj::getTypes() throw(RuntimeExce for (sal_Int32 i = 0; i < nParentLen; ++i) pPtr[ i ] = pParentPtr[ i ]; // parent types first - pPtr[ nParentLen ] = getCppuType( (const Reference< XDataPilotTable2 >*)0 ); - pPtr[ nParentLen+1 ] = getCppuType( (const Reference< XModifyBroadcaster >*)0 ); + pPtr[ nParentLen ] = cppu::UnoType::get(); + pPtr[ nParentLen+1 ] = cppu::UnoType::get(); } return aTypes; } @@ -1737,7 +1737,7 @@ Any SAL_CALL ScDataPilotFieldsObj::getByIndex( sal_Int32 nIndex ) uno::Type SAL_CALL ScDataPilotFieldsObj::getElementType() throw(RuntimeException, std::exception) { SolarMutexGuard aGuard; - return getCppuType((Reference*)0); + return cppu::UnoType::get(); } sal_Bool SAL_CALL ScDataPilotFieldsObj::hasElements() throw(RuntimeException, std::exception) @@ -2969,7 +2969,7 @@ Reference SAL_CALL ScDataPilotFieldGroupsObj::createEnumeration() uno::Type SAL_CALL ScDataPilotFieldGroupsObj::getElementType() throw(RuntimeException, std::exception) { SolarMutexGuard aGuard; - return getCppuType( (Reference< XNameAccess >*)0 ); + return cppu::UnoType::get(); } sal_Bool SAL_CALL ScDataPilotFieldGroupsObj::hasElements() throw(RuntimeException, std::exception) @@ -3153,7 +3153,7 @@ Reference< XEnumeration > SAL_CALL ScDataPilotFieldGroupObj::createEnumeration() uno::Type SAL_CALL ScDataPilotFieldGroupObj::getElementType() throw(RuntimeException, std::exception) { SolarMutexGuard aGuard; - return getCppuType( (Reference< XNamed >*)0 ); + return cppu::UnoType::get(); } sal_Bool SAL_CALL ScDataPilotFieldGroupObj::hasElements() throw(RuntimeException, std::exception) @@ -3312,7 +3312,7 @@ Any SAL_CALL ScDataPilotItemsObj::getByIndex( sal_Int32 nIndex ) uno::Type SAL_CALL ScDataPilotItemsObj::getElementType() throw(RuntimeException, std::exception) { SolarMutexGuard aGuard; - return getCppuType((Reference*)0); + return cppu::UnoType::get(); } sal_Bool SAL_CALL ScDataPilotItemsObj::hasElements() throw(RuntimeException, std::exception) diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index fd160cfb811d..09762b1f1402 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -95,7 +95,7 @@ static const SfxItemPropertyMapEntry* lcl_GetFilterPropertyMap() {OUString(SC_UNONAME_COPYOUT), 0, getBooleanCppuType(), 0, 0}, {OUString(SC_UNONAME_ISCASE), 0, getBooleanCppuType(), 0, 0}, {OUString(SC_UNONAME_MAXFLD), 0, cppu::UnoType::get(), beans::PropertyAttribute::READONLY, 0}, - {OUString(SC_UNONAME_ORIENT), 0, getCppuType((table::TableOrientation*)0), 0, 0}, + {OUString(SC_UNONAME_ORIENT), 0, cppu::UnoType::get(), 0, 0}, {OUString(SC_UNONAME_OUTPOS), 0, cppu::UnoType::get(), 0, 0}, {OUString(SC_UNONAME_SAVEOUT), 0, getBooleanCppuType(), 0, 0}, {OUString(SC_UNONAME_SKIPDUP), 0, getBooleanCppuType(), 0, 0}, diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index 27cc39578ac9..86e7fc84581d 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -1675,7 +1675,7 @@ uno::Type SAL_CALL ScExternalDocLinkObj::getElementType() throw (RuntimeException, std::exception) { SolarMutexGuard aGuard; - return getCppuType(static_cast*>(0)); + return cppu::UnoType::get(); } sal_Bool SAL_CALL ScExternalDocLinkObj::hasElements() @@ -1789,7 +1789,7 @@ uno::Type SAL_CALL ScExternalDocLinksObj::getElementType() throw (RuntimeException, std::exception) { SolarMutexGuard aGuard; - return getCppuType(static_cast*>(0)); + return cppu::UnoType::get(); } sal_Bool SAL_CALL ScExternalDocLinksObj::hasElements() -- cgit