Kaydet (Commit) 642f4e57 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:cstylecast: deal with remaining pointer casts

Change-Id: Idcaafa47f1891858d2ac4cdc536065cbc127b7c4
üst 689a4a69
...@@ -512,7 +512,7 @@ Sequence< OUString > DocumentDigitalSignatures::GetSupportedServiceNames() throw ...@@ -512,7 +512,7 @@ Sequence< OUString > DocumentDigitalSignatures::GetSupportedServiceNames() throw
Reference< XInterface > DocumentDigitalSignatures_CreateInstance( Reference< XInterface > DocumentDigitalSignatures_CreateInstance(
const Reference< XComponentContext >& rCtx) throw ( Exception ) const Reference< XComponentContext >& rCtx) throw ( Exception )
{ {
return (cppu::OWeakObject*) new DocumentDigitalSignatures( rCtx ); return static_cast<cppu::OWeakObject*>(new DocumentDigitalSignatures( rCtx ));
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -208,7 +208,7 @@ void CertificateViewerDetailsTP::InsertElement( const OUString& _rField, const O ...@@ -208,7 +208,7 @@ void CertificateViewerDetailsTP::InsertElement( const OUString& _rField, const O
{ {
SvTreeListEntry* pEntry = m_pElementsLB->InsertEntry( _rField ); SvTreeListEntry* pEntry = m_pElementsLB->InsertEntry( _rField );
m_pElementsLB->SetEntryText( _rValue, pEntry, 1 ); m_pElementsLB->SetEntryText( _rValue, pEntry, 1 );
pEntry->SetUserData( ( void* ) new Details_UserDatat( _rDetails, _bFixedWidthFont ) ); pEntry->SetUserData( static_cast<void*>(new Details_UserDatat( _rDetails, _bFixedWidthFont )) );
} }
CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, CertificateViewer* _pDlg ) CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, CertificateViewer* _pDlg )
...@@ -472,7 +472,7 @@ SvTreeListEntry* CertificateViewerCertPathTP::InsertCert( ...@@ -472,7 +472,7 @@ SvTreeListEntry* CertificateViewerCertPathTP::InsertCert(
{ {
Image aImage = bValid ? maCertImage : maCertNotValidatedImage; Image aImage = bValid ? maCertImage : maCertNotValidatedImage;
SvTreeListEntry* pEntry = mpCertPathLB->InsertEntry( _rName, aImage, aImage, _pParent ); SvTreeListEntry* pEntry = mpCertPathLB->InsertEntry( _rName, aImage, aImage, _pParent );
pEntry->SetUserData( ( void* ) new CertPath_UserData( rxCert, bValid ) ); pEntry->SetUserData( static_cast<void*>(new CertPath_UserData( rxCert, bValid )) );
return pEntry; return pEntry;
} }
......
...@@ -196,7 +196,7 @@ cssu::Sequence< OUString > SAL_CALL DecryptorImpl_getSupportedServiceNames( ) ...@@ -196,7 +196,7 @@ cssu::Sequence< OUString > SAL_CALL DecryptorImpl_getSupportedServiceNames( )
cssu::Reference< cssu::XInterface > SAL_CALL DecryptorImpl_createInstance( const cssu::Reference< cssl::XMultiServiceFactory >& xMSF) cssu::Reference< cssu::XInterface > SAL_CALL DecryptorImpl_createInstance( const cssu::Reference< cssl::XMultiServiceFactory >& xMSF)
throw( cssu::Exception ) throw( cssu::Exception )
{ {
return (cppu::OWeakObject*) new DecryptorImpl( comphelper::getComponentContext( xMSF ) ); return static_cast<cppu::OWeakObject*>(new DecryptorImpl( comphelper::getComponentContext( xMSF ) ));
} }
/* XServiceInfo */ /* XServiceInfo */
......
...@@ -162,7 +162,7 @@ void EncryptionEngine::clearUp( ) const ...@@ -162,7 +162,7 @@ void EncryptionEngine::clearUp( ) const
xReferenceResolvedBroadcaster->removeReferenceResolvedListener( xReferenceResolvedBroadcaster->removeReferenceResolvedListener(
m_nIdOfTemplateEC, m_nIdOfTemplateEC,
static_cast<const Reference < cssxc::sax::XReferenceResolvedListener > >((SecurityEngine *)this)); static_cast<const Reference < cssxc::sax::XReferenceResolvedListener > >(static_cast<SecurityEngine *>(const_cast<EncryptionEngine *>(this))));
m_xSAXEventKeeper->removeElementCollector(m_nIdOfTemplateEC); m_xSAXEventKeeper->removeElementCollector(m_nIdOfTemplateEC);
......
...@@ -231,7 +231,7 @@ Reference< XInterface > SAL_CALL EncryptorImpl_createInstance( ...@@ -231,7 +231,7 @@ Reference< XInterface > SAL_CALL EncryptorImpl_createInstance(
const Reference< cssl::XMultiServiceFactory >& xMSF) const Reference< cssl::XMultiServiceFactory >& xMSF)
throw( Exception ) throw( Exception )
{ {
return (cppu::OWeakObject*) new EncryptorImpl( comphelper::getComponentContext( xMSF ) ); return static_cast<cppu::OWeakObject*>(new EncryptorImpl( comphelper::getComponentContext( xMSF ) ));
} }
/* XServiceInfo */ /* XServiceInfo */
......
...@@ -1378,7 +1378,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL SAXEventKeeperImpl_createInstance( ...@@ -1378,7 +1378,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL SAXEventKeeperImpl_createInstance(
const cssu::Reference< cssl::XMultiServiceFactory > &) const cssu::Reference< cssl::XMultiServiceFactory > &)
throw( cssu::Exception ) throw( cssu::Exception )
{ {
return (cppu::OWeakObject*) new SAXEventKeeperImpl(); return static_cast<cppu::OWeakObject*>(new SAXEventKeeperImpl());
} }
/* XServiceInfo */ /* XServiceInfo */
......
...@@ -245,7 +245,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL SignatureCreatorImpl_createInstance ...@@ -245,7 +245,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL SignatureCreatorImpl_createInstance
const cssu::Reference< cssl::XMultiServiceFactory >& xMSF ) const cssu::Reference< cssl::XMultiServiceFactory >& xMSF )
throw( cssu::Exception ) throw( cssu::Exception )
{ {
return (cppu::OWeakObject*) new SignatureCreatorImpl( comphelper::getComponentContext( xMSF ) ); return static_cast<cppu::OWeakObject*>(new SignatureCreatorImpl( comphelper::getComponentContext( xMSF ) ));
} }
/* XServiceInfo */ /* XServiceInfo */
......
...@@ -176,7 +176,7 @@ void SignatureEngine::clearUp( ) const ...@@ -176,7 +176,7 @@ void SignatureEngine::clearUp( ) const
xReferenceResolvedBroadcaster( m_xSAXEventKeeper, cssu::UNO_QUERY ); xReferenceResolvedBroadcaster( m_xSAXEventKeeper, cssu::UNO_QUERY );
xReferenceResolvedBroadcaster->removeReferenceResolvedListener( xReferenceResolvedBroadcaster->removeReferenceResolvedListener(
m_nIdOfTemplateEC, m_nIdOfTemplateEC,
static_cast<const cssu::Reference < cssxc::sax::XReferenceResolvedListener > >((SecurityEngine *)this)); static_cast<const cssu::Reference < cssxc::sax::XReferenceResolvedListener > >(static_cast<SecurityEngine *>(const_cast<SignatureEngine *>(this))));
m_xSAXEventKeeper->removeElementCollector(m_nIdOfTemplateEC); m_xSAXEventKeeper->removeElementCollector(m_nIdOfTemplateEC);
...@@ -186,7 +186,7 @@ void SignatureEngine::clearUp( ) const ...@@ -186,7 +186,7 @@ void SignatureEngine::clearUp( ) const
{ {
xReferenceResolvedBroadcaster->removeReferenceResolvedListener( xReferenceResolvedBroadcaster->removeReferenceResolvedListener(
*ii, *ii,
static_cast<const cssu::Reference < cssxc::sax::XReferenceResolvedListener > >((SecurityEngine *)this)); static_cast<const cssu::Reference < cssxc::sax::XReferenceResolvedListener > >(static_cast<SecurityEngine *>(const_cast<SignatureEngine *>(this))));
m_xSAXEventKeeper->removeElementCollector(*ii); m_xSAXEventKeeper->removeElementCollector(*ii);
} }
......
...@@ -191,7 +191,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL SignatureVerifierImpl_createInstanc ...@@ -191,7 +191,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL SignatureVerifierImpl_createInstanc
const cssu::Reference< cssl::XMultiServiceFactory >& rSMgr) const cssu::Reference< cssl::XMultiServiceFactory >& rSMgr)
throw( cssu::Exception ) throw( cssu::Exception )
{ {
return (cppu::OWeakObject*) new SignatureVerifierImpl( comphelper::getComponentContext(rSMgr) ); return static_cast<cppu::OWeakObject*>(new SignatureVerifierImpl( comphelper::getComponentContext(rSMgr) ));
} }
/* XServiceInfo */ /* XServiceInfo */
......
...@@ -329,7 +329,7 @@ IMPL_LINK( XMLSignatureHelper, SignatureVerifyResultListener, XMLSignatureVerify ...@@ -329,7 +329,7 @@ IMPL_LINK( XMLSignatureHelper, SignatureVerifyResultListener, XMLSignatureVerify
IMPL_LINK( XMLSignatureHelper, StartVerifySignatureElement, const uno::Reference< com::sun::star::xml::sax::XAttributeList >*, pAttrs ) IMPL_LINK( XMLSignatureHelper, StartVerifySignatureElement, const uno::Reference< com::sun::star::xml::sax::XAttributeList >*, pAttrs )
{ {
if ( !maStartVerifySignatureHdl.IsSet() || maStartVerifySignatureHdl.Call( (void*)pAttrs ) ) if ( !maStartVerifySignatureHdl.IsSet() || maStartVerifySignatureHdl.Call( const_cast<css::uno::Reference<css::xml::sax::XAttributeList> *>(pAttrs) ) )
{ {
sal_Int32 nSignatureId = mpXSecController->getNewSecurityId(); sal_Int32 nSignatureId = mpXSecController->getNewSecurityId();
mpXSecController->addSignature( nSignatureId ); mpXSecController->addSignature( nSignatureId );
......
...@@ -87,7 +87,7 @@ void SAL_CALL ImplXMLSignatureListener::startElement( const OUString& aName, con ...@@ -87,7 +87,7 @@ void SAL_CALL ImplXMLSignatureListener::startElement( const OUString& aName, con
{ {
if ( aName == "Signature" ) if ( aName == "Signature" )
{ {
maStartVerifySignatureElementListener.Call( (void*)&xAttribs ); maStartVerifySignatureElementListener.Call( const_cast<css::uno::Reference<css::xml::sax::XAttributeList> *>(&xAttribs) );
} }
if (m_xNextHandler.is()) if (m_xNextHandler.is())
......
...@@ -481,7 +481,7 @@ cssu::Sequence< OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames( ) ...@@ -481,7 +481,7 @@ cssu::Sequence< OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames( )
cssu::Reference< cssu::XInterface > SAL_CALL ONSSInitializer_createInstance( const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr) cssu::Reference< cssu::XInterface > SAL_CALL ONSSInitializer_createInstance( const cssu::Reference< cssl::XMultiServiceFactory > & rSMgr)
throw( cssu::Exception ) throw( cssu::Exception )
{ {
return (cppu::OWeakObject*) new ONSSInitializer( comphelper::getComponentContext(rSMgr) ); return static_cast<cppu::OWeakObject*>(new ONSSInitializer( comphelper::getComponentContext(rSMgr) ));
} }
/* XServiceInfo */ /* XServiceInfo */
......
...@@ -445,7 +445,7 @@ Reference< XCertificate > SecurityEnvironment_NssImpl :: getCertificate( const O ...@@ -445,7 +445,7 @@ Reference< XCertificate > SecurityEnvironment_NssImpl :: getCertificate( const O
return NULL; // no need for exception cf. i40394 return NULL; // no need for exception cf. i40394
} }
derIssuer = SEC_ASN1EncodeItem( arena, NULL, ( void* )nmIssuer, SEC_ASN1_GET( CERT_NameTemplate ) ) ; derIssuer = SEC_ASN1EncodeItem( arena, NULL, static_cast<void*>(nmIssuer), SEC_ASN1_GET( CERT_NameTemplate ) ) ;
if( derIssuer == NULL ) { if( derIssuer == NULL ) {
PL_strfree( chIssuer ) ; PL_strfree( chIssuer ) ;
CERT_DestroyName( nmIssuer ) ; CERT_DestroyName( nmIssuer ) ;
......
...@@ -130,7 +130,7 @@ uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceName ...@@ -130,7 +130,7 @@ uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceName
uno::Reference< uno::XInterface > SAL_CALL SEInitializer_NssImpl_createInstance( const uno::Reference< lang::XMultiServiceFactory > & rxMSF) uno::Reference< uno::XInterface > SAL_CALL SEInitializer_NssImpl_createInstance( const uno::Reference< lang::XMultiServiceFactory > & rxMSF)
throw( uno::Exception ) throw( uno::Exception )
{ {
return (cppu::OWeakObject*) new SEInitializer_NssImpl(comphelper::getComponentContext(rxMSF)); return static_cast<cppu::OWeakObject*>(new SEInitializer_NssImpl(comphelper::getComponentContext(rxMSF)));
} }
/* XServiceInfo */ /* XServiceInfo */
......
...@@ -285,7 +285,7 @@ void SAXHelper::startElement( ...@@ -285,7 +285,7 @@ void SAXHelper::startElement(
attrs[i] = NULL ; attrs[i] = NULL ;
} }
xmlFree( ( void* ) attrs ) ; xmlFree( static_cast<void*>(attrs) ) ;
attrs = NULL ; attrs = NULL ;
} }
} }
......
...@@ -1074,7 +1074,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL XMLDocumentWrapper_XmlSecImpl_creat ...@@ -1074,7 +1074,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL XMLDocumentWrapper_XmlSecImpl_creat
const cssu::Reference< cssu::XComponentContext > &) const cssu::Reference< cssu::XComponentContext > &)
throw( cssu::Exception ) throw( cssu::Exception )
{ {
return (cppu::OWeakObject*) new XMLDocumentWrapper_XmlSecImpl( ); return static_cast<cppu::OWeakObject*>(new XMLDocumentWrapper_XmlSecImpl( ));
} }
/* XServiceInfo */ /* XServiceInfo */
......
...@@ -91,7 +91,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL ...@@ -91,7 +91,7 @@ cssu::Reference< cssu::XInterface > SAL_CALL
const cssu::Reference< cssu::XComponentContext > &) const cssu::Reference< cssu::XComponentContext > &)
throw( cssu::Exception ) throw( cssu::Exception )
{ {
return (cppu::OWeakObject*) new XMLElementWrapper_XmlSecImpl(NULL); return static_cast<cppu::OWeakObject*>(new XMLElementWrapper_XmlSecImpl(NULL));
} }
/* XServiceInfo */ /* XServiceInfo */
......
...@@ -98,7 +98,7 @@ void* xmlStreamOpen( const char* uri ) ...@@ -98,7 +98,7 @@ void* xmlStreamOpen( const char* uri )
::com::sun::star::io::XInputStream* pInputStream ; ::com::sun::star::io::XInputStream* pInputStream ;
pInputStream = xInputStream.get() ; pInputStream = xInputStream.get() ;
pInputStream->acquire() ; pInputStream->acquire() ;
return ( void* )pInputStream ; return static_cast<void*>(pInputStream) ;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment