summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-05-04 15:51:56 +0200
committerThomas Arnhold <thomas@arnhold.org>2012-05-04 15:52:57 +0200
commit135c63c8f9cc363c0895542b0f3bed48b61ea836 (patch)
tree5afa3bcc304e246b38058c2ad7b0d1fd1e76a05f /stoc
parentc48fe716225b1b784d657685396b6cf5fee4fc3d (diff)
fdo#48253 Expand SAL_STATIC_CAST and SAL_CONST_CAST
Change-Id: I50f0887ceb4517d7ef234f970ca2ba679d533382
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/corereflection/criface.cxx4
-rw-r--r--stoc/source/inspect/introspection.cxx2
-rw-r--r--stoc/source/invocation/invocation.cxx22
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx10
4 files changed, 18 insertions, 20 deletions
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx
index ce4f15157620..447a080a9fc4 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -244,13 +244,13 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue )
sal_Bool bAssign;
if (pTD->eTypeClass == typelib_TypeClass_ANY)
{
- uno_copyAndConvertData( pArg, SAL_CONST_CAST( Any *, &rValue ),
+ uno_copyAndConvertData( pArg, (const_cast< Any * >(&rValue)),
pTD, getReflection()->getCpp2Uno().get() );
bAssign = sal_True;
}
else if (typelib_typedescriptionreference_equals( rValue.getValueTypeRef(), pTD->pWeakRef ))
{
- uno_copyAndConvertData( pArg, SAL_CONST_CAST( void *, rValue.getValue() ),
+ uno_copyAndConvertData( pArg, (const_cast< void * >(rValue.getValue()) ),
pTD, getReflection()->getCpp2Uno().get() );
bAssign = sal_True;
}
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 207088dd5a2b..c0417cb2472c 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -2226,7 +2226,7 @@ rtl::Reference< IntrospectionAccessStatic_Impl > ImplIntrospection::implInspect(
const Reference<XIdlClass>& rxIfaceClass = pParamArray[j];
// Pruefen, ob das Interface schon beruecksichtigt wurde.
- XInterface* pIface = SAL_STATIC_CAST( XInterface*, rxIfaceClass.get() );
+ XInterface* pIface = (static_cast< XInterface* >(rxIfaceClass.get()) );
if( aCheckedInterfacesMap.count( pIface ) > 0 )
{
// Kennen wir schon
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index e54fb6f384d6..4254c5b3978a 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -278,9 +278,9 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType )
{
// PropertySet-Implementation
Any a = ::cppu::queryInterface( aType,
- SAL_STATIC_CAST(XInvocation*, this),
- SAL_STATIC_CAST(XMaterialHolder*, this),
- SAL_STATIC_CAST(XTypeProvider *,this) );
+ (static_cast< XInvocation* >(this)),
+ (static_cast< XMaterialHolder* >(this)),
+ (static_cast< XTypeProvider * >(this)) );
if( a.hasValue() )
{
return a;
@@ -293,40 +293,40 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType )
if ((_xDirect.is() && _xENDirect.is()) ||
(!_xDirect.is() && (_xENIntrospection.is() || _xENNameAccess.is())))
{
- return makeAny( Reference< XExactName >( SAL_STATIC_CAST(XExactName*, this) ) );
+ return makeAny( Reference< XExactName >( (static_cast< XExactName* >(this)) ) );
}
}
else if ( aType == getCppuType( (Reference<XNameContainer>*) NULL ) )
{
if( _xNameContainer.is() )
- return makeAny( Reference< XNameContainer >( SAL_STATIC_CAST(XNameContainer*, this) ) );
+ return makeAny( Reference< XNameContainer >( (static_cast< XNameContainer* >(this)) ) );
}
else if ( aType == getCppuType( (Reference<XNameAccess>*) NULL ) )
{
if( _xNameAccess.is() )
- return makeAny( Reference< XNameAccess >( SAL_STATIC_CAST(XNameAccess*, this) ) );
+ return makeAny( Reference< XNameAccess >( (static_cast< XNameAccess* >(this)) ) );
}
else if ( aType == getCppuType( (Reference<XIndexContainer>*) NULL ) )
{
if (_xIndexContainer.is())
- return makeAny( Reference< XIndexContainer >( SAL_STATIC_CAST(XIndexContainer*, this) ) );
+ return makeAny( Reference< XIndexContainer >( (static_cast< XIndexContainer* >(this)) ) );
}
else if ( aType == getCppuType( (Reference<XIndexAccess>*) NULL ) )
{
if (_xIndexAccess.is())
- return makeAny( Reference< XIndexAccess >( SAL_STATIC_CAST(XIndexAccess*, this) ) );
+ return makeAny( Reference< XIndexAccess >( (static_cast< XIndexAccess* >(this)) ) );
}
else if ( aType == getCppuType( (Reference<XEnumerationAccess>*) NULL ) )
{
if (_xEnumerationAccess.is())
- return makeAny( Reference< XEnumerationAccess >( SAL_STATIC_CAST(XEnumerationAccess*, this) ) );
+ return makeAny( Reference< XEnumerationAccess >( (static_cast< XEnumerationAccess* >(this)) ) );
}
else if ( aType == getCppuType( (Reference<XElementAccess>*) NULL ) )
{
if (_xElementAccess.is())
{
return makeAny( Reference< XElementAccess >(
- SAL_STATIC_CAST(XElementAccess*, SAL_STATIC_CAST(XNameContainer*, this) ) ) );
+ (static_cast< XElementAccess* >((static_cast< XNameContainer* >(this))) ) ) );
}
}
else if ( aType == getCppuType( (Reference<XInvocation2>*) NULL ) )
@@ -336,7 +336,7 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType )
if ( ( _xDirect.is() && _xDirect2.is()) ||
(!_xDirect.is() && _xIntrospectionAccess.is() ) )
{
- return makeAny( Reference< XInvocation2 >( SAL_STATIC_CAST(XInvocation2*, this) ) );
+ return makeAny( Reference< XInvocation2 >( (static_cast< XInvocation2* >(this)) ) );
}
}
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 55ee0d9e4ef2..152fe8dadb3c 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -1898,9 +1898,8 @@ Reference<XInterface > SAL_CALL OServiceManager_CreateInstance(
const Reference< XComponentContext > & xContext )
{
return Reference<XInterface >(
- SAL_STATIC_CAST(
- XInterface *, SAL_STATIC_CAST(
- OWeakObject *, new stoc_smgr::OServiceManager( xContext ) ) ) );
+ static_cast< XInterface * >(
+ static_cast< OWeakObject * >( new stoc_smgr::OServiceManager( xContext ) ) ) );
}
/**
@@ -1911,9 +1910,8 @@ Reference<XInterface > SAL_CALL ORegistryServiceManager_CreateInstance(
throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
{
return Reference<XInterface >(
- SAL_STATIC_CAST(
- XInterface *, SAL_STATIC_CAST(
- OWeakObject *, new stoc_smgr::ORegistryServiceManager( xContext ) ) ) );
+ static_cast< XInterface * >(
+ static_cast< OWeakObject * >( new stoc_smgr::ORegistryServiceManager( xContext ) ) ) );
}
Reference<XInterface > SAL_CALL OServiceManagerWrapper_CreateInstance(