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