diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-08-09 22:03:46 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-08-12 18:25:24 +0200 |
commit | 13d4f7b800a9f35717ed91f330b38513e0db4bc6 (patch) | |
tree | cc2570f8d16a79c9e9c9757e072d8662756e08fd /xmlsecurity/source/dialogs | |
parent | 555c988f3b896e16afc7bdd1bd98e48229599637 (diff) |
Grid and separarate "valid from/to" for CertificateViewer
Change-Id: I32661d0ec57c9f855806a44349d20c8fe651f293
Diffstat (limited to 'xmlsecurity/source/dialogs')
-rw-r--r-- | xmlsecurity/source/dialogs/certificateviewer.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index b704530e5ca3..02ce1d8c64ac 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -78,9 +78,10 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif { get( m_pCertImg, "certimage" ); get( m_pHintNotTrustedFI, "hintnotrust" ); - get( m_pIssuedToFI, "issuedto" ); - get( m_pIssuedByFI, "issuedby" ); - get( m_pValidDateFI, "validdate" ); + get( m_pIssuedToFI, "issued_to_value" ); + get( m_pIssuedByFI, "issued_by_value" ); + get( m_pValidFromDateFI, "valid_from_value" ); + get( m_pValidToDateFI, "valid_to_value" ); get( m_pKeyImg, "keyimage" ); get( m_pHintCorrespPrivKeyFI, "privatekey" ); @@ -107,12 +108,12 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif DateTime aDateTimeEnd( DateTime::EMPTY ); utl::typeConvert( xCert->getNotValidBefore(), aDateTimeStart ); utl::typeConvert( xCert->getNotValidAfter(), aDateTimeEnd ); - OUString sText = m_pValidDateFI->GetText(); - sText = sText.replaceFirst( "%SDATE%", - GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeStart.GetDate() ) ); - sText = sText.replaceFirst( "%EDATE%", - GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeEnd.GetDate() ) ); - m_pValidDateFI->SetText( sText ); + + OUString sValidFromDate = GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeStart.GetDate() ); + OUString sValidToDate = GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeEnd.GetDate() ); + + m_pValidFromDateFI->SetText(sValidFromDate); + m_pValidToDateFI->SetText(sValidToDate); // Check if we have the private key... bool bHasPrivateKey = false; @@ -120,7 +121,7 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif if ( _pDlg->mbCheckForPrivateKey ) { long nCertificateCharacters = _pDlg->mxSecurityEnvironment->getCertificateCharacters( xCert ); - bHasPrivateKey = ( nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY ) ? sal_True : sal_False; + bHasPrivateKey = ( nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY ); } if ( !bHasPrivateKey ) { |