summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:27:44 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:27:44 +0200
commit4446cdf20b7b2ef8438058529aeee9b1e1f6549d (patch)
tree9994d3ddc3b19b38246f0bc4317efb8701bf3441 /scripting
parentdeb7a093b04d05c5e8d33df18ff3f3b510ca6f29 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I14d1c6f703c83bc4a0259ce68e93a315bbfdde4e
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/dlgprov/dlgevtatt.cxx2
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx6
-rw-r--r--scripting/source/stringresource/stringresource.cxx2
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx12
4 files changed, 11 insertions, 11 deletions
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index cedfc188e44c..30f16b6b3ceb 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -394,7 +394,7 @@ namespace dlgprov
void DialogAllListenerImpl::firing_impl( const AllEventObject& Event, Any* pRet )
{
ScriptEvent aScriptEvent;
- aScriptEvent.Source = (OWeakObject *)this; // get correct XInterface
+ aScriptEvent.Source = static_cast<OWeakObject *>(this); // get correct XInterface
aScriptEvent.ListenerType = Event.ListenerType;
aScriptEvent.MethodName = Event.MethodName;
aScriptEvent.Arguments = Event.Arguments;
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 5c851a48aff1..66d1bb1d1140 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -810,7 +810,7 @@ namespace scripting_runtimemgr
Reference< XInterface > SAL_CALL sp_create(
const Reference< XComponentContext > & xCompC )
{
- return ( cppu::OWeakObject * ) new ::func_provider::MasterScriptProvider( xCompC );
+ return static_cast<cppu::OWeakObject *>(new ::func_provider::MasterScriptProvider( xCompC ));
}
@@ -835,8 +835,8 @@ OUString sp_getImplementationName( )
Reference< XInterface > SAL_CALL urihelper_create(
const Reference< XComponentContext > & xCompC )
{
- return ( cppu::OWeakObject * )
- new ::func_provider::ScriptingFrameworkURIHelper( xCompC );
+ return static_cast<cppu::OWeakObject *>(
+ new ::func_provider::ScriptingFrameworkURIHelper( xCompC ));
}
Sequence< OUString > urihelper_getSupportedServiceNames( )
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 0c64fa2b6880..2b7fafe9d460 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -700,7 +700,7 @@ void StringResourceImpl::implModified()
void StringResourceImpl::implNotifyListeners()
{
EventObject aEvent;
- aEvent.Source = static_cast< XInterface* >( (OWeakObject*)this );
+ aEvent.Source = static_cast< XInterface* >( static_cast<OWeakObject*>(this) );
::cppu::OInterfaceIteratorHelper it( m_aListenerContainer );
while( it.hasMoreElements() )
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 616533c6e3dd..368299134118 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -227,14 +227,14 @@ TypeList listBoxList = {&typeXListBox, 1};
//this array stores the OO event to VBA event translation info
static TranslatePropMap aTranslatePropMap_Impl[] =
{
- { OUString("actionPerformed"), { OUString("_Change"), NULL, DenyType, (void*)(&radioButtonList) } },
+ { OUString("actionPerformed"), { OUString("_Change"), NULL, DenyType, static_cast<void*>(&radioButtonList) } },
// actionPerformed ooo event
{ OUString("actionPerformed"), { OUString("_Click"), NULL, ApproveAll, NULL } },
- { OUString("itemStateChanged"), { OUString("_Change"), NULL, ApproveType, (void*)(&radioButtonList) } },
+ { OUString("itemStateChanged"), { OUString("_Change"), NULL, ApproveType, static_cast<void*>(&radioButtonList) } },
// itemStateChanged ooo event
- { OUString("itemStateChanged"), { OUString("_Click"), NULL, ApproveType, (void*)(&comboBoxList) } },
+ { OUString("itemStateChanged"), { OUString("_Click"), NULL, ApproveType, static_cast<void*>(&comboBoxList) } },
- { OUString("itemStateChanged"), { OUString("_Click"), NULL, ApproveType, (void*)(&listBoxList) } },
+ { OUString("itemStateChanged"), { OUString("_Click"), NULL, ApproveType, static_cast<void*>(&listBoxList) } },
// changed ooo event
{ OUString("changed"), { OUString("_Change"), NULL, ApproveAll, NULL } },
@@ -243,7 +243,7 @@ static TranslatePropMap aTranslatePropMap_Impl[] =
// focusLost ooo event
{ OUString("focusLost"), { OUString("_LostFocus"), NULL, ApproveAll, NULL } },
- { OUString("focusLost"), { OUString("_Exit"), NULL, ApproveType, (void*)(&textCompList) } }, // support VBA TextBox_Exit event
+ { OUString("focusLost"), { OUString("_Exit"), NULL, ApproveType, static_cast<void*>(&textCompList) } }, // support VBA TextBox_Exit event
// adjustmentValueChanged ooo event
{ OUString("adjustmentValueChanged"), { OUString("_Scroll"), NULL, ApproveAll, NULL } },
@@ -256,7 +256,7 @@ static TranslatePropMap aTranslatePropMap_Impl[] =
{ OUString("keyReleased"), { OUString("_KeyUp"), ooKeyPressedToVBAKeyUpDown, ApproveAll, NULL } },
// mouseReleased ooo event
- { OUString("mouseReleased"), { OUString("_Click"), ooMouseEvtToVBAMouseEvt, ApproveType, (void*)(&fixedTextList) } },
+ { OUString("mouseReleased"), { OUString("_Click"), ooMouseEvtToVBAMouseEvt, ApproveType, static_cast<void*>(&fixedTextList) } },
{ OUString("mouseReleased"), { OUString("_MouseUp"), ooMouseEvtToVBAMouseEvt, ApproveAll, NULL } },
// mousePressed ooo event