summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-26 15:49:58 +0200
committerNoel Grandin <noel@peralex.com>2014-09-29 12:50:36 +0200
commit65b69c44fca13de5bd5fe33eb9b607780ab4b75f (patch)
treecb68888d4d992e11da5b959e396a0f7530816527 /idl
parenta2320eaf39e18cf8dc5469e83198f5478595aa51 (diff)
loplugin: cstylecast
Change-Id: I31bbeb5f068754d6dc77c22d759058089b03c9b1
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/slot.hxx2
-rw-r--r--idl/source/objects/basobj.cxx2
-rw-r--r--idl/source/objects/slot.cxx64
-rw-r--r--idl/source/objects/types.cxx42
4 files changed, 55 insertions, 55 deletions
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index 65ede6d3f969..db16bfd96062 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -169,7 +169,7 @@ protected:
public:
SV_DECL_META_FACTORY1( SvMetaSlot, SvMetaReference, 11 )
SvMetaObject * MakeClone() const;
- SvMetaSlot *Clone() const { return (SvMetaSlot *)MakeClone(); }
+ SvMetaSlot *Clone() const { return static_cast<SvMetaSlot *>(MakeClone()); }
SvMetaSlot();
SvMetaSlot( SvMetaType * pType );
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 666d1cbdf106..9cb4f358b38c 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -493,7 +493,7 @@ const SvGlobalName & SvMetaExtern::GetUUId() const
void SvMetaExtern::SetModule( SvIdlDataBase & rBase )
{
- pModule = (SvMetaModule *)rBase.GetStack().Get( TYPE( SvMetaModule ) );
+ pModule = static_cast<SvMetaModule *>(rBase.GetStack().Get( TYPE( SvMetaModule ) ));
}
void SvMetaExtern::ReadAttributesSvIdl( SvIdlDataBase & rBase,
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 755bd9a5e255..759611052ae3 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -314,90 +314,90 @@ OString SvMetaSlot::GetMangleName( bool bVariable ) const
SvMetaType * SvMetaSlot::GetSlotType() const
{
if( aSlotType.Is() || !GetRef() ) return aSlotType;
- return ((SvMetaSlot *)GetRef())->GetSlotType();
+ return static_cast<SvMetaSlot *>(GetRef())->GetSlotType();
}
SvMetaAttribute * SvMetaSlot::GetMethod() const
{
if( aMethod.Is() || !GetRef() ) return aMethod;
- return ((SvMetaSlot *)GetRef())->GetMethod();
+ return static_cast<SvMetaSlot *>(GetRef())->GetMethod();
}
bool SvMetaSlot::GetHasCoreId() const
{
if( aHasCoreId.IsSet() || !GetRef() ) return aHasCoreId;
- return ((SvMetaSlot *)GetRef())->GetHasCoreId();
+ return static_cast<SvMetaSlot *>(GetRef())->GetHasCoreId();
}
const OString& SvMetaSlot::GetGroupId() const
{
if( !aGroupId.getString().isEmpty() || !GetRef() ) return aGroupId.getString();
- return ((SvMetaSlot *)GetRef())->GetGroupId();
+ return static_cast<SvMetaSlot *>(GetRef())->GetGroupId();
}
const OString& SvMetaSlot::GetDisableFlags() const
{
if( !aDisableFlags.getString().isEmpty() || !GetRef() ) return aDisableFlags.getString();
- return ((SvMetaSlot *)GetRef())->GetDisableFlags();
+ return static_cast<SvMetaSlot *>(GetRef())->GetDisableFlags();
}
const OString& SvMetaSlot::GetConfigId() const
{
if( !aConfigId.getString().isEmpty() || !GetRef() ) return aConfigId.getString();
- return ((SvMetaSlot *)GetRef())->GetConfigId();
+ return static_cast<SvMetaSlot *>(GetRef())->GetConfigId();
}
const OString& SvMetaSlot::GetExecMethod() const
{
if( !aExecMethod.getString().isEmpty() || !GetRef() ) return aExecMethod.getString();
- return ((SvMetaSlot *)GetRef())->GetExecMethod();
+ return static_cast<SvMetaSlot *>(GetRef())->GetExecMethod();
}
const OString& SvMetaSlot::GetStateMethod() const
{
if( !aStateMethod.getString().isEmpty() || !GetRef() ) return aStateMethod.getString();
- return ((SvMetaSlot *)GetRef())->GetStateMethod();
+ return static_cast<SvMetaSlot *>(GetRef())->GetStateMethod();
}
const OString& SvMetaSlot::GetDefault() const
{
if( !aDefault.getString().isEmpty() || !GetRef() ) return aDefault.getString();
- return ((SvMetaSlot *)GetRef())->GetDefault();
+ return static_cast<SvMetaSlot *>(GetRef())->GetDefault();
}
bool SvMetaSlot::GetPseudoSlots() const
{
if( aPseudoSlots.IsSet() || !GetRef() ) return aPseudoSlots;
- return ((SvMetaSlot *)GetRef())->GetPseudoSlots();
+ return static_cast<SvMetaSlot *>(GetRef())->GetPseudoSlots();
}
bool SvMetaSlot::GetCachable() const
{
// Cachable and Volatile are exclusive
if( !GetRef() || aCachable.IsSet() || aVolatile.IsSet() )
return aCachable;
- return ((SvMetaSlot *)GetRef())->GetCachable();
+ return static_cast<SvMetaSlot *>(GetRef())->GetCachable();
}
bool SvMetaSlot::GetVolatile() const
{
// Cachable and Volatile are exclusive
if( !GetRef() || aVolatile.IsSet() || aCachable.IsSet() )
return aVolatile;
- return ((SvMetaSlot *)GetRef())->GetVolatile();
+ return static_cast<SvMetaSlot *>(GetRef())->GetVolatile();
}
bool SvMetaSlot::GetToggle() const
{
if( aToggle.IsSet() || !GetRef() ) return aToggle;
- return ((SvMetaSlot *)GetRef())->GetToggle();
+ return static_cast<SvMetaSlot *>(GetRef())->GetToggle();
}
bool SvMetaSlot::GetAutoUpdate() const
{
if( aAutoUpdate.IsSet() || !GetRef() ) return aAutoUpdate;
- return ((SvMetaSlot *)GetRef())->GetAutoUpdate();
+ return static_cast<SvMetaSlot *>(GetRef())->GetAutoUpdate();
}
bool SvMetaSlot::GetSynchron() const
{
// Synchron and Asynchron are exclusive
if( !GetRef() || aSynchron.IsSet() || aAsynchron.IsSet() )
return aSynchron;
- return ((SvMetaSlot *)GetRef())->GetSynchron();
+ return static_cast<SvMetaSlot *>(GetRef())->GetSynchron();
}
bool SvMetaSlot::GetAsynchron() const
{
// Synchron and Asynchron are exclusive
if( !GetRef() || aAsynchron.IsSet() || aSynchron.IsSet() )
return aAsynchron;
- return ((SvMetaSlot *)GetRef())->GetAsynchron();
+ return static_cast<SvMetaSlot *>(GetRef())->GetAsynchron();
}
bool SvMetaSlot::GetRecordPerItem() const
{
@@ -405,7 +405,7 @@ bool SvMetaSlot::GetRecordPerItem() const
if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet()
|| aRecordPerSet.IsSet() || aRecordManual.IsSet() )
return aRecordPerItem;
- return ((SvMetaSlot *)GetRef())->GetRecordPerItem();
+ return static_cast<SvMetaSlot *>(GetRef())->GetRecordPerItem();
}
bool SvMetaSlot::GetRecordPerSet() const
{
@@ -413,7 +413,7 @@ bool SvMetaSlot::GetRecordPerSet() const
if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet()
|| aRecordPerSet.IsSet() || aRecordManual.IsSet() )
return aRecordPerSet;
- return ((SvMetaSlot *)GetRef())->GetRecordPerSet();
+ return static_cast<SvMetaSlot *>(GetRef())->GetRecordPerSet();
}
bool SvMetaSlot::GetRecordManual() const
{
@@ -421,7 +421,7 @@ bool SvMetaSlot::GetRecordManual() const
if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet()
|| aRecordPerSet.IsSet() || aRecordManual.IsSet() )
return aRecordManual;
- return ((SvMetaSlot *)GetRef())->GetRecordManual();
+ return static_cast<SvMetaSlot *>(GetRef())->GetRecordManual();
}
bool SvMetaSlot::GetNoRecord() const
{
@@ -429,71 +429,71 @@ bool SvMetaSlot::GetNoRecord() const
if( !GetRef() || aRecordPerItem.IsSet() || aNoRecord.IsSet()
|| aRecordPerSet.IsSet() || aRecordManual.IsSet() )
return aNoRecord;
- return ((SvMetaSlot *)GetRef())->GetNoRecord();
+ return static_cast<SvMetaSlot *>(GetRef())->GetNoRecord();
}
bool SvMetaSlot::GetRecordAbsolute() const
{
if( !GetRef() || aRecordAbsolute.IsSet() )
return aRecordAbsolute;
- return ((SvMetaSlot *)GetRef())->GetRecordAbsolute();
+ return static_cast<SvMetaSlot *>(GetRef())->GetRecordAbsolute();
}
bool SvMetaSlot::GetHasDialog() const
{
if( aHasDialog.IsSet() || !GetRef() ) return aHasDialog;
- return ((SvMetaSlot *)GetRef())->GetHasDialog();
+ return static_cast<SvMetaSlot *>(GetRef())->GetHasDialog();
}
const OString& SvMetaSlot::GetPseudoPrefix() const
{
if( !aPseudoPrefix.getString().isEmpty() || !GetRef() ) return aPseudoPrefix.getString();
- return ((SvMetaSlot *)GetRef())->GetPseudoPrefix();
+ return static_cast<SvMetaSlot *>(GetRef())->GetPseudoPrefix();
}
bool SvMetaSlot::GetMenuConfig() const
{
if( aMenuConfig.IsSet() || !GetRef() ) return aMenuConfig;
- return ((SvMetaSlot *)GetRef())->GetMenuConfig();
+ return static_cast<SvMetaSlot *>(GetRef())->GetMenuConfig();
}
bool SvMetaSlot::GetToolBoxConfig() const
{
if( aToolBoxConfig.IsSet() || !GetRef() ) return aToolBoxConfig;
- return ((SvMetaSlot *)GetRef())->GetToolBoxConfig();
+ return static_cast<SvMetaSlot *>(GetRef())->GetToolBoxConfig();
}
bool SvMetaSlot::GetStatusBarConfig() const
{
if( aStatusBarConfig.IsSet() || !GetRef() ) return aStatusBarConfig;
- return ((SvMetaSlot *)GetRef())->GetStatusBarConfig();
+ return static_cast<SvMetaSlot *>(GetRef())->GetStatusBarConfig();
}
bool SvMetaSlot::GetAccelConfig() const
{
if( aAccelConfig.IsSet() || !GetRef() ) return aAccelConfig;
- return ((SvMetaSlot *)GetRef())->GetAccelConfig();
+ return static_cast<SvMetaSlot *>(GetRef())->GetAccelConfig();
}
bool SvMetaSlot::GetFastCall() const
{
if( aFastCall.IsSet() || !GetRef() ) return aFastCall;
- return ((SvMetaSlot *)GetRef())->GetFastCall();
+ return static_cast<SvMetaSlot *>(GetRef())->GetFastCall();
}
bool SvMetaSlot::GetContainer() const
{
if( aContainer.IsSet() || !GetRef() ) return aContainer;
- return ((SvMetaSlot *)GetRef())->GetContainer();
+ return static_cast<SvMetaSlot *>(GetRef())->GetContainer();
}
bool SvMetaSlot::GetImageRotation() const
{
if( aImageRotation.IsSet() || !GetRef() ) return aImageRotation;
- return ((SvMetaSlot *)GetRef())->GetImageRotation();
+ return static_cast<SvMetaSlot *>(GetRef())->GetImageRotation();
}
bool SvMetaSlot::GetImageReflection() const
{
if( aImageReflection.IsSet() || !GetRef() ) return aImageReflection;
- return ((SvMetaSlot *)GetRef())->GetImageReflection();
+ return static_cast<SvMetaSlot *>(GetRef())->GetImageReflection();
}
const OString& SvMetaSlot::GetUnoName() const
{
if( aUnoName.IsSet() || !GetRef() ) return aUnoName.getString();
- return ((SvMetaSlot *)GetRef())->GetUnoName();
+ return static_cast<SvMetaSlot *>(GetRef())->GetUnoName();
}
void SvMetaSlot::ReadAttributesSvIdl( SvIdlDataBase & rBase,
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index e0a2d87a8de4..08e78141f9ea 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -100,25 +100,25 @@ void SvMetaAttribute::Save( SvPersistStream & rStm )
SvMetaType * SvMetaAttribute::GetType() const
{
if( aType.Is() || !GetRef() ) return aType;
- return ((SvMetaAttribute *)GetRef())->GetType();
+ return static_cast<SvMetaAttribute *>(GetRef())->GetType();
}
const SvNumberIdentifier & SvMetaAttribute::GetSlotId() const
{
if( aSlotId.IsSet() || !GetRef() ) return aSlotId;
- return ((SvMetaAttribute *)GetRef())->GetSlotId();
+ return static_cast<SvMetaAttribute *>(GetRef())->GetSlotId();
}
bool SvMetaAttribute::GetReadonly() const
{
if( aReadonly.IsSet() || !GetRef() ) return aReadonly;
- return ((SvMetaAttribute *)GetRef())->GetReadonly();
+ return static_cast<SvMetaAttribute *>(GetRef())->GetReadonly();
}
bool SvMetaAttribute::GetExport() const
{
if( aExport.IsSet() || !GetRef() ) return aExport;
- return ((SvMetaAttribute *)GetRef())->GetExport();
+ return static_cast<SvMetaAttribute *>(GetRef())->GetExport();
}
bool SvMetaAttribute::GetHidden() const
@@ -129,13 +129,13 @@ bool SvMetaAttribute::GetHidden() const
else if( aHidden.IsSet() || !GetRef() )
return aHidden;
else
- return ((SvMetaAttribute *)GetRef())->GetHidden();
+ return static_cast<SvMetaAttribute *>(GetRef())->GetHidden();
}
bool SvMetaAttribute::GetAutomation() const
{
if( aAutomation.IsSet() || !GetRef() ) return aAutomation;
- return ((SvMetaAttribute *)GetRef())->GetAutomation();
+ return static_cast<SvMetaAttribute *>(GetRef())->GetAutomation();
}
bool SvMetaAttribute::GetIsCollection() const
@@ -152,13 +152,13 @@ bool SvMetaAttribute::GetIsCollection() const
return aIsCollection;
}
- return ((SvMetaSlot *)GetRef())->GetIsCollection();
+ return static_cast<SvMetaSlot *>(GetRef())->GetIsCollection();
}
bool SvMetaAttribute::GetReadOnlyDoc() const
{
if( aReadOnlyDoc.IsSet() || !GetRef() ) return aReadOnlyDoc;
- return ((SvMetaSlot *)GetRef())->GetReadOnlyDoc();
+ return static_cast<SvMetaSlot *>(GetRef())->GetReadOnlyDoc();
}
bool SvMetaAttribute::IsMethod() const
@@ -883,7 +883,7 @@ void SvMetaType::SetType( int nT )
SvMetaType * SvMetaType::GetBaseType() const
{
if( GetRef() && GetType() == TYPE_BASE )
- return ((SvMetaType *)GetRef())->GetBaseType();
+ return static_cast<SvMetaType *>(GetRef())->GetBaseType();
return (SvMetaType *)this;
}
@@ -891,7 +891,7 @@ SvMetaType * SvMetaType::GetReturnType() const
{
DBG_ASSERT( GetType() == TYPE_METHOD, "no method" );
DBG_ASSERT( GetRef(), "no return type" );
- return (SvMetaType *)GetRef();
+ return static_cast<SvMetaType *>(GetRef());
}
const OString& SvMetaType::GetBasicName() const
@@ -899,7 +899,7 @@ const OString& SvMetaType::GetBasicName() const
if( aBasicName.IsSet() || !GetRef() )
return aBasicName.getString();
else
- return ((SvMetaType*)GetRef())->GetBasicName();
+ return static_cast<SvMetaType*>(GetRef())->GetBasicName();
}
OString SvMetaType::GetBasicPostfix() const
@@ -915,7 +915,7 @@ bool SvMetaType::GetIn() const
if( aIn.IsSet() || !GetRef() )
return aIn;
else
- return ((SvMetaType *)GetRef())->GetIn();
+ return static_cast<SvMetaType *>(GetRef())->GetIn();
}
bool SvMetaType::GetOut() const
@@ -923,7 +923,7 @@ bool SvMetaType::GetOut() const
if( aOut.IsSet() || !GetRef() )
return aOut;
else
- return ((SvMetaType *)GetRef())->GetOut();
+ return static_cast<SvMetaType *>(GetRef())->GetOut();
}
void SvMetaType::SetCall0( int e )
@@ -947,7 +947,7 @@ int SvMetaType::GetCall0() const
if( aCall0.IsSet() || !GetRef() )
return aCall0;
else
- return ((SvMetaType *)GetRef())->GetCall0();
+ return static_cast<SvMetaType *>(GetRef())->GetCall0();
}
void SvMetaType::SetCall1( int e )
@@ -971,7 +971,7 @@ int SvMetaType::GetCall1() const
if( aCall1.IsSet() || !GetRef() )
return aCall1;
else
- return ((SvMetaType *)GetRef())->GetCall1();
+ return static_cast<SvMetaType *>(GetRef())->GetCall1();
}
const OString& SvMetaType::GetSvName() const
@@ -979,7 +979,7 @@ const OString& SvMetaType::GetSvName() const
if( aSvName.IsSet() || !GetRef() )
return aSvName.getString();
else
- return ((SvMetaType *)GetRef())->GetSvName();
+ return static_cast<SvMetaType *>(GetRef())->GetSvName();
}
const OString& SvMetaType::GetSbxName() const
@@ -987,7 +987,7 @@ const OString& SvMetaType::GetSbxName() const
if( aSbxName.IsSet() || !GetRef() )
return aSbxName.getString();
else
- return ((SvMetaType *)GetRef())->GetSbxName();
+ return static_cast<SvMetaType *>(GetRef())->GetSbxName();
}
const OString& SvMetaType::GetOdlName() const
@@ -995,7 +995,7 @@ const OString& SvMetaType::GetOdlName() const
if( aOdlName.IsSet() || !GetRef() )
return aOdlName.getString();
else
- return ((SvMetaType *)GetRef())->GetOdlName();
+ return static_cast<SvMetaType *>(GetRef())->GetOdlName();
}
const OString& SvMetaType::GetCName() const
@@ -1003,7 +1003,7 @@ const OString& SvMetaType::GetCName() const
if( aCName.IsSet() || !GetRef() )
return aCName.getString();
else
- return ((SvMetaType *)GetRef())->GetCName();
+ return static_cast<SvMetaType *>(GetRef())->GetCName();
}
bool SvMetaType::SetName( const OString& rName, SvIdlDataBase * pBase )
@@ -1283,7 +1283,7 @@ void SvMetaType::WriteHeaderSvIdl( SvIdlDataBase & rBase,
rOutStm.WriteCharPtr( SvHash_typedef()->GetName().getStr() ).WriteChar( ' ' );
if( GetRef() )
{
- ((SvMetaType *)GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
+ static_cast<SvMetaType *>(GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
rOutStm.WriteChar( ' ' );
}
rOutStm.WriteCharPtr( GetName().getString().getStr() );
@@ -1292,7 +1292,7 @@ void SvMetaType::WriteHeaderSvIdl( SvIdlDataBase & rBase,
case TYPE_METHOD:
{
rOutStm.WriteCharPtr( SvHash_typedef()->GetName().getStr() ).WriteChar( ' ' );
- ((SvMetaType *)GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
+ static_cast<SvMetaType *>(GetRef())->WriteTheType( rBase, rOutStm, nTab, WRITE_IDL );
rOutStm.WriteChar( ' ' ).WriteCharPtr( GetName().getString().getStr() ).WriteCharPtr( "( " );
WriteContextSvIdl( rBase, rOutStm, nTab );
rOutStm.WriteCharPtr( " )" );