Kaydet (Commit) 13d4f7b8 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

Grid and separarate "valid from/to" for CertificateViewer

Change-Id: I32661d0ec57c9f855806a44349d20c8fe651f293
üst 555c988f
......@@ -81,7 +81,8 @@ private:
FixedText* m_pHintNotTrustedFI;
FixedText* m_pIssuedToFI;
FixedText* m_pIssuedByFI;
FixedText* m_pValidDateFI;
FixedText* m_pValidFromDateFI;
FixedText* m_pValidToDateFI;
FixedImage* m_pKeyImg;
FixedText* m_pHintCorrespPrivKeyFI;
public:
......
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment