Kaydet (Commit) 51a705c4 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clean up C-style casts from pointers to void

Change-Id: I112f4df678d9f3e70df7782443c860f930909e33
üst b5125224
...@@ -158,7 +158,7 @@ void CertificateViewerDetailsTP::Clear( void ) ...@@ -158,7 +158,7 @@ void CertificateViewerDetailsTP::Clear( void )
SvTreeListEntry* pEntry = m_pElementsLB->GetEntry( i ); SvTreeListEntry* pEntry = m_pElementsLB->GetEntry( i );
while( pEntry ) while( pEntry )
{ {
delete ( Details_UserDatat* ) pEntry->GetUserData(); delete static_cast<Details_UserDatat*>(pEntry->GetUserData());
++i; ++i;
pEntry = m_pElementsLB->GetEntry( i ); pEntry = m_pElementsLB->GetEntry( i );
} }
...@@ -271,7 +271,7 @@ IMPL_LINK_NOARG(CertificateViewerDetailsTP, ElementSelectHdl) ...@@ -271,7 +271,7 @@ IMPL_LINK_NOARG(CertificateViewerDetailsTP, ElementSelectHdl)
bool bFixedWidthFont; bool bFixedWidthFont;
if( pEntry ) if( pEntry )
{ {
const Details_UserDatat* p = ( Details_UserDatat* ) pEntry->GetUserData(); const Details_UserDatat* p = static_cast<Details_UserDatat*>(pEntry->GetUserData());
aElementText = p->maTxt; aElementText = p->maTxt;
bFixedWidthFont = p->mbFixedWidthFont; bFixedWidthFont = p->mbFixedWidthFont;
} }
...@@ -370,7 +370,7 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl) ...@@ -370,7 +370,7 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl)
SvTreeListEntry* pEntry = mpCertPathLB->FirstSelected(); SvTreeListEntry* pEntry = mpCertPathLB->FirstSelected();
if( pEntry ) if( pEntry )
{ {
CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, ((CertPath_UserData*)pEntry->GetUserData())->mxCert, false ); CertificateViewer aViewer( this, mpDlg->mxSecurityEnvironment, static_cast<CertPath_UserData*>(pEntry->GetUserData())->mxCert, false );
aViewer.Execute(); aViewer.Execute();
} }
...@@ -383,7 +383,7 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, CertSelectHdl) ...@@ -383,7 +383,7 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, CertSelectHdl)
SvTreeListEntry* pEntry = mpCertPathLB->FirstSelected(); SvTreeListEntry* pEntry = mpCertPathLB->FirstSelected();
if( pEntry ) if( pEntry )
{ {
CertPath_UserData* pData = (CertPath_UserData*) pEntry->GetUserData(); CertPath_UserData* pData = static_cast<CertPath_UserData*>(pEntry->GetUserData());
if ( pData ) if ( pData )
sStatus = pData->mbValid ? msCertOK : msCertNotValidated; sStatus = pData->mbValid ? msCertOK : msCertNotValidated;
} }
...@@ -400,7 +400,7 @@ void CertificateViewerCertPathTP::Clear( void ) ...@@ -400,7 +400,7 @@ void CertificateViewerCertPathTP::Clear( void )
SvTreeListEntry* pEntry = mpCertPathLB->GetEntry( i ); SvTreeListEntry* pEntry = mpCertPathLB->GetEntry( i );
while( pEntry ) while( pEntry )
{ {
delete ( CertPath_UserData* ) pEntry->GetUserData(); delete static_cast<CertPath_UserData*>(pEntry->GetUserData());
++i; ++i;
pEntry = mpCertPathLB->GetEntry( i ); pEntry = mpCertPathLB->GetEntry( i );
} }
......
...@@ -97,7 +97,7 @@ char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ ) ...@@ -97,7 +97,7 @@ char* GetPasswordFunction( PK11SlotInfo* pSlot, PRBool bRetry, void* /*arg*/ )
pPasswordRequest->getPassword(), pPasswordRequest->getPassword(),
osl_getThreadTextEncoding())); osl_getThreadTextEncoding()));
sal_Int32 nLen = aPassword.getLength(); sal_Int32 nLen = aPassword.getLength();
char* pPassword = (char*) PORT_Alloc( nLen+1 ) ; char* pPassword = static_cast<char*>(PORT_Alloc( nLen+1 ) );
pPassword[nLen] = 0; pPassword[nLen] = 0;
memcpy( pPassword, aPassword.getStr(), nLen ); memcpy( pPassword, aPassword.getStr(), nLen );
return pPassword; return pPassword;
......
...@@ -67,7 +67,7 @@ const xmlChar** attrlist_to_nxmlstr( const cssu::Sequence< cssxcsax::XMLAttribut ...@@ -67,7 +67,7 @@ const xmlChar** attrlist_to_nxmlstr( const cssu::Sequence< cssxcsax::XMLAttribut
if( nLength != 0 ) if( nLength != 0 )
{ {
attrs = ( const xmlChar** )xmlMalloc( ( nLength * 2 + 2 ) * sizeof( xmlChar* ) ) ; attrs = static_cast<const xmlChar**>(xmlMalloc( ( nLength * 2 + 2 ) * sizeof( xmlChar* ) ));
} }
else else
{ {
......
...@@ -116,7 +116,7 @@ int xmlStreamRead( void* context, char* buffer, int len ) ...@@ -116,7 +116,7 @@ int xmlStreamRead( void* context, char* buffer, int len )
if( ( enableXmlStreamIO & XMLSTREAMIO_INITIALIZED ) && if( ( enableXmlStreamIO & XMLSTREAMIO_INITIALIZED ) &&
( enableXmlStreamIO & XMLSTREAMIO_REGISTERED ) ) { ( enableXmlStreamIO & XMLSTREAMIO_REGISTERED ) ) {
if( context != NULL ) { if( context != NULL ) {
xInputStream = ( com::sun::star::io::XInputStream* )context ; xInputStream = static_cast<com::sun::star::io::XInputStream*>(context);
if( !xInputStream.is() ) if( !xInputStream.is() )
return 0 ; return 0 ;
...@@ -137,7 +137,7 @@ int xmlStreamClose( void * context ) ...@@ -137,7 +137,7 @@ int xmlStreamClose( void * context )
( enableXmlStreamIO & XMLSTREAMIO_REGISTERED ) ) { ( enableXmlStreamIO & XMLSTREAMIO_REGISTERED ) ) {
if( context != NULL ) { if( context != NULL ) {
::com::sun::star::io::XInputStream* pInputStream ; ::com::sun::star::io::XInputStream* pInputStream ;
pInputStream = ( ::com::sun::star::io::XInputStream* )context ; pInputStream = static_cast<css::io::XInputStream*>(context);
pInputStream->release() ; pInputStream->release() ;
} }
} }
......
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