summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-11 12:49:03 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-11 12:49:03 +0200
commitef6877c1671d7aea608b9448baa964c006c247ba (patch)
treecc73cf240893ca4466c0f5adb5e62f3c48d7f762 /basic
parent000c31c384c62dce9bc9160047f02cb2c62a7771 (diff)
loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: I1e4363f917a978434fb11368918435da12531dc6
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basmgr.cxx2
-rw-r--r--basic/source/classes/eventatt.cxx2
-rw-r--r--basic/source/classes/sbunoobj.cxx36
-rw-r--r--basic/source/runtime/methods.cxx2
-rw-r--r--basic/source/runtime/runtime.cxx8
-rw-r--r--basic/source/runtime/stdobj.cxx2
-rw-r--r--basic/source/sbx/sbxvalue.cxx2
-rw-r--r--basic/source/sbx/sbxvar.cxx2
8 files changed, 28 insertions, 28 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 83e6f50552a1..158f0d280a6e 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -2329,7 +2329,7 @@ void SAL_CALL StarBasicAccess_Impl::addDialog
uno::Reference< script::XStarBasicAccess > getStarBasicAccess( BasicManager* pMgr )
{
uno::Reference< script::XStarBasicAccess > xRet =
- new StarBasicAccess_Impl( (BasicManager*)pMgr );
+ new StarBasicAccess_Impl( pMgr );
return xRet;
}
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index e67f5b3c7775..6472d00d0cad 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -431,7 +431,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
}
// Get dialog
- SbxBaseRef pObj = (SbxBase*)rPar.Get( 1 )->GetObject();
+ SbxBaseRef pObj = rPar.Get( 1 )->GetObject();
if( !(pObj && pObj->ISA(SbUnoObject)) )
{
StarBASIC::Error( SbERR_BAD_ARGUMENT );
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index e49e63822719..8e9a3d4d94f8 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -138,7 +138,7 @@ SbxVariable* getDefaultProp( SbxVariable* pRef )
SbxVariable* pDefaultProp = NULL;
if ( pRef->GetType() == SbxOBJECT )
{
- SbxObject* pObj = PTR_CAST(SbxObject,(SbxVariable*) pRef);
+ SbxObject* pObj = PTR_CAST(SbxObject, pRef);
if ( !pObj )
{
SbxBase* pObjVarObj = pRef->GetObject();
@@ -146,7 +146,7 @@ SbxVariable* getDefaultProp( SbxVariable* pRef )
}
if ( pObj && pObj->ISA(SbUnoObject) )
{
- SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)pObj);
+ SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,pObj);
pDefaultProp = pUnoObj->GetDfltProperty();
}
}
@@ -155,7 +155,7 @@ SbxVariable* getDefaultProp( SbxVariable* pRef )
void SetSbUnoObjectDfltPropName( SbxObject* pObj )
{
- SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*) pObj);
+ SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject, pObj);
if ( pUnoObj )
{
OUString sDfltPropName;
@@ -875,7 +875,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal )
SbxDataType eBaseType = pVal->SbxValue::GetType();
if( eBaseType == SbxOBJECT )
{
- SbxBaseRef xObj = (SbxBase*)pVal->GetObject();
+ SbxBaseRef xObj = pVal->GetObject();
if( !xObj )
{
aRetType = cppu::UnoType<XInterface>::get();
@@ -1001,7 +1001,7 @@ Any sbxToUnoValueImpl( const SbxValue* pVar, bool bBlockConversionToSmallestType
SbxDataType eBaseType = pVar->SbxValue::GetType();
if( eBaseType == SbxOBJECT )
{
- SbxBaseRef xObj = (SbxBase*)pVar->GetObject();
+ SbxBaseRef xObj = pVar->GetObject();
if( xObj.Is() )
{
if( xObj->ISA(SbUnoAnyObject) )
@@ -1203,7 +1203,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
SbxDataType eBaseType = pVar->SbxValue::GetType();
if( eBaseType == SbxOBJECT )
{
- SbxBaseRef xObj = (SbxBase*)pVar->GetObject();
+ SbxBaseRef xObj = pVar->GetObject();
if( xObj.Is() && xObj->ISA(SbUnoAnyObject) )
{
return static_cast<SbUnoAnyObject*>((SbxBase*)xObj)->getValue();
@@ -1258,7 +1258,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
}
}
- SbxBaseRef pObj = (SbxBase*)pVar->GetObject();
+ SbxBaseRef pObj = pVar->GetObject();
if( pObj && pObj->ISA(SbUnoObject) )
{
aRetVal = static_cast<SbUnoObject*>((SbxBase*)pObj)->getUnoAny();
@@ -1284,7 +1284,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
// XIdlClass?
Reference< XIdlClass > xIdlClass;
- SbxBaseRef pObj = (SbxBase*)pVar->GetObject();
+ SbxBaseRef pObj = pVar->GetObject();
if( pObj && pObj->ISA(SbUnoObject) )
{
Any aUnoAny = static_cast<SbUnoObject*>((SbxBase*)pObj)->getUnoAny();
@@ -1320,7 +1320,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
case TypeClass_SEQUENCE:
{
- SbxBaseRef xObj = (SbxBase*)pVar->GetObject();
+ SbxBaseRef xObj = pVar->GetObject();
if( xObj && xObj->ISA(SbxDimArray) )
{
SbxBase* pObj = static_cast<SbxBase*>(xObj);
@@ -1568,7 +1568,7 @@ Any invokeAutomationMethod( const OUString& Name, Sequence< Any >& args, SbxArra
sal_Int16 iTarget = pIndices[ j ];
if( iTarget >= (sal_Int16)nParamCount )
break;
- unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pNewValues[ j ] );
+ unoToSbxValue( pParams->Get( (sal_uInt16)(j+1) ), pNewValues[ j ] );
}
}
return aRetAny;
@@ -2303,7 +2303,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
const ParamInfo& rInfo = pParamInfos[j];
ParamMode aParamMode = rInfo.aMode;
if( aParamMode != ParamMode_IN )
- unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pAnyArgs[ j ] );
+ unoToSbxValue( pParams->Get( (sal_uInt16)(j+1) ), pAnyArgs[ j ] );
}
}
}
@@ -3132,7 +3132,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
refVar->PutBool( false );
// get the Uno-Object
- SbxBaseRef pObj = (SbxBase*)rPar.Get( 1 )->GetObject();
+ SbxBaseRef pObj = rPar.Get( 1 )->GetObject();
if( !(pObj && pObj->ISA(SbUnoObject)) )
{
return;
@@ -3198,7 +3198,7 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
{
return;
}
- SbxBaseRef pObj = (SbxBase*)rPar.Get( 1 )->GetObject();
+ SbxBaseRef pObj = rPar.Get( 1 )->GetObject();
if( !(pObj && pObj->ISA(SbUnoObject)) )
{
return;
@@ -3233,7 +3233,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
{
return;
}
- SbxBaseRef pObj1 = (SbxBase*)xParam1->GetObject();
+ SbxBaseRef pObj1 = xParam1->GetObject();
if( !(pObj1 && pObj1->ISA(SbUnoObject)) )
{
return;
@@ -3252,7 +3252,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
{
return;
}
- SbxBaseRef pObj2 = (SbxBase*)xParam2->GetObject();
+ SbxBaseRef pObj2 = xParam2->GetObject();
if( !(pObj2 && pObj2->ISA(SbUnoObject)) )
{
return;
@@ -3756,7 +3756,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
continue;
if( xParam->isOut() )
- unoToSbxValue( (SbxVariable*)pParams->Get( (sal_uInt16)(j+1) ), pAnyArgs[ j ] );
+ unoToSbxValue( pParams->Get( (sal_uInt16)(j+1) ), pAnyArgs[ j ] );
}
}
}
@@ -4264,7 +4264,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
// XIdlClass?
Reference< XIdlClass > xIdlClass;
- SbxBaseRef pObj = (SbxBase*)pVal->GetObject();
+ SbxBaseRef pObj = pVal->GetObject();
if( pObj && pObj->ISA(SbUnoObject) )
{
Any aUnoAny = static_cast<SbUnoObject*>((SbxBase*)pObj)->getUnoAny();
@@ -4763,7 +4763,7 @@ bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal )
bool bSuccess = false;
SbUnoObject* pUnoObj = NULL;
- if( pObj != NULL && (pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*)pObj)) != NULL )
+ if( pObj != NULL && (pUnoObj = PTR_CAST(SbUnoObject,pObj)) != NULL )
{
// Only for native COM objects
if( pUnoObj->isNativeCOMObject() )
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 8b40e3643ef9..d05c3fa88f18 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2533,7 +2533,7 @@ RTLFUNC(IsObject)
else
{
SbxVariable* pVar = rPar.Get(1);
- SbxBase* pObj = (SbxBase*)pVar->GetObject();
+ SbxBase* pObj = pVar->GetObject();
// #100385: GetObject can result in an error, so reset it
SbxBase::ResetError();
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index fc3b7f844a5c..5fc439950d94 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -3733,7 +3733,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
else if( bVBAEnabled && p->GetType() == SbxOBJECT && (!p->ISA(SbxMethod) || !p->IsBroadcaster()) )
{
// Check for default method with named parameters
- SbxBaseRef pObj = (SbxBase*)p->GetObject();
+ SbxBaseRef pObj = p->GetObject();
if( pObj && pObj->ISA(SbUnoObject) )
{
SbUnoObject* pUnoObj = static_cast<SbUnoObject*>((SbxBase*)pObj);
@@ -3859,7 +3859,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
if ( pPar )
{
// is it an uno-object?
- SbxBaseRef pObj = (SbxBase*)pElem->GetObject();
+ SbxBaseRef pObj = pElem->GetObject();
if( pObj )
{
if( pObj->ISA(SbUnoObject) )
@@ -3930,7 +3930,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
if ( pDflt )
{
pDflt->Broadcast( SBX_HINT_DATAWANTED );
- SbxBaseRef pDfltObj = (SbxBase*)pDflt->GetObject();
+ SbxBaseRef pDfltObj = pDflt->GetObject();
if( pDfltObj )
{
if( pDfltObj->ISA(SbUnoObject) )
@@ -4384,7 +4384,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
DimImpl( refVar );
// fill the array with instances of the requested class
- SbxBaseRef xObj = (SbxBase*)refVar->GetObject();
+ SbxBaseRef xObj = refVar->GetObject();
if( !xObj )
{
StarBASIC::Error( SbERR_INVALID_OBJECT );
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index 2e4f2a41a589..f66cb403d9bc 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -838,7 +838,7 @@ void SbiStdObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
bWrite = true;
if( t == SBX_HINT_DATAWANTED || bWrite )
{
- RtlCall p = (RtlCall) aMethods[ nCallId-1 ].pFunc;
+ RtlCall p = aMethods[ nCallId-1 ].pFunc;
SbxArrayRef rPar( pPar_ );
if( !pPar_ )
{
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index bced40f13147..4511a3fc87ff 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -596,7 +596,7 @@ bool SbxValue::PutStringExt( const OUString& r )
// otherwise take the original (Unicode remains)
bool bRet;
if( ImpConvStringExt( aStr, eTargetType ) )
- aRes.pOUString = (OUString*)&aStr;
+ aRes.pOUString = &aStr;
else
aRes.pOUString = const_cast<OUString*>(&r);
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 0771c71bc203..780b817cf6b3 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -580,7 +580,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
return false;
}
- ((SbxVariable*) this)->Broadcast( SBX_HINT_DATACHANGED );
+ Broadcast( SBX_HINT_DATACHANGED );
nHash = MakeHashCode( maName );
SetModified( true );
return true;