summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:25:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:25:04 +0200
commitc278518819d2a84655d5ce52b16cf466ee33bcb1 (patch)
treed76e107eb1ad82257eadd29d45289231f74e5eba /extensions
parentffec518e56027fd3aa64af61bfb60811ea78b26d (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I4c3c6bfce836ddc35ba6b277e240f5ed7e652e57
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/framectr.cxx18
-rw-r--r--extensions/source/plugin/base/plmodel.cxx2
-rw-r--r--extensions/source/plugin/base/xplugin.cxx8
-rw-r--r--extensions/source/plugin/inc/plugin/plctrl.hxx2
-rw-r--r--extensions/source/plugin/inc/plugin/unx/plugcon.hxx2
-rw-r--r--extensions/source/plugin/unx/npnapi.cxx2
-rw-r--r--extensions/source/plugin/unx/npwrap.cxx4
-rw-r--r--extensions/source/propctrlr/browserline.cxx2
-rw-r--r--extensions/source/scanner/sane.cxx4
9 files changed, 22 insertions, 22 deletions
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 5e97cd464012..c3016be45a6c 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -253,7 +253,7 @@ void BibFrameController_Impl::dispose() throw (::com::sun::star::uno::RuntimeExc
{
bDisposing = true;
lang::EventObject aObject;
- aObject.Source = (XController*)this;
+ aObject.Source = static_cast<XController*>(this);
pImp->aLC.disposeAndClear(aObject);
m_xDatMan = 0;
pDatMan = 0;
@@ -280,7 +280,7 @@ uno::Reference< frame::XDispatch > BibFrameController_Impl::queryDispatch( cons
{
if (( pDatMan->HasActiveConnection() ) ||
( !pIter->second.bActiveConnection ))
- return (frame::XDispatch*) this;
+ return static_cast<frame::XDispatch*>(this);
}
}
@@ -454,7 +454,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_True;
aEvent.Requery = sal_False;
- aEvent.Source = (XDispatch *) this;
+ aEvent.Source = static_cast<XDispatch *>(this);
pObj->xListener->statusChanged( aEvent );
//break; because there are more than one
}
@@ -505,7 +505,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = !pDatMan->getParser()->getFilter().isEmpty();
aEvent.Requery = sal_False;
- aEvent.Source = (XDispatch *) this;
+ aEvent.Source = static_cast<XDispatch *>(this);
pObj->xListener->statusChanged( aEvent );
}
}
@@ -650,7 +650,7 @@ void BibFrameController_Impl::addStatusListener(
FeatureStateEvent aEvent;
aEvent.FeatureURL = aURL;
aEvent.Requery = sal_False;
- aEvent.Source = (XDispatch *) this;
+ aEvent.Source = static_cast<XDispatch *>(this);
if ( aURL.Path == "StatusBarVisible" )
{
aEvent.IsEnabled = sal_False;
@@ -812,7 +812,7 @@ void BibFrameController_Impl::RemoveFilter()
aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_False;
aEvent.Requery = sal_False;
- aEvent.Source = (XDispatch *) this;
+ aEvent.Source = static_cast<XDispatch *>(this);
pObj->xListener->statusChanged( aEvent );
bRemoveFilter=true;
}
@@ -822,7 +822,7 @@ void BibFrameController_Impl::RemoveFilter()
aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_True;
aEvent.Requery = sal_False;
- aEvent.Source = (XDispatch *) this;
+ aEvent.Source = static_cast<XDispatch *>(this);
aEvent.State <<= aQuery;
pObj->xListener->statusChanged( aEvent );
bQueryText=true;
@@ -872,7 +872,7 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope
aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_True;
aEvent.Requery = sal_False;
- aEvent.Source = (XDispatch *) this;
+ aEvent.Source = static_cast<XDispatch *>(this);
aEvent.FeatureDescriptor=pDatMan->getQueryField();
uno::Sequence<OUString> aStringSeq=pDatMan->getQueryFields();
@@ -887,7 +887,7 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope
aEvent.FeatureURL = pObj->aURL;
aEvent.IsEnabled = sal_True;
aEvent.Requery = sal_False;
- aEvent.Source = (XDispatch *) this;
+ aEvent.Source = static_cast<XDispatch *>(this);
BibConfig* pConfig = BibModul::GetConfig();
aEvent.State <<= pConfig->getQueryText();
pObj->xListener->statusChanged( aEvent );
diff --git a/extensions/source/plugin/base/plmodel.cxx b/extensions/source/plugin/base/plmodel.cxx
index 8ef83b590cd6..5c67281c7899 100644
--- a/extensions/source/plugin/base/plmodel.cxx
+++ b/extensions/source/plugin/base/plmodel.cxx
@@ -174,7 +174,7 @@ void PluginModel::dispose() throw(std::exception)
{
// send disposing events
::com::sun::star::lang::EventObject aEvt;
- aEvt.Source = (::cppu::OWeakObject*)this;
+ aEvt.Source = static_cast<cppu::OWeakObject*>(this);
::std::list< Reference< ::com::sun::star::lang::XEventListener > > aLocalListeners = m_aDisposeListeners;
for( ::std::list< Reference< ::com::sun::star::lang::XEventListener > >::iterator it = aLocalListeners.begin();
it != aLocalListeners.end(); ++it )
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index c7c062191e1d..e4d89d53b57a 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -90,7 +90,7 @@ void PluginDisposer::onShot()
{
if( m_pPlugin->isDisposable() )
{
- Application::PostUserEvent( LINK( m_pPlugin, XPlugin_Impl, secondLevelDispose ), (void*)m_pPlugin );
+ Application::PostUserEvent( LINK( m_pPlugin, XPlugin_Impl, secondLevelDispose ), static_cast<void*>(m_pPlugin) );
}
}
else
@@ -276,8 +276,8 @@ void XPlugin_Impl::freeArgs()
{
for( ; m_nArgs--; )
{
- free( (void*)m_pArgn[m_nArgs] );
- free( (void*)m_pArgv[m_nArgs] );
+ free( const_cast<char *>(m_pArgn[m_nArgs]) );
+ free( const_cast<char *>(m_pArgv[m_nArgs]) );
}
delete [] m_pArgn;
delete [] m_pArgv;
@@ -958,7 +958,7 @@ PluginStream::~PluginStream()
m_pPlugin->getPluginComm()->NPP_SetWindow( m_pPlugin );
}
}
- ::free( (void*)m_aNPStream.url );
+ ::free( const_cast<char *>(m_aNPStream.url) );
}
PluginInputStream::PluginInputStream( XPlugin_Impl* pPlugin,
diff --git a/extensions/source/plugin/inc/plugin/plctrl.hxx b/extensions/source/plugin/inc/plugin/plctrl.hxx
index 2a0db6ff7bda..c42dcc96cd5b 100644
--- a/extensions/source/plugin/inc/plugin/plctrl.hxx
+++ b/extensions/source/plugin/inc/plugin/plctrl.hxx
@@ -84,7 +84,7 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE
- { return (::com::sun::star::awt::XView*)this; }
+ { return static_cast<com::sun::star::awt::XView*>(this); }
virtual sal_Bool SAL_CALL isTransparent() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE
{ return sal_False; }
diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
index ebf51036e172..20db98077040 100644
--- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
@@ -168,7 +168,7 @@ public:
void CallWorkHandler()
{
LINK( this, PluginConnector, WorkOnNewMessageHdl ).
- Call( (Mediator*)this );
+ Call( static_cast<Mediator*>(this) );
}
};
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index c56f37b5c3f5..5d222af5368b 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -684,7 +684,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
if( aPluginFuncs.getvalue )
{
int bNeedsXEmbed = 0;
- NPError error = aPluginFuncs.getvalue( instance, NPPVpluginNeedsXEmbed, (void *)&bNeedsXEmbed );
+ NPError error = aPluginFuncs.getvalue( instance, NPPVpluginNeedsXEmbed, static_cast<void *>(&bNeedsXEmbed) );
if( error == NPERR_NO_ERROR )
pInst->bShouldUseXEmbed = (bNeedsXEmbed != 0);
SAL_INFO(
diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx
index 3c7d9d7145fe..c9d429606eb6 100644
--- a/extensions/source/plugin/unx/npwrap.cxx
+++ b/extensions/source/plugin/unx/npwrap.cxx
@@ -134,7 +134,7 @@ Widget createSubWidget( char* /*pPluginText*/, Widget shell, Window aParentWindo
shell,
XtNwidth, 200,
XtNheight, 200,
- (char *)NULL );
+ nullptr );
XtRealizeWidget( shell );
XtRealizeWidget( newWidget );
@@ -166,7 +166,7 @@ void* CreateNewShell( void** pShellReturn, Window aParentWindow )
XtNwidth, 200,
XtNheight, 200,
XtNoverrideRedirect, True,
- (char *)NULL );
+ nullptr );
*pShellReturn = newShell;
char pText[1024];
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index 207515f59b78..ba8b190b9c15 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -125,7 +125,7 @@ namespace pcr
if(m_pBrowseButton)
{
- pRefWindow=(vcl::Window*)m_pBrowseButton;
+ pRefWindow=static_cast<vcl::Window*>(m_pBrowseButton);
}
else if ( m_pControlWindow )
{
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index 164dac1950d3..1a7a1060963f 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -265,7 +265,7 @@ void Sane::ReloadOptions()
const SANE_Option_Descriptor* pZero = p_get_option_descriptor( maHandle, 0 );
SANE_Word pOptions[2];
SANE_Status nStatus = p_control_option( maHandle, 0, SANE_ACTION_GET_VALUE,
- (void*)pOptions, NULL );
+ static_cast<void*>(pOptions), NULL );
if( nStatus != SANE_STATUS_GOOD )
fprintf( stderr, "Error: sane driver returned %s while reading number of options !\n", p_strstatus( nStatus ) );
@@ -426,7 +426,7 @@ bool Sane::SetOptionValue( int n, const OUString& rSet )
if( ! maHandle || mppOptions[n]->type != SANE_TYPE_STRING )
return false;
OString aSet(OUStringToOString(rSet, osl_getThreadTextEncoding()));
- SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, (void*)aSet.getStr() );
+ SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, const_cast<char *>(aSet.getStr()) );
if( nStatus != SANE_STATUS_GOOD )
return false;
return true;