summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs
diff options
context:
space:
mode:
authorRachit Gupta <rachitgupta1792@gmail.com>2014-08-02 19:04:56 +0530
committerDavid Tardon <dtardon@redhat.com>2014-08-03 07:30:20 +0000
commite2b0e7571a8b082a2cb532e34b9770060128452b (patch)
treed5ccbc8623703e262959758dd8c00b4bb222e088 /xmlsecurity/source/dialogs
parent7aa7047eb48e81bc0b32448ff0487c993fe9a4db (diff)
Converted RID_XMLSECTP_DETAILS to Widget Layout.
Change-Id: Ie284f5902879093f882a1f69b481df4a1a319a35 Reviewed-on: https://gerrit.libreoffice.org/10693 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'xmlsecurity/source/dialogs')
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx48
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.src145
-rw-r--r--xmlsecurity/source/dialogs/dialogs.hrc33
3 files changed, 99 insertions, 127 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 99177dc1c2c5..9ff204a9610a 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -224,44 +224,45 @@ inline Details_UserDatat::Details_UserDatat( const OUString& _rTxt, bool _bFixed
void CertificateViewerDetailsTP::Clear( void )
{
- maElementML.SetText( OUString() );
+ m_pValueDetails->SetText( OUString() );
sal_uLong i = 0;
- SvTreeListEntry* pEntry = maElementsLB.GetEntry( i );
+ SvTreeListEntry* pEntry = m_pElementsLB->GetEntry( i );
while( pEntry )
{
delete ( Details_UserDatat* ) pEntry->GetUserData();
++i;
- pEntry = maElementsLB.GetEntry( i );
+ pEntry = m_pElementsLB->GetEntry( i );
}
- maElementsLB.Clear();
+ m_pElementsLB->Clear();
}
void CertificateViewerDetailsTP::InsertElement( const OUString& _rField, const OUString& _rValue,
const OUString& _rDetails, bool _bFixedWidthFont )
{
- SvTreeListEntry* pEntry = maElementsLB.InsertEntry( _rField );
- maElementsLB.SetEntryText( _rValue, pEntry, 1 );
+ SvTreeListEntry* pEntry = m_pElementsLB->InsertEntry( _rField );
+ m_pElementsLB->SetEntryText( _rValue, pEntry, 1 );
pEntry->SetUserData( ( void* ) new Details_UserDatat( _rDetails, _bFixedWidthFont ) );
}
CertificateViewerDetailsTP::CertificateViewerDetailsTP( Window* _pParent, CertificateViewer* _pDlg )
- :CertificateViewerTP ( _pParent, XMLSEC_RES( RID_XMLSECTP_DETAILS ), _pDlg )
- ,m_aElementsLBContainer(this, XMLSEC_RES(LB_ELEMENTS))
- ,maElementsLB(m_aElementsLBContainer)
- ,maElementML ( this, XMLSEC_RES( ML_ELEMENT ) )
- ,maStdFont ( maElementML.GetControlFont() )
- ,maFixedWidthFont ( OutputDevice::GetDefaultFont( DEFAULTFONT_UI_FIXED, LANGUAGE_DONTKNOW, DEFAULTFONT_FLAGS_ONLYONE, this ) )
+ :CertificateViewerTP ( _pParent, "CertDetails", "xmlsec/ui/certdetails.ui", _pDlg )
+ ,m_aFixedWidthFont( OutputDevice::GetDefaultFont( DEFAULTFONT_UI_FIXED, LANGUAGE_DONTKNOW, DEFAULTFONT_FLAGS_ONLYONE, this ) )
{
- WinBits nStyle = maElementsLB.GetStyle();
+ get( m_pValueDetails, "valuedetails" );
+ get( m_pElementsLBContainer, "tablecontainer" );
+ m_pElementsLB = new SvSimpleTable( *m_pElementsLBContainer );
+
+ m_aStdFont = m_pValueDetails->GetControlFont();
+ WinBits nStyle = m_pElementsLB->GetStyle();
nStyle &= ~WB_HSCROLL;
- maElementsLB.SetStyle( nStyle );
+ m_pElementsLB->SetStyle( nStyle );
- maFixedWidthFont.SetHeight( maStdFont.GetHeight() );
+ m_aFixedWidthFont.SetHeight( m_aStdFont.GetHeight() );
static long nTabs[] = { 2, 0, 30*CS_LB_WIDTH/100 };
- maElementsLB.SetTabs( &nTabs[ 0 ] );
- maElementsLB.InsertHeaderEntry( XMLSEC_RES( STR_HEADERBAR ) );
+ m_pElementsLB->SetTabs( &nTabs[ 0 ] );
+ m_pElementsLB->InsertHeaderEntry( XMLSEC_RES( STR_HEADERBAR ) );
// fill list box
Reference< security::XCertificate > xCert = mpDlg->mxCert;
@@ -321,14 +322,13 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( Window* _pParent, Certif
aDetails = XmlSec::GetHexString( aSeq, pHexSep, nLineBreak );
InsertElement( XMLSEC_RES( STR_THUMBPRINT_MD5 ), aLBEntry, aDetails, true );
- FreeResource();
-
- maElementsLB.SetSelectHdl( LINK( this, CertificateViewerDetailsTP, ElementSelectHdl ) );
+ m_pElementsLB->SetSelectHdl( LINK( this, CertificateViewerDetailsTP, ElementSelectHdl ) );
}
CertificateViewerDetailsTP::~CertificateViewerDetailsTP()
{
Clear();
+ delete m_pElementsLB;
}
void CertificateViewerDetailsTP::ActivatePage()
@@ -337,7 +337,7 @@ void CertificateViewerDetailsTP::ActivatePage()
IMPL_LINK_NOARG(CertificateViewerDetailsTP, ElementSelectHdl)
{
- SvTreeListEntry* pEntry = maElementsLB.FirstSelected();
+ SvTreeListEntry* pEntry = m_pElementsLB->FirstSelected();
OUString aElementText;
bool bFixedWidthFont;
if( pEntry )
@@ -349,9 +349,9 @@ IMPL_LINK_NOARG(CertificateViewerDetailsTP, ElementSelectHdl)
else
bFixedWidthFont = false;
- maElementML.SetFont( bFixedWidthFont? maFixedWidthFont : maStdFont );
- maElementML.SetControlFont( bFixedWidthFont? maFixedWidthFont : maStdFont );
- maElementML.SetText( aElementText );
+ m_pValueDetails->SetFont( bFixedWidthFont? m_aFixedWidthFont : m_aStdFont );
+ m_pValueDetails->SetControlFont( bFixedWidthFont? m_aFixedWidthFont : m_aStdFont );
+ m_pValueDetails->SetText( aElementText );
return 0;
}
diff --git a/xmlsecurity/source/dialogs/certificateviewer.src b/xmlsecurity/source/dialogs/certificateviewer.src
index a7b35865d89c..957b141d6f38 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.src
+++ b/xmlsecurity/source/dialogs/certificateviewer.src
@@ -122,90 +122,69 @@ TabPage RID_XMLSECTP_GENERAL
};
};
-TabPage RID_XMLSECTP_DETAILS
+String STR_HEADERBAR
{
- HelpId = HID_XMLSEC_TP_DETAILS;
- Size = MAP_APPFONT( TP_WIDTH, TP_HEIGHT );
- OutputSize = TRUE;
- Hide = TRUE;
- SVLook = TRUE;
- Control LB_ELEMENTS
- {
- HelpId = HID_XMLSEC_CTRL_ELEMENTS;
- Pos = MAP_APPFONT( CV_COL_0, CV_ROW_0 );
- Size = MAP_APPFONT( CV_CONT_WIDTH, CV_ROW_1-CV_ROW_0 );
- SVLook = TRUE;
- Border = TRUE;
- };
- String STR_HEADERBAR
- {
- Text [ en-US ] = "Field\tValue";
- };
- MultiLineEdit ML_ELEMENT
- {
- HelpID = "xmlsecurity:MultiLineEdit:RID_XMLSECTP_DETAILS:ML_ELEMENT";
- Pos = MAP_APPFONT( CV_COL_0, CV_ROW_2 );
- Size = MAP_APPFONT( CV_CONT_WIDTH, CV_ROW_3-CV_ROW_2 );
- ReadOnly = TRUE;
- Border = TRUE;
- VSCROLL = TRUE;
- };
- String STR_VERSION
- {
- Text [ en-US ] = "Version";
- };
- String STR_SERIALNUM
- {
- Text [ en-US ] = "Serial Number";
- };
- String STR_SIGALGORITHM
- {
- Text [ en-US ] = "Signature Algorithm";
- };
- String STR_ISSUER
- {
- Text [ en-US ] = "Issuer";
- };
- String STR_ISSUER_ID
- {
- Text [ en-US ] = "Issuer Unique ID";
- };
- String STR_VALIDFROM
- {
- Text [ en-US ] = "Valid From";
- };
- String STR_VALIDTO
- {
- Text [ en-US ] = "Valid to";
- };
- String STR_SUBJECT
- {
- Text [ en-US ] = "Subject";
- };
- String STR_SUBJECT_ID
- {
- Text [ en-US ] = "Subject Unique ID";
- };
- String STR_SUBJECT_PUBKEY_ALGO
- {
- Text [ en-US ] = "Subject Algorithm";
- };
- String STR_SUBJECT_PUBKEY_VAL
- {
- Text [ en-US ] = "Public Key";
- };
- String STR_SIGNATURE_ALGO
- {
- Text [ en-US ] = "Signature Algorithm";
- };
- String STR_THUMBPRINT_SHA1
- {
- Text [ en-US ] = "Thumbprint SHA1";
- };
- String STR_THUMBPRINT_MD5
- {
- Text [ en-US ] = "Thumbprint MD5";
- };
+ Text [ en-US ] = "Field\tValue";
+};
+
+String STR_VERSION
+{
+ Text [ en-US ] = "Version";
+};
+
+String STR_SERIALNUM
+{
+ Text [ en-US ] = "Serial Number";
+};
+
+String STR_SIGALGORITHM
+{
+ Text [ en-US ] = "Signature Algorithm";
+};
+
+String STR_ISSUER
+{
+ Text [ en-US ] = "Issuer";
+};
+
+String STR_VALIDFROM
+{
+ Text [ en-US ] = "Valid From";
+};
+
+String STR_VALIDTO
+{
+ Text [ en-US ] = "Valid to";
+};
+
+String STR_SUBJECT
+{
+ Text [ en-US ] = "Subject";
+};
+
+String STR_SUBJECT_PUBKEY_ALGO
+{
+ Text [ en-US ] = "Subject Algorithm";
+};
+
+String STR_SUBJECT_PUBKEY_VAL
+{
+ Text [ en-US ] = "Public Key";
+};
+
+String STR_SIGNATURE_ALGO
+{
+ Text [ en-US ] = "Signature Algorithm";
+};
+
+String STR_THUMBPRINT_SHA1
+{
+ Text [ en-US ] = "Thumbprint SHA1";
+};
+
+String STR_THUMBPRINT_MD5
+{
+ Text [ en-US ] = "Thumbprint MD5";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/dialogs.hrc b/xmlsecurity/source/dialogs/dialogs.hrc
index 7e7476aa49a2..f07d52de8d44 100644
--- a/xmlsecurity/source/dialogs/dialogs.hrc
+++ b/xmlsecurity/source/dialogs/dialogs.hrc
@@ -28,7 +28,19 @@
#define FL_BOTTOM_SEP 50
#define BTN_HELP 53
-#define STR_HEADERBAR 56
+#define STR_HEADERBAR 256
+#define STR_VERSION 257
+#define STR_SERIALNUM 258
+#define STR_ISSUER 259
+#define STR_VALIDFROM 260
+#define STR_VALIDTO 261
+#define STR_SUBJECT 262
+#define STR_SUBJECT_PUBKEY_ALGO 263
+#define STR_SUBJECT_PUBKEY_VAL 264
+#define STR_SIGALGORITHM 265
+#define STR_SIGNATURE_ALGO 266
+#define STR_THUMBPRINT_SHA1 267
+#define STR_THUMBPRINT_MD5 268
// --------- general metrics ---------
#define DLGS_WIDTH 287
@@ -103,25 +115,6 @@
#define CW_ROW_9 (CW_ROW_8+RSC_SP_CTRL_Y+RSC_CD_FIXEDTEXT_HEIGHT)
#define CW_ROW_10 (CW_ROW_9+2)
-// --------- tab page Certificate viewer - Details ---------
-
-#define LB_ELEMENTS 1
-#define ML_ELEMENT 2
-
-#define STR_VERSION 1
-#define STR_SERIALNUM 2
-#define STR_SIGALGORITHM 3
-#define STR_ISSUER 4
-#define STR_ISSUER_ID 5
-#define STR_VALIDFROM 6
-#define STR_VALIDTO 7
-#define STR_SUBJECT 8
-#define STR_SUBJECT_ID 9
-#define STR_SUBJECT_PUBKEY_ALGO 10
-#define STR_SUBJECT_PUBKEY_VAL 11
-#define STR_SIGNATURE_ALGO 12
-#define STR_THUMBPRINT_SHA1 13
-#define STR_THUMBPRINT_MD5 14
// --------- tab page Certificate viewer - Certification Path ---------