summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-13 23:19:08 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-13 23:20:26 +0200
commit036a660a86c225992c7cab083073374c40b1f366 (patch)
tree6271d26cc317e682a471d6c4a787f47740af680b /ucbhelper
parente1f0d790832098a7f8b323ab04809b6b55ade3d9 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part11
Change-Id: Ibe0a1006aba2b6cbd87c0bd6ca3acbf9ba7b0fbe
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/source/provider/interactionrequest.cxx50
-rw-r--r--ucbhelper/source/provider/resultsetmetadata.cxx16
2 files changed, 24 insertions, 42 deletions
diff --git a/ucbhelper/source/provider/interactionrequest.cxx b/ucbhelper/source/provider/interactionrequest.cxx
index 59b1f029a1ab..c1d46179df7a 100644
--- a/ucbhelper/source/provider/interactionrequest.cxx
+++ b/ucbhelper/source/provider/interactionrequest.cxx
@@ -162,10 +162,8 @@ uno::Sequence< uno::Type > SAL_CALL InteractionRequest::getTypes()
if ( !pCollection )
{
static cppu::OTypeCollection collection(
- getCppuType( static_cast<
- uno::Reference< lang::XTypeProvider > * >( 0 ) ),
- getCppuType( static_cast<
- uno::Reference< task::XInteractionRequest > * >( 0 ) ) );
+ cppu::UnoType<lang::XTypeProvider>::get(),
+ cppu::UnoType<task::XInteractionRequest>::get() );
pCollection = &collection;
}
}
@@ -304,10 +302,8 @@ uno::Sequence< uno::Type > SAL_CALL InteractionAbort::getTypes()
if ( !pCollection )
{
static cppu::OTypeCollection collection(
- getCppuType( static_cast<
- uno::Reference< lang::XTypeProvider > * >( 0 ) ),
- getCppuType( static_cast<
- uno::Reference< task::XInteractionAbort > * >( 0 ) ) );
+ cppu::UnoType<lang::XTypeProvider>::get(),
+ cppu::UnoType<task::XInteractionAbort>::get() );
pCollection = &collection;
}
}
@@ -396,10 +392,8 @@ uno::Sequence< uno::Type > SAL_CALL InteractionRetry::getTypes()
if ( !pCollection )
{
static cppu::OTypeCollection collection(
- getCppuType( static_cast<
- uno::Reference< lang::XTypeProvider > * >( 0 ) ),
- getCppuType( static_cast<
- uno::Reference< task::XInteractionRetry > * >( 0 ) ) );
+ cppu::UnoType<lang::XTypeProvider>::get(),
+ cppu::UnoType<task::XInteractionRetry>::get() );
pCollection = &collection;
}
}
@@ -488,10 +482,8 @@ uno::Sequence< uno::Type > SAL_CALL InteractionApprove::getTypes()
if ( !pCollection )
{
static cppu::OTypeCollection collection(
- getCppuType( static_cast<
- uno::Reference< lang::XTypeProvider > * >( 0 ) ),
- getCppuType( static_cast<
- uno::Reference< task::XInteractionApprove > * >( 0 ) ) );
+ cppu::UnoType<lang::XTypeProvider>::get(),
+ cppu::UnoType<task::XInteractionApprove>::get() );
pCollection = &collection;
}
}
@@ -580,10 +572,8 @@ uno::Sequence< uno::Type > SAL_CALL InteractionDisapprove::getTypes()
if ( !pCollection )
{
static cppu::OTypeCollection collection(
- getCppuType( static_cast<
- uno::Reference< lang::XTypeProvider > * >( 0 ) ),
- getCppuType( static_cast<
- uno::Reference< task::XInteractionDisapprove > * >( 0 ) ) );
+ cppu::UnoType<lang::XTypeProvider>::get(),
+ cppu::UnoType<task::XInteractionDisapprove>::get() );
pCollection = &collection;
}
}
@@ -674,11 +664,8 @@ uno::Sequence< uno::Type > SAL_CALL InteractionSupplyAuthentication::getTypes()
if ( !pCollection )
{
static cppu::OTypeCollection collection(
- getCppuType( static_cast<
- uno::Reference< lang::XTypeProvider > * >( 0 ) ),
- getCppuType( static_cast<
- uno::Reference<
- ucb::XInteractionSupplyAuthentication2 > * >( 0 ) ) );
+ cppu::UnoType<lang::XTypeProvider>::get(),
+ cppu::UnoType<ucb::XInteractionSupplyAuthentication2>::get() );
pCollection = &collection;
}
}
@@ -928,10 +915,8 @@ uno::Sequence< uno::Type > SAL_CALL InteractionSupplyName::getTypes()
if ( !pCollection )
{
static cppu::OTypeCollection collection(
- getCppuType( static_cast<
- uno::Reference< lang::XTypeProvider > * >( 0 ) ),
- getCppuType( static_cast<
- uno::Reference< ucb::XInteractionSupplyName > * >( 0 ) ) );
+ cppu::UnoType<lang::XTypeProvider>::get(),
+ cppu::UnoType<ucb::XInteractionSupplyName>::get() );
pCollection = &collection;
}
}
@@ -1035,11 +1020,8 @@ uno::Sequence< uno::Type > SAL_CALL InteractionReplaceExistingData::getTypes()
if ( !pCollection )
{
static cppu::OTypeCollection collection(
- getCppuType( static_cast<
- uno::Reference< lang::XTypeProvider > * >( 0 ) ),
- getCppuType( static_cast<
- uno::Reference<
- ucb::XInteractionReplaceExistingData > * >( 0 ) ) );
+ cppu::UnoType<lang::XTypeProvider>::get(),
+ cppu::UnoType<ucb::XInteractionReplaceExistingData>::get() );
pCollection = &collection;
}
}
diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx
index 1dffea6beab0..ed9339e4c981 100644
--- a/ucbhelper/source/provider/resultsetmetadata.cxx
+++ b/ucbhelper/source/provider/resultsetmetadata.cxx
@@ -462,23 +462,23 @@ sal_Int32 SAL_CALL ResultSetMetaData::getColumnType( sal_Int32 column )
nType = DataType::BIT; // XRow::getBoolean
else if ( rType == cppu::UnoType<sal_Int32>::get() )
nType = DataType::INTEGER; // XRow::getInt
- else if ( rType == getCppuType( static_cast< const sal_Int64 * >( 0 ) ) )
+ else if ( rType == cppu::UnoType<sal_Int64>::get() )
nType = DataType::BIGINT; // XRow::getLong
- else if ( rType == getCppuType( static_cast< const sal_Int16 * >( 0 ) ) )
+ else if ( rType == cppu::UnoType<sal_Int16>::get() )
nType = DataType::SMALLINT; // XRow::getShort
- else if ( rType == getCppuType( static_cast< const sal_Int8 * >( 0 ) ) )
+ else if ( rType == cppu::UnoType<sal_Int8>::get() )
nType = DataType::TINYINT; // XRow::getByte
- else if ( rType == getCppuType( static_cast< const float * >( 0 ) ) )
+ else if ( rType == cppu::UnoType<float>::get() )
nType = DataType::REAL; // XRow::getFloat
- else if ( rType == getCppuType( static_cast< const double * >( 0 ) ) )
+ else if ( rType == cppu::UnoType<double>::get() )
nType = DataType::DOUBLE; // XRow::getDouble
else if ( rType == getCppuType( static_cast< const Sequence< sal_Int8 > * >( 0 ) ) )
nType = DataType::VARBINARY;// XRow::getBytes
- else if ( rType == getCppuType( static_cast< const Date * >( 0 ) ) )
+ else if ( rType == cppu::UnoType<Date>::get() )
nType = DataType::DATE; // XRow::getDate
- else if ( rType == getCppuType( static_cast< const Time * >( 0 ) ) )
+ else if ( rType == cppu::UnoType<Time>::get() )
nType = DataType::TIME; // XRow::getTime
- else if ( rType == getCppuType( static_cast< const DateTime * >( 0 ) ) )
+ else if ( rType == cppu::UnoType<DateTime>::get() )
nType = DataType::TIMESTAMP;// XRow::getTimestamp
else if ( rType == getCppuType( static_cast< Reference< XInputStream > * >( 0 ) ) )
nType = DataType::LONGVARBINARY; // XRow::getBinaryStream