summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-02-13 23:43:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-02-14 09:51:35 +0000
commit2848277180b9cb6dde639001a0f9612af5bd5992 (patch)
tree70e560abf0f1d03b278e05fe334ae034470045f3 /xmlsecurity
parent431f0b0d21cae98f0578f18144c9b08142544329 (diff)
move macro security dialog to xmlsecurity
split out security page and adapt code Change-Id: I51dbd48b2ff4f65f6806fac70bda27ee15d4e176
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/UI_xmlsec.mk2
-rw-r--r--xmlsecurity/inc/xmlsecurity/macrosecurity.hxx30
-rw-r--r--xmlsecurity/source/dialogs/dialogs.hrc21
-rw-r--r--xmlsecurity/source/dialogs/helpids.hrc1
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx81
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.src52
-rw-r--r--xmlsecurity/uiconfig/ui/macrosecuritydialog.ui394
-rw-r--r--xmlsecurity/uiconfig/ui/securitylevelpage.ui149
8 files changed, 603 insertions, 127 deletions
diff --git a/xmlsecurity/UI_xmlsec.mk b/xmlsecurity/UI_xmlsec.mk
index c9c7232e64f4..69f1b2bbceb2 100644
--- a/xmlsecurity/UI_xmlsec.mk
+++ b/xmlsecurity/UI_xmlsec.mk
@@ -11,7 +11,9 @@ $(eval $(call gb_UI_UI,xmlsec))
$(eval $(call gb_UI_add_uifiles,xmlsec,\
xmlsecurity/uiconfig/ui/digitalsignaturesdialog \
+ xmlsecurity/uiconfig/ui/securitylevelpage \
xmlsecurity/uiconfig/ui/selectcertificatedialog \
+ xmlsecurity/uiconfig/ui/macrosecuritydialog \
))
# vim: set noet sw=4 ts=4:
diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
index 9450ffa425a2..4611f05e50e3 100644
--- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
+++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx
@@ -89,29 +89,27 @@ class MacroSecurityTP : public TabPage
protected:
MacroSecurity* mpDlg;
public:
- MacroSecurityTP( Window* _pParent, const ResId& _rResId, MacroSecurity* _pDlg );
- inline void SetTabDlg( MacroSecurity* pTabDlg );
+ MacroSecurityTP(Window* _pParent, const OString& rID,
+ const OUString& rUIXMLDescription, MacroSecurity* _pDlg);
+ MacroSecurityTP(Window* _pParent, const ResId& _rResId, MacroSecurity* _pDlg);
+
+ void SetTabDlg(MacroSecurity* pTabDlg)
+ {
+ mpDlg = pTabDlg;
+ }
virtual void ClosePage( void ) = 0;
};
-inline void MacroSecurityTP::SetTabDlg( MacroSecurity* _pTabDlg )
-{
- mpDlg = _pTabDlg;
-}
-
-
class MacroSecurityLevelTP : public MacroSecurityTP
{
private:
- FixedLine maSecLevelFL;
- ReadOnlyImage maSecReadonlyFI;
- RadioButton maVeryHighRB;
- RadioButton maHighRB;
- RadioButton maMediumRB;
- RadioButton maLowRB;
-
- sal_uInt16 mnCurLevel;
+ RadioButton* m_pVeryHighRB;
+ RadioButton* m_pHighRB;
+ RadioButton* m_pMediumRB;
+ RadioButton* m_pLowRB;
+
+ sal_uInt16 mnCurLevel;
protected:
DECL_LINK(RadioButtonHdl, void *);
diff --git a/xmlsecurity/source/dialogs/dialogs.hrc b/xmlsecurity/source/dialogs/dialogs.hrc
index ea6097a3a830..cfc4acd489c2 100644
--- a/xmlsecurity/source/dialogs/dialogs.hrc
+++ b/xmlsecurity/source/dialogs/dialogs.hrc
@@ -175,27 +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 security level ---------
-
-#define FL_SECLEVEL 1
-#define RB_VERYHIGH 2
-#define RB_HIGH 3
-#define RB_MEDIUM 4
-#define RB_LOW 5
-#define FI_SEC_READONLY 6
-
-#define RSC_BIG_RADIOBUTTON 40
-#define SL_RB_DIST_Y (RSC_SP_FLGR_SPACE_Y+RSC_BIG_RADIOBUTTON)
-#define SL_COL_0 RSC_SP_TBPG_INNERBORDER_LEFT
-#define SL_COL_1 (SL_COL_0+RSC_SP_FLGR_SPACE_X)
-#define SL_COL_3 (TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT)
-#define SL_COL_2 ((SL_COL_3-SL_COL_1)*100/105)
-#define SL_ROW_0 RSC_SP_TBPG_INNERBORDER_TOP
-#define SL_ROW_1 (SL_ROW_0+SL_RB_DIST_Y)
-#define SL_ROW_2 (SL_ROW_1+SL_RB_DIST_Y)
-#define SL_ROW_3 (SL_ROW_2+SL_RB_DIST_Y)
-#define SL_ROW_4 (TP_HEIGHT-RSC_SP_TBPG_INNERBORDER_BOTTOM)
-
// --------- tab page trusted sources ---------
#define FL_TRUSTCERT 1
diff --git a/xmlsecurity/source/dialogs/helpids.hrc b/xmlsecurity/source/dialogs/helpids.hrc
index 8a3dde570e42..0818b8272ddf 100644
--- a/xmlsecurity/source/dialogs/helpids.hrc
+++ b/xmlsecurity/source/dialogs/helpids.hrc
@@ -24,7 +24,6 @@
// Help-Ids --------------------------------------------------------------
#define HID_XMLSEC_TP_MACROSEC "XMLSECURITY_HID_XMLSEC_TP_MACROSEC"
-#define HID_XMLSEC_TP_SECLEVEL "XMLSECURITY_HID_XMLSEC_TP_SECLEVEL"
#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"
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index f87160fedf63..53df4453d4d2 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -91,6 +91,12 @@ MacroSecurity::~MacroSecurity()
delete maTabCtrl.GetTabPage( RID_XMLSECTP_SECLEVEL );
}
+MacroSecurityTP::MacroSecurityTP(Window* _pParent, const OString& rID,
+ const OUString& rUIXMLDescription, MacroSecurity* _pDlg)
+ : TabPage(_pParent, rID, rUIXMLDescription)
+ , mpDlg(_pDlg)
+{
+}
MacroSecurityTP::MacroSecurityTP( Window* _pParent, const ResId& _rResId, MacroSecurity* _pDlg )
:TabPage ( _pParent, _rResId )
@@ -98,66 +104,67 @@ MacroSecurityTP::MacroSecurityTP( Window* _pParent, const ResId& _rResId, MacroS
{
}
-MacroSecurityLevelTP::MacroSecurityLevelTP( Window* _pParent, MacroSecurity* _pDlg )
- :MacroSecurityTP ( _pParent, XMLSEC_RES( RID_XMLSECTP_SECLEVEL ), _pDlg )
- ,maSecLevelFL ( this, XMLSEC_RES( FL_SECLEVEL ) )
- ,maSecReadonlyFI ( this, XMLSEC_RES( FI_SEC_READONLY ))
- ,maVeryHighRB ( this, XMLSEC_RES( RB_VERYHIGH ) )
- ,maHighRB ( this, XMLSEC_RES( RB_HIGH ) )
- ,maMediumRB ( this, XMLSEC_RES( RB_MEDIUM ) )
- ,maLowRB ( this, XMLSEC_RES( RB_LOW ) )
+MacroSecurityLevelTP::MacroSecurityLevelTP(Window* _pParent, MacroSecurity* _pDlg)
+ : MacroSecurityTP(_pParent, "SecurityLevelPage", "xmlsec/ui/securitylevelpage.ui", _pDlg)
{
- FreeResource();
+ get(m_pVeryHighRB, "vhigh");
+ get(m_pHighRB, "high");
+ get(m_pMediumRB, "med");
+ get(m_pLowRB, "low");
- maLowRB.SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) );
- maMediumRB.SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) );
- maHighRB.SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) );
- maVeryHighRB.SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) );
+ m_pLowRB->SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) );
+ m_pMediumRB->SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) );
+ m_pHighRB->SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) );
+ m_pVeryHighRB->SetClickHdl( LINK( this, MacroSecurityLevelTP, RadioButtonHdl ) );
mnCurLevel = (sal_uInt16) mpDlg->maSecOptions.GetMacroSecurityLevel();
sal_Bool bReadonly = mpDlg->maSecOptions.IsReadOnly( SvtSecurityOptions::E_MACRO_SECLEVEL );
RadioButton* pCheck = 0;
- switch( mnCurLevel )
+ FixedImage* pImage = 0;
+ switch (mnCurLevel)
{
- case 3: pCheck = &maVeryHighRB; break;
- case 2: pCheck = &maHighRB; break;
- case 1: pCheck = &maMediumRB; break;
- case 0: pCheck = &maLowRB; break;
+ case 3:
+ pCheck = m_pVeryHighRB;
+ pImage = get<FixedImage>("vhighimg");
+ break;
+ case 2:
+ pCheck = m_pHighRB;
+ pImage = get<FixedImage>("highimg");
+ break;
+ case 1:
+ pCheck = m_pMediumRB;
+ pImage = get<FixedImage>("medimg");
+ break;
+ case 0:
+ pCheck = m_pLowRB;
+ pImage = get<FixedImage>("lowimg");
+ break;
}
- if(pCheck)
+ if (pCheck)
pCheck->Check();
else
{
OSL_FAIL("illegal macro security level");
}
- maSecReadonlyFI.Show(bReadonly);
- if(bReadonly)
+ if (bReadonly)
{
- //move to the selected button
- if( pCheck && pCheck != &maVeryHighRB)
- {
- long nDiff = pCheck->GetPosPixel().Y() - maVeryHighRB.GetPosPixel().Y();
- Point aPos(maSecReadonlyFI.GetPosPixel());
- aPos.Y() += nDiff;
- maSecReadonlyFI.SetPosPixel(aPos);
- }
- maVeryHighRB.Enable(sal_False);
- maHighRB.Enable(sal_False);
- maMediumRB.Enable(sal_False);
- maLowRB.Enable(sal_False);
+ pImage->Show(true);
+ m_pVeryHighRB->Enable(false);
+ m_pHighRB->Enable(false);
+ m_pMediumRB->Enable(false);
+ m_pLowRB->Enable(false);
}
-
}
IMPL_LINK_NOARG(MacroSecurityLevelTP, RadioButtonHdl)
{
sal_uInt16 nNewLevel = 0;
- if( maVeryHighRB.IsChecked() )
+ if( m_pVeryHighRB->IsChecked() )
nNewLevel = 3;
- else if( maHighRB.IsChecked() )
+ else if( m_pHighRB->IsChecked() )
nNewLevel = 2;
- else if( maMediumRB.IsChecked() )
+ else if( m_pMediumRB->IsChecked() )
nNewLevel = 1;
if ( nNewLevel != mnCurLevel )
diff --git a/xmlsecurity/source/dialogs/macrosecurity.src b/xmlsecurity/source/dialogs/macrosecurity.src
index 8d04f80e78b6..a1a6fcdf34c9 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.src
+++ b/xmlsecurity/source/dialogs/macrosecurity.src
@@ -72,58 +72,6 @@ TabDialog RID_XMLSECTP_MACROSEC
};
};
-TabPage RID_XMLSECTP_SECLEVEL
-{
- HelpId = HID_XMLSEC_TP_SECLEVEL;
- Size = MAP_APPFONT( TP_WIDTH, TP_HEIGHT );
- OutputSize = TRUE;
- Hide = TRUE;
- SVLook = TRUE;
- FixedLine FL_SECLEVEL
- {
- Pos = MAP_APPFONT( SL_COL_0, SL_ROW_0 );
- Size = MAP_APPFONT( SL_COL_3-SL_COL_0, RSC_CD_FIXEDLINE_HEIGHT );
- Hide = TRUE;
- };
- FixedImage FI_SEC_READONLY
- {
- Pos = MAP_APPFONT( SL_COL_1 - 7, SL_ROW_0 + 4 );
- Size = MAP_APPFONT( 6, 6 );
- };
- RadioButton RB_VERYHIGH
- {
- HelpID = "xmlsecurity:RadioButton:RID_XMLSECTP_SECLEVEL:RB_VERYHIGH";
- Pos = MAP_APPFONT( SL_COL_1, SL_ROW_0 );
- Size = MAP_APPFONT( SL_COL_2-SL_COL_1, RSC_BIG_RADIOBUTTON );
- WordBreak = TRUE;
- Text [ en-US ] = "~Very high.\nOnly macros from trusted file locations are allowed to run. All other macros, regardless whether signed or not, are disabled.";
- };
- RadioButton RB_HIGH
- {
- HelpID = "xmlsecurity:RadioButton:RID_XMLSECTP_SECLEVEL:RB_HIGH";
- Pos = MAP_APPFONT( SL_COL_1, SL_ROW_1 );
- Size = MAP_APPFONT( SL_COL_2-SL_COL_1, RSC_BIG_RADIOBUTTON );
- WordBreak = TRUE;
- Text [ en-US ] = "H~igh.\nOnly signed macros from trusted sources are allowed to run. Unsigned macros are disabled.";
- };
- RadioButton RB_MEDIUM
- {
- HelpID = "xmlsecurity:RadioButton:RID_XMLSECTP_SECLEVEL:RB_MEDIUM";
- Pos = MAP_APPFONT( SL_COL_1, SL_ROW_2 );
- Size = MAP_APPFONT( SL_COL_2-SL_COL_1, RSC_BIG_RADIOBUTTON );
- WordBreak = TRUE;
- Text [ en-US ] = "~Medium.\nConfirmation required before executing macros from untrusted sources.";
- };
- RadioButton RB_LOW
- {
- HelpID = "xmlsecurity:RadioButton:RID_XMLSECTP_SECLEVEL:RB_LOW";
- Pos = MAP_APPFONT( SL_COL_1, SL_ROW_3 );
- Size = MAP_APPFONT( SL_COL_2-SL_COL_1, SL_ROW_4-SL_ROW_3 );
- WordBreak = TRUE;
- Text [ en-US ] = "~Low (not recommended).\nAll macros will be executed without confirmation. Use this setting only if you are certain that all documents that will be opened are safe.";
- };
-};
-
TabPage RID_XMLSECTP_TRUSTSOURCES
{
HelpId = HID_XMLSEC_TP_TRUSTSOURCES;
diff --git a/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui b/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui
new file mode 100644
index 000000000000..7d803d091571
--- /dev/null
+++ b/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui
@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="MacroSecurityDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Macro Security</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="reset">
+ <property name="label" translatable="yes">~Reset</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="notebook1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="SecurityLevelPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Security Level</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button5">
+ <property name="label" translatable="yes">~View...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button6">
+ <property name="label">gtk-remove</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="width_request">150</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Issued to</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="width_request">150</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">issued by</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="width_request">150</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Expiration date</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Trusted certificates</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">6</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Document macros are always executed if they have been opened from one of the
+following locations.</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button7">
+ <property name="label">gtk-add</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button8">
+ <property name="label">gtk-remove</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Trusted file locations</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Trusted Sources</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ <action-widget response="0">reset</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/xmlsecurity/uiconfig/ui/securitylevelpage.ui b/xmlsecurity/uiconfig/ui/securitylevelpage.ui
new file mode 100644
index 000000000000..9e004dd5a94f
--- /dev/null
+++ b/xmlsecurity/uiconfig/ui/securitylevelpage.ui
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkGrid" id="SecurityLevelPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="row_spacing">12</property>
+ <property name="column_spacing">12</property>
+ <property name="row_homogeneous">True</property>
+ <child>
+ <object class="GtkRadioButton" id="low:wrap">
+ <property name="label" translatable="yes">_Low (not recommended).
+All macros will be executed without confirmation. Use this setting only if you are certain that all documents that will be opened are safe.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">vhigh:wrap</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="med:wrap">
+ <property name="label" translatable="yes">_Medium.
+Confirmation required before executing macros from untrusted sources.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">low:wrap</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="high:wrap">
+ <property name="label" translatable="yes">H_igh.
+Only signed macros from trusted sources are allowed to run. Unsigned macros are disabled.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">med:wrap</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="vhigh:wrap">
+ <property name="label" translatable="yes">_Very high.
+Only macros from trusted file locations are allowed to run. All other macros, regardless whether signed or not, are disabled.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">high:wrap</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="vhighimg">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="pixbuf">res/lock.png</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="highimg">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="pixbuf">res/lock.png</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="medimg">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="pixbuf">res/lock.png</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="lowimg">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="pixbuf">res/lock.png</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+</interface>