summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs/macrosecurity.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-04-08 15:20:18 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-04-08 15:20:18 +0000
commit0e3ecceae2b4100b712298d2c9a8cd5e91d031f7 (patch)
tree9888cc6bee0417fbe5e737067ac43e7be44ee79e /xmlsecurity/source/dialogs/macrosecurity.cxx
parent11f595567334519f6eefb13a785193866e97c5e4 (diff)
INTEGRATION: CWS xmlsec11 (1.21.6); FILE MERGED
2005/04/04 10:25:11 mt 1.21.6.2: RESYNC: (1.21-1.22); FILE MERGED 2005/03/31 15:49:56 mt 1.21.6.1: #i45295# Raise macro security dialog even without security environment
Diffstat (limited to 'xmlsecurity/source/dialogs/macrosecurity.cxx')
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx28
1 files changed, 16 insertions, 12 deletions
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 64fcf47b4635..86a0cfc25b0d 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: macrosecurity.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: rt $ $Date: 2005-03-29 13:19:39 $
+ * last change: $Author: hr $ $Date: 2005-04-08 16:20:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -361,19 +361,23 @@ void MacroSecurityTrustedSourcesTP::FillCertLB( void )
{
maTrustCertLB.Clear();
- sal_uInt32 nCountEntries = maTrustedAuthors.getLength();
- for( sal_uInt32 nEntry = 0 ; nEntry < nCountEntries ; ++nEntry )
+ sal_uInt32 nEntries = maTrustedAuthors.getLength();
+
+ if ( nEntries && mpDlg->mxSecurityEnvironment.is() )
{
- cssu::Sequence< ::rtl::OUString >& rEntry = maTrustedAuthors[ nEntry ];
- uno::Reference< css::security::XCertificate > xCert;
+ for( sal_uInt32 nEntry = 0 ; nEntry < nEntries ; ++nEntry )
+ {
+ cssu::Sequence< ::rtl::OUString >& rEntry = maTrustedAuthors[ nEntry ];
+ uno::Reference< css::security::XCertificate > xCert;
- // create from RawData
- xCert = mpDlg->mxSecurityEnvironment->createCertificateFromAscii( rEntry[ 2 ] );
+ // create from RawData
+ xCert = mpDlg->mxSecurityEnvironment->createCertificateFromAscii( rEntry[ 2 ] );
- SvLBoxEntry* pLBEntry = maTrustCertLB.InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
- maTrustCertLB.SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
- maTrustCertLB.SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
- pLBEntry->SetUserData( ( void* ) sal_Int32( nEntry ) ); // missuse user data as index
+ SvLBoxEntry* pLBEntry = maTrustCertLB.InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
+ maTrustCertLB.SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
+ maTrustCertLB.SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
+ pLBEntry->SetUserData( ( void* ) sal_Int32( nEntry ) ); // missuse user data as index
+ }
}
}