summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-02 15:42:25 +0200
committerNoel Grandin <noel@peralex.com>2014-05-05 12:47:48 +0200
commit4f9b21248ffdf55cef9f3f9d1da76778ee000775 (patch)
treeb059d288339a68aa4c3901f1100e99b04d05a23d /xmlsecurity
parentb4107411900f5bb4c215e2d9db09fc2b2b82939b (diff)
simplify ternary conditions "xxx ? yyy : false"
Look for code like: xxx ? yyy : false; Which can be simplified to: xxx && yyy Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx4
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index d43e4c05881f..296ac47c06e2 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -107,7 +107,7 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif
sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(mpDlg->mxCert,
Sequence<Reference<css::security::XCertificate> >());
- bool bCertValid = certStatus == css::security::CertificateValidity::VALID ? true : false;
+ bool bCertValid = certStatus == css::security::CertificateValidity::VALID;
if ( !bCertValid )
{
@@ -419,7 +419,7 @@ void CertificateViewerCertPathTP::ActivatePage()
//Verify the certificate
sal_Int32 certStatus = mpDlg->mxSecurityEnvironment->verifyCertificate(rCert,
Sequence<Reference<css::security::XCertificate> >());
- bool bCertValid = certStatus == css::security::CertificateValidity::VALID ? true : false;
+ bool bCertValid = certStatus == css::security::CertificateValidity::VALID;
pParent = InsertCert( pParent, sName, rCert, bCertValid);
}
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 1e471d95cdb4..94a9ba8f0c23 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -348,7 +348,7 @@ short DigitalSignaturesDialog::Execute()
IMPL_LINK_NOARG(DigitalSignaturesDialog, SignatureHighlightHdl)
{
- bool bSel = m_pSignaturesLB->FirstSelected() ? true : false;
+ bool bSel = m_pSignaturesLB->FirstSelected();
m_pViewBtn->Enable( bSel );
if ( m_pAddBtn->IsEnabled() ) // not read only
m_pRemoveBtn->Enable( bSel );
@@ -612,7 +612,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
sal_Int32 certResult = xSecEnv->verifyCertificate(xCert,
Sequence<css::uno::Reference<css::security::XCertificate> >());
- bCertValid = certResult == css::security::CertificateValidity::VALID ? true : false;
+ bCertValid = certResult == css::security::CertificateValidity::VALID;
if ( bCertValid )
nValidCerts++;