loplugin: cstylecast

Change-Id: I37d7c3e59f1debbee8d92e76f4d08fff773000b3
This commit is contained in:
Noel Grandin 2014-10-02 15:36:13 +02:00
parent 0745982dc5
commit addf55184a
4 changed files with 7 additions and 7 deletions

View File

@ -43,7 +43,7 @@ sal_uInt16 CertificateChooser::GetSelectedEntryPos( void ) const
SvTreeListEntry* pSel = m_pCertLB->FirstSelected(); SvTreeListEntry* pSel = m_pCertLB->FirstSelected();
if( pSel ) if( pSel )
nSel = (sal_uInt16) ( sal_uIntPtr ) pSel->GetUserData(); nSel = (sal_uInt16) reinterpret_cast<sal_uIntPtr>( pSel->GetUserData() );
return (sal_uInt16) nSel; return (sal_uInt16) nSel;
} }
@ -173,7 +173,7 @@ void CertificateChooser::ImplInitialize()
SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( XmlSec::GetContentPart( maCerts[ nC ]->getSubjectName() ) SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( XmlSec::GetContentPart( maCerts[ nC ]->getSubjectName() )
+ "\t" + XmlSec::GetContentPart( maCerts[ nC ]->getIssuerName() ) + "\t" + XmlSec::GetContentPart( maCerts[ nC ]->getIssuerName() )
+ "\t" + XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() ) ); + "\t" + XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() ) );
pEntry->SetUserData( ( void* )(sal_IntPtr)nC ); // missuse user data as index pEntry->SetUserData( reinterpret_cast<void*>(nC) ); // missuse user data as index
} }
// enable/disable buttons // enable/disable buttons

View File

@ -513,7 +513,7 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, RemoveButtonHdl)
{ {
try try
{ {
sal_uInt16 nSelected = (sal_uInt16) (sal_uIntPtr) m_pSignaturesLB->FirstSelected()->GetUserData(); sal_uInt16 nSelected = (sal_uInt16) reinterpret_cast<sal_uIntPtr>( m_pSignaturesLB->FirstSelected()->GetUserData() );
maCurrentSignatureInformations.erase( maCurrentSignatureInformations.begin()+nSelected ); maCurrentSignatureInformations.erase( maCurrentSignatureInformations.begin()+nSelected );
// Export all other signatures... // Export all other signatures...
@ -671,7 +671,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
m_pSignaturesLB->SetEntryText( aSubject, pEntry, 1 ); m_pSignaturesLB->SetEntryText( aSubject, pEntry, 1 );
m_pSignaturesLB->SetEntryText( aIssuer, pEntry, 2 ); m_pSignaturesLB->SetEntryText( aIssuer, pEntry, 2 );
m_pSignaturesLB->SetEntryText( aDateTimeStr, pEntry, 3 ); m_pSignaturesLB->SetEntryText( aDateTimeStr, pEntry, 3 );
pEntry->SetUserData( ( void* ) n ); // missuse user data as index pEntry->SetUserData( reinterpret_cast<void*>(n) ); // missuse user data as index
} }
} }
@ -726,7 +726,7 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails()
{ {
if( m_pSignaturesLB->FirstSelected() ) if( m_pSignaturesLB->FirstSelected() )
{ {
sal_uInt16 nSelected = (sal_uInt16) (sal_uIntPtr) m_pSignaturesLB->FirstSelected()->GetUserData(); sal_uInt16 nSelected = (sal_uInt16) reinterpret_cast<sal_uIntPtr>( m_pSignaturesLB->FirstSelected()->GetUserData() );
const SignatureInformation& rInfo = maCurrentSignatureInformations[ nSelected ]; const SignatureInformation& rInfo = maCurrentSignatureInformations[ nSelected ];
css::uno::Reference<css::xml::crypto::XSecurityEnvironment > xSecEnv = css::uno::Reference<css::xml::crypto::XSecurityEnvironment > xSecEnv =
maSignatureHelper.GetSecurityEnvironment(); maSignatureHelper.GetSecurityEnvironment();

View File

@ -315,7 +315,7 @@ void MacroSecurityTrustedSourcesTP::FillCertLB( void )
SvTreeListEntry* pLBEntry = m_pTrustCertLB->InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) ); SvTreeListEntry* pLBEntry = m_pTrustCertLB->InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
m_pTrustCertLB->SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 ); m_pTrustCertLB->SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
m_pTrustCertLB->SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 ); m_pTrustCertLB->SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
pLBEntry->SetUserData( ( void* ) (sal_IntPtr)nEntry ); // missuse user data as index pLBEntry->SetUserData( reinterpret_cast<void*>(nEntry) ); // missuse user data as index
} }
} }
} }

View File

@ -725,7 +725,7 @@ cssu::Reference< cssxw::XXMLElementWrapper > SAL_CALL XMLDocumentWrapper_XmlSecI
throw (cssu::RuntimeException, std::exception) throw (cssu::RuntimeException, std::exception)
{ {
XMLElementWrapper_XmlSecImpl* pElement = new XMLElementWrapper_XmlSecImpl(m_pCurrentElement); XMLElementWrapper_XmlSecImpl* pElement = new XMLElementWrapper_XmlSecImpl(m_pCurrentElement);
return (cssu::Reference< cssxw::XXMLElementWrapper >)pElement; return cssu::Reference< cssxw::XXMLElementWrapper >(pElement);
} }
void SAL_CALL XMLDocumentWrapper_XmlSecImpl::setCurrentElement( const cssu::Reference< cssxw::XXMLElementWrapper >& element ) void SAL_CALL XMLDocumentWrapper_XmlSecImpl::setCurrentElement( const cssu::Reference< cssxw::XXMLElementWrapper >& element )