summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-20 23:29:28 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-20 23:29:53 +0200
commit227af32d8c6d5e3649c83fcdb274298bc7faa294 (patch)
tree8490a6c94094d1fbf5a190a911070c3142d3cca7 /sc/source/ui
parent0f836296ea3cdc10326ad54983b634168285b8e2 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part18
Change-Id: Ibf958dbfbf7cdbe6ad31d390138be8d4d468c225
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx6
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx26
-rw-r--r--sc/source/ui/unoobj/datauno.cxx2
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx4
4 files changed, 19 insertions, 19 deletions
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<XAccessibleText>::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<XAccessibleTable>::get();
+ aSeq[ 1 ] = cppu::UnoType<XAccessibleSelection>::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<XDataPilotTable2>*)0);
+ return cppu::UnoType<XDataPilotTable2>::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<XDataPilotDescriptor>::get();
+ pPtr[ 1 ] = cppu::UnoType<XPropertySet>::get();
+ pPtr[ 2 ] = cppu::UnoType<XDataPilotDataLayoutFieldSupplier>::get();
+ pPtr[ 3 ] = cppu::UnoType<lang::XUnoTunnel>::get();
+ pPtr[ 4 ] = cppu::UnoType<lang::XTypeProvider>::get();
+ pPtr[ 5 ] = cppu::UnoType<lang::XServiceInfo>::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<XDataPilotTable2>::get();
+ pPtr[ nParentLen+1 ] = cppu::UnoType<XModifyBroadcaster>::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<XPropertySet>*)0);
+ return cppu::UnoType<XPropertySet>::get();
}
sal_Bool SAL_CALL ScDataPilotFieldsObj::hasElements() throw(RuntimeException, std::exception)
@@ -2969,7 +2969,7 @@ Reference<XEnumeration> SAL_CALL ScDataPilotFieldGroupsObj::createEnumeration()
uno::Type SAL_CALL ScDataPilotFieldGroupsObj::getElementType() throw(RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return getCppuType( (Reference< XNameAccess >*)0 );
+ return cppu::UnoType<XNameAccess>::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<XNamed>::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<XPropertySet>*)0);
+ return cppu::UnoType<XPropertySet>::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<sal_Int32>::get(), beans::PropertyAttribute::READONLY, 0},
- {OUString(SC_UNONAME_ORIENT), 0, getCppuType((table::TableOrientation*)0), 0, 0},
+ {OUString(SC_UNONAME_ORIENT), 0, cppu::UnoType<table::TableOrientation>::get(), 0, 0},
{OUString(SC_UNONAME_OUTPOS), 0, cppu::UnoType<table::CellAddress>::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<Reference<sheet::XExternalDocLink>*>(0));
+ return cppu::UnoType<sheet::XExternalDocLink>::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<Reference<sheet::XExternalDocLinks>*>(0));
+ return cppu::UnoType<sheet::XExternalDocLinks>::get();
}
sal_Bool SAL_CALL ScExternalDocLinksObj::hasElements()