summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-02-22 12:18:57 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-02-23 14:16:00 +0000
commitf827e119a34e7c1d1a31911f226f02dd64e05410 (patch)
treef342669101acc3caad3b790eccb7724a9ae9e772 /xmlsecurity
parentd132f85faddbbfc640d6d9cba2b8f62e2adfc207 (diff)
Reduce indentation
Change-Id: Ie4578e45205ebf206a752651901f488a7edd648d Reviewed-on: https://gerrit.libreoffice.org/34541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx66
1 files changed, 33 insertions, 33 deletions
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index f7ba620b7577..53ceb0d55de2 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -157,47 +157,47 @@ OUString CertificateChooser::UsageInClearText(int bits)
void CertificateChooser::ImplInitialize()
{
- if ( !mbInitialized )
+ if ( mbInitialized )
+ return;
+
+ try
{
- try
- {
- maCerts = mxSecurityEnvironment->getPersonalCertificates();
- }
- catch (security::NoPasswordException&)
- {
- }
+ maCerts = mxSecurityEnvironment->getPersonalCertificates();
+ }
+ catch (security::NoPasswordException&)
+ {
+ }
- uno::Reference< css::security::XSerialNumberAdapter> xSerialNumberAdapter =
- css::security::SerialNumberAdapter::create(mxCtx);
+ uno::Reference< css::security::XSerialNumberAdapter> xSerialNumberAdapter =
+ css::security::SerialNumberAdapter::create(mxCtx);
- sal_Int32 nCertificates = maCerts.getLength();
- for( sal_Int32 nCert = nCertificates; nCert; )
- {
- uno::Reference< security::XCertificate > xCert = maCerts[ --nCert ];
- // Check if we have a private key for this...
- long nCertificateCharacters = mxSecurityEnvironment->getCertificateCharacters(xCert);
-
- if (!(nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY))
- {
- ::comphelper::removeElementAt( maCerts, nCert );
- nCertificates = maCerts.getLength();
- }
- }
+ sal_Int32 nCertificates = maCerts.getLength();
+ for( sal_Int32 nCert = nCertificates; nCert; )
+ {
+ uno::Reference< security::XCertificate > xCert = maCerts[ --nCert ];
+ // Check if we have a private key for this...
+ long nCertificateCharacters = mxSecurityEnvironment->getCertificateCharacters(xCert);
- // fill list of certificates; the first entry will be selected
- for ( sal_Int32 nC = 0; nC < nCertificates; ++nC )
+ if (!(nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY))
{
- SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( XmlSec::GetContentPart( maCerts[ nC ]->getSubjectName() )
- + "\t" + XmlSec::GetContentPart( maCerts[ nC ]->getIssuerName() )
- + "\t" + UsageInClearText( maCerts[ nC ]->getCertificateUsage() )
- + "\t" + XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() ) );
- pEntry->SetUserData( reinterpret_cast<void*>(nC) ); // missuse user data as index
+ ::comphelper::removeElementAt( maCerts, nCert );
+ nCertificates = maCerts.getLength();
}
+ }
- // enable/disable buttons
- CertificateHighlightHdl( nullptr );
- mbInitialized = true;
+ // fill list of certificates; the first entry will be selected
+ for ( sal_Int32 nC = 0; nC < nCertificates; ++nC )
+ {
+ SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( XmlSec::GetContentPart( maCerts[ nC ]->getSubjectName() )
+ + "\t" + XmlSec::GetContentPart( maCerts[ nC ]->getIssuerName() )
+ + "\t" + UsageInClearText( maCerts[ nC ]->getCertificateUsage() )
+ + "\t" + XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() ) );
+ pEntry->SetUserData( reinterpret_cast<void*>(nC) ); // missuse user data as index
}
+
+ // enable/disable buttons
+ CertificateHighlightHdl( nullptr );
+ mbInitialized = true;
}