Kaydet (Commit) 772e231a authored tarafından Caolán McNamara's avatar Caolán McNamara

split out trust page and adapt code

Change-Id: I79067df7174f5ae9bff51d997128cb033477aa6f
üst ebe10cdf
......@@ -12,6 +12,7 @@ $(eval $(call gb_UI_UI,xmlsec))
$(eval $(call gb_UI_add_uifiles,xmlsec,\
xmlsecurity/uiconfig/ui/digitalsignaturesdialog \
xmlsecurity/uiconfig/ui/securitylevelpage \
xmlsecurity/uiconfig/ui/securitytrustpage \
xmlsecurity/uiconfig/ui/selectcertificatedialog \
xmlsecurity/uiconfig/ui/macrosecuritydialog \
))
......
......@@ -124,19 +124,15 @@ public:
class MacroSecurityTrustedSourcesTP : public MacroSecurityTP
{
private:
FixedLine maTrustCertFL;
ReadOnlyImage maTrustCertROFI;
SvxSimpleTableContainer m_aTrustCertLBContainer;
SvxSimpleTable maTrustCertLB;
PushButton maAddCertPB;
PushButton maViewCertPB;
PushButton maRemoveCertPB;
FixedLine maTrustFileLocFL;
ReadOnlyImage maTrustFileROFI;
FixedInfo maTrustFileLocFI;
ListBox maTrustFileLocLB;
PushButton maAddLocPB;
PushButton maRemoveLocPB;
FixedImage* m_pTrustCertROFI;
SvxSimpleTable* m_pTrustCertLB;
PushButton* m_pAddCertPB;
PushButton* m_pViewCertPB;
PushButton* m_pRemoveCertPB;
FixedImage* m_pTrustFileROFI;
ListBox* m_pTrustFileLocLB;
PushButton* m_pAddLocPB;
PushButton* m_pRemoveLocPB;
cssu::Sequence< SvtSecurityOptions::Certificate > maTrustedAuthors;
......@@ -154,7 +150,8 @@ private:
void ImplCheckButtons();
public:
MacroSecurityTrustedSourcesTP( Window* pParent, MacroSecurity* _pDlg );
MacroSecurityTrustedSourcesTP(Window* pParent, MacroSecurity* _pDlg);
~MacroSecurityTrustedSourcesTP();
virtual void ActivatePage();
virtual void ClosePage( void );
......
......@@ -175,43 +175,6 @@
#define MS_COL_G (MS_COL_F-RSC_SP_CTRL_X)
#define MS_COL_H (MS_COL_G-RSC_CD_PUSHBUTTON_WIDTH)
// --------- tab page trusted sources ---------
#define FL_TRUSTCERT 1
#define LB_TRUSTCERT 2
#define PB_ADD_TRUSTCERT 3
#define PB_VIEW_TRUSTCERT 4
#define PB_REMOVE_TRUSTCERT 5
#define FL_TRUSTFILELOC 6
#define FI_TRUSTFILELOC 7
#define LB_TRUSTFILELOC 8
#define FL_ADD_TRUSTFILELOC 9
#define FL_REMOVE_TRUSTFILELOC 10
#define FI_TRUSTCERT_RO 11
#define FI_TRUSTFILE_RO 12
#define TS_COL_0 RSC_SP_TBPG_INNERBORDER_LEFT
#define TS_COL_1 (TS_COL_0+RSC_SP_FLGR_SPACE_X)
#define TS_COL_8 (TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT)
#define TS_COL_7 (TS_COL_8-RSC_SP_FLGR_SPACE_X)
#define TS_COL_6 (TS_COL_7-RSC_CD_PUSHBUTTON_WIDTH)
#define TS_COL_5 (TS_COL_6-RSC_SP_CTRL_GROUP_X)
#define TS_COL_4 (TS_COL_5-RSC_CD_PUSHBUTTON_WIDTH)
#define TS_COL_3 (TS_COL_4-RSC_SP_CTRL_GROUP_X)
#define TS_COL_2 (TS_COL_3-RSC_CD_PUSHBUTTON_WIDTH)
#define RSC_CD_TABLISTBOX_HEIGHT 6*RSC_BS_CHARHEIGHT
#define TS_ROW_0 RSC_SP_TBPG_INNERBORDER_TOP
#define TS_ROW_1 (TS_ROW_0+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
#define TS_ROW_2 (TS_ROW_1+RSC_CD_TABLISTBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
#define TS_ROW_3 (TS_ROW_2+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_FLGR_SPACE_Y)
#define TS_ROW_4 (TS_ROW_3+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
#define TS_ROW_5 (TS_ROW_4+3*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_FLGR_SPACE_Y)
#define TS_ROW_8 (TP_HEIGHT-RSC_SP_TBPG_INNERBORDER_BOTTOM)
#define TS_ROW_7 (TS_ROW_8-RSC_CD_PUSHBUTTON_HEIGHT)
#define TS_ROW_6 (TS_ROW_7-RSC_SP_FLGR_SPACE_Y)
// --------- signed macro warning ---------
#define FI_DOCNAME 1
......
......@@ -206,8 +206,8 @@ DigitalSignaturesDialog::DigitalSignaturesDialog(
m_pSignaturesLB = new SvxSimpleTable(*pSignatures);
// #i48253# the tablistbox needs its own unique id
m_pSignaturesLB->Window::SetUniqueId( HID_XMLSEC_TREE_SIGNATURESDLG );
static long nTabs[] = { 4, 0, 6*nControlWidth/100, 36*nControlWidth/100, 74*nControlWidth/100 };
m_pSignaturesLB->SetTabs( &nTabs[ 0 ] );
static long aTabs[] = { 4, 0, 6*nControlWidth/100, 36*nControlWidth/100, 74*nControlWidth/100 };
m_pSignaturesLB->SetTabs(aTabs);
OUStringBuffer sHeader;
sHeader.append("\t").append(get<FixedText>("signed")->GetText())
......
......@@ -24,7 +24,6 @@
// Help-Ids --------------------------------------------------------------
#define HID_XMLSEC_TP_MACROSEC "XMLSECURITY_HID_XMLSEC_TP_MACROSEC"
#define HID_XMLSEC_TP_TRUSTSOURCES "XMLSECURITY_HID_XMLSEC_TP_TRUSTSOURCES"
#define HID_XMLSEC_DLG_CERTVIEWER "XMLSECURITY_HID_XMLSEC_DLG_CERTVIEWER"
#define HID_XMLSEC_TP_GENERAL "XMLSECURITY_HID_XMLSEC_TP_GENERAL"
#define HID_XMLSEC_TP_DETAILS "XMLSECURITY_HID_XMLSEC_TP_DETAILS"
......
......@@ -72,104 +72,11 @@ TabDialog RID_XMLSECTP_MACROSEC
};
};
TabPage RID_XMLSECTP_TRUSTSOURCES
{
HelpId = HID_XMLSEC_TP_TRUSTSOURCES;
Size = MAP_APPFONT( TP_WIDTH, TP_HEIGHT );
OutputSize = TRUE;
Hide = TRUE;
SVLook = TRUE;
FixedLine FL_TRUSTCERT
{
Pos = MAP_APPFONT( TS_COL_0, TS_ROW_0 );
Size = MAP_APPFONT( TS_COL_8-TS_COL_0, RSC_CD_FIXEDLINE_HEIGHT );
Text [ en-US ] = "Trusted certificates";
};
FixedImage FI_TRUSTCERT_RO
{
Pos = MAP_APPFONT( TS_COL_1 - 7, TS_ROW_1 );
Size = MAP_APPFONT( 6, 6 );
};
Control LB_TRUSTCERT
{
HelpId = HID_XMLSEC_CTRL_TRUSTSOURCES;
Pos = MAP_APPFONT( TS_COL_1, TS_ROW_1 );
Size = MAP_APPFONT( TS_COL_7-TS_COL_1, RSC_CD_TABLISTBOX_HEIGHT );
SVLook = TRUE;
Border = TRUE;
};
String STR_HEADERBAR
{
Text [ en-US ] = "Issued to\tIssued by\tExpiration date";
};
PushButton PB_ADD_TRUSTCERT
{
HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:PB_ADD_TRUSTCERT";
Pos = MAP_APPFONT( TS_COL_2, TS_ROW_2 );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "Add...";
};
PushButton PB_VIEW_TRUSTCERT
{
HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:PB_VIEW_TRUSTCERT";
Pos = MAP_APPFONT( TS_COL_4, TS_ROW_2 );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "View...";
};
PushButton PB_REMOVE_TRUSTCERT
{
HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:PB_REMOVE_TRUSTCERT";
Pos = MAP_APPFONT( TS_COL_6, TS_ROW_2 );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "Remove";
};
FixedLine FL_TRUSTFILELOC
{
Pos = MAP_APPFONT( TS_COL_0, TS_ROW_3 );
Size = MAP_APPFONT( TS_COL_8-TS_COL_0, RSC_CD_FIXEDLINE_HEIGHT );
Text [ en-US ] = "Trusted file locations";
};
FixedText FI_TRUSTFILELOC
{
Pos = MAP_APPFONT( TS_COL_1, TS_ROW_4 );
Size = MAP_APPFONT( TS_COL_7-TS_COL_1, 3*RSC_CD_FIXEDLINE_HEIGHT );
WordBreak = TRUE;
Text [ en-US ] = "Document macros are always executed if they have been opened from one of the following locations.";
};
FixedImage FI_TRUSTFILE_RO
{
Pos = MAP_APPFONT( TS_COL_1 - 7, TS_ROW_5 );
Size = MAP_APPFONT( 6, 6 );
};
ListBox LB_TRUSTFILELOC
{
HelpID = "xmlsecurity:ListBox:RID_XMLSECTP_TRUSTSOURCES:LB_TRUSTFILELOC";
Pos = MAP_APPFONT( TS_COL_1, TS_ROW_5 );
Size = MAP_APPFONT( TS_COL_7-TS_COL_1, TS_ROW_6-TS_ROW_5 );
SVLook = TRUE;
Border = TRUE;
VScroll = TRUE;
Sort = TRUE;
};
PushButton FL_ADD_TRUSTFILELOC
{
HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:FL_ADD_TRUSTFILELOC";
Pos = MAP_APPFONT( TS_COL_4, TS_ROW_7 );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "Add...";
};
PushButton FL_REMOVE_TRUSTFILELOC
{
HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_TRUSTSOURCES:FL_REMOVE_TRUSTFILELOC";
Pos = MAP_APPFONT( TS_COL_6, TS_ROW_7 );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "Remove";
};
};
String RID_XMLSECTP_READONLY_CONFIG_TIP
{
Text [ en-US ] = "This setting is protected by the Administrator";
};
Image RID_XMLSECTP_LOCK
{
ImageBitmap = Bitmap
......
This diff is collapsed.
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