cui/UI_cui.mk | 1 cui/source/inc/helpid.hrc | 1 cui/source/options/securityoptions.cxx | 14 - cui/source/options/securityoptions.hxx | 7 cui/source/options/securityoptions.src | 1 cui/uiconfig/ui/securityoptionsdialog.ui | 300 +++++++++++++++++++++++ sfx2/uiconfig/ui/documentpropertiesdialog.ui | 11 sw/uiconfig/swriter/ui/securityoptandwarn.ui | 317 ------------------------- xmlsecurity/inc/xmlsecurity/global.hrc | 3 xmlsecurity/inc/xmlsecurity/macrosecurity.hxx | 27 +- xmlsecurity/source/dialogs/dialogs.hrc | 1 xmlsecurity/source/dialogs/helpids.hrc | 1 xmlsecurity/source/dialogs/macrosecurity.cxx | 37 +- xmlsecurity/source/dialogs/macrosecurity.src | 53 ---- xmlsecurity/uiconfig/ui/macrosecuritydialog.ui | 11 xmlsecurity/uiconfig/ui/securitylevelpage.ui | 9 16 files changed, 353 insertions(+), 441 deletions(-)
New commits: commit 0ea32acfa5f7d3ab78d4c01ef2cd03ff04503ef8 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Feb 14 23:14:31 2013 +0000 move security options dialog to cui and adapt code Change-Id: Ie1f5c5eb437c55844a524c1219b1e30e5f07b3c3 diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index 5799a87..6b259d2 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -45,6 +45,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\ cui/uiconfig/ui/pickoutlinepage \ cui/uiconfig/ui/positionpage \ cui/uiconfig/ui/scriptorganizer \ + cui/uiconfig/ui/securityoptionsdialog \ cui/uiconfig/ui/select_persona_dialog \ cui/uiconfig/ui/specialcharacters \ cui/uiconfig/ui/spellingdialog \ diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index f041f41..d854179 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -45,7 +45,6 @@ #define HID_SVXPAGE_JSEARCH_OPTIONS "CUI_HID_SVXPAGE_JSEARCH_OPTIONS" #define HID_SVXDLG_FILTER_WARNING "CUI_HID_SVXDLG_FILTER_WARNING" #define HID_SVX_OPTIONS_ONLINEUPDATE "CUI_HID_SVX_OPTIONS_ONLINEUPDATE" -#define HID_DLG_SECURITY_OPTIONS "CUI_HID_DLG_SECURITY_OPTIONS" #define HID_OFADLG_OPTIONS_TREE "CUI_HID_OFADLG_OPTIONS_TREE" #define HID_OFA_CONNPOOL_DRIVERLIST "CUI_HID_OFA_CONNPOOL_DRIVERLIST" #define UID_OFA_CONNPOOL_DRIVERLIST_BACK "CUI_UID_OFA_CONNPOOL_DRIVERLIST_BACK" diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx index f36f863..d0196d3 100644 --- a/cui/source/options/securityoptions.cxx +++ b/cui/source/options/securityoptions.cxx @@ -43,10 +43,9 @@ namespace svx { //........................................................................ -SecurityOptionsDialog::SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions ) : - ModalDialog( pParent, CUI_RES( RID_SVXDLG_SECURITY_OPTIONS ) ) - ,m_aWarningsFL ( this, CUI_RES( FL_WARNINGS ) ) - ,m_aWarningsFI ( this, CUI_RES( FI_WARNINGS ) ) +SecurityOptionsDialog::SecurityOptionsDialog(Window* pParent, SvtSecurityOptions* pOptions) + : ModalDialog(pParent, "SecurityOptionsDialog", "cui/ui/securityoptionsdialog.ui") + ,m_aSaveOrSendDocsFI( this, CUI_RES( FI_SAVESENDDOCS ) ) ,m_aSaveOrSendDocsCB( this, CUI_RES( CB_SAVESENDDOCS ) ) ,m_aSignDocsFI ( this, CUI_RES( FI_SIGNDOCS ) ) @@ -55,7 +54,6 @@ SecurityOptionsDialog::SecurityOptionsDialog( Window* pParent, SvtSecurityOption ,m_aPrintDocsCB ( this, CUI_RES( CB_PRINTDOCS ) ) ,m_aCreatePdfFI ( this, CUI_RES( FI_CREATEPDF ) ) ,m_aCreatePdfCB ( this, CUI_RES( CB_CREATEPDF ) ) - ,m_aOptionsFL ( this, CUI_RES( FL_OPTIONS ) ) ,m_aRemovePersInfoFI( this, CUI_RES( FI_REMOVEINFO ) ) ,m_aRemovePersInfoCB( this, CUI_RES( CB_REMOVEINFO ) ) ,m_aRecommPasswdFI ( this, CUI_RES( FI_RECOMMENDPWD ) ) @@ -63,13 +61,7 @@ SecurityOptionsDialog::SecurityOptionsDialog( Window* pParent, SvtSecurityOption ,m_aCtrlHyperlinkFI ( this, CUI_RES( FI_CTRLHYPERLINK ) ) ,m_aCtrlHyperlinkCB ( this, CUI_RES( CB_CTRLHYPERLINK ) ) - ,m_aButtonsFL ( this, CUI_RES( FL_BUTTONS ) ) - ,m_aOKBtn ( this, CUI_RES( PB_OK ) ) - ,m_aCancelBtn ( this, CUI_RES( PB_CANCEL ) ) - ,m_aHelpBtn ( this, CUI_RES( PB_HELP ) ) - { - FreeResource(); DBG_ASSERT( pOptions, "SecurityOptionsDialog::SecurityOptionsDialog(): invalid SvtSecurityOptions" ); enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, m_aSaveOrSendDocsCB, m_aSaveOrSendDocsFI ); diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx index b9ec14e..dc9cd06 100644 --- a/cui/source/options/securityoptions.hxx +++ b/cui/source/options/securityoptions.hxx @@ -38,8 +38,6 @@ namespace svx class SecurityOptionsDialog : public ModalDialog { private: - FixedLine m_aWarningsFL; - FixedInfo m_aWarningsFI; ReadOnlyImage m_aSaveOrSendDocsFI; CheckBox m_aSaveOrSendDocsCB; ReadOnlyImage m_aSignDocsFI; @@ -49,7 +47,6 @@ namespace svx ReadOnlyImage m_aCreatePdfFI; CheckBox m_aCreatePdfCB; - FixedLine m_aOptionsFL; ReadOnlyImage m_aRemovePersInfoFI; CheckBox m_aRemovePersInfoCB; ReadOnlyImage m_aRecommPasswdFI; @@ -57,10 +54,6 @@ namespace svx ReadOnlyImage m_aCtrlHyperlinkFI; CheckBox m_aCtrlHyperlinkCB; - FixedLine m_aButtonsFL; - OKButton m_aOKBtn; - CancelButton m_aCancelBtn; - HelpButton m_aHelpBtn; public: SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions ); diff --git a/cui/source/options/securityoptions.src b/cui/source/options/securityoptions.src index d0f333db..956f093 100644 --- a/cui/source/options/securityoptions.src +++ b/cui/source/options/securityoptions.src @@ -23,7 +23,6 @@ ModalDialog RID_SVXDLG_SECURITY_OPTIONS { - HelpID = HID_DLG_SECURITY_OPTIONS ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( DLG_WIDTH , ROW_10 ) ; diff --git a/cui/uiconfig/ui/securityoptionsdialog.ui b/cui/uiconfig/ui/securityoptionsdialog.ui new file mode 100644 index 0000000..53b6bf4 --- /dev/null +++ b/cui/uiconfig/ui/securityoptionsdialog.ui @@ -0,0 +1,300 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="SecurityOptionsDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Security options and warnings</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">12</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="can_default">True</property> + <property name="has_default">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> + </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="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</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="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkCheckButton" id="checkbutton1"> + <property name="label" translatable="yes">_When saving or sending</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> + </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="GtkCheckButton" id="checkbutton2"> + <property name="label" translatable="yes">When _signing</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> + </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="GtkCheckButton" id="checkbutton3"> + <property name="label" translatable="yes">When _printing</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> + </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="GtkCheckButton" id="checkbutton4"> + <property name="label" translatable="yes">When creating PDF _files</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> + </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="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Warn if document contains recorded changes, versions, hidden information or notes:</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Security warnings</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </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="top_padding">6</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="row_spacing">6</property> + <child> + <object class="GtkCheckButton" id="checkbutton5"> + <property name="label" translatable="yes">_Remove personal information on saving</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> + </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="GtkCheckButton" id="checkbutton6"> + <property name="label" translatable="yes">Recommend password protection on sa_ving</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> + </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="GtkCheckButton" id="checkbutton7"> + <property name="label" translatable="yes">Ctrl-click required _to follow hyperlinks</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> + </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="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Security options</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </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="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-widgets> + </object> +</interface> diff --git a/sw/uiconfig/swriter/ui/securityoptandwarn.ui b/sw/uiconfig/swriter/ui/securityoptandwarn.ui deleted file mode 100644 index 24f28cf..0000000 --- a/sw/uiconfig/swriter/ui/securityoptandwarn.ui +++ /dev/null @@ -1,317 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<interface> - <!-- interface-requires gtk+ 3.0 --> - <object class="GtkDialog" id="Security options and warnings"> - <property name="can_focus">False</property> - <property name="border_width">5</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="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_action_appearance">False</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="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_action_appearance">False</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="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_action_appearance">False</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> - </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="GtkBox" id="box1"> - <property name="visible">True</property> - <property name="can_focus">False</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> - <child> - <object class="GtkGrid" id="grid2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> - <child> - <object class="GtkCheckButton" id="checkbutton1"> - <property name="label" translatable="yes">~When saving or sending</property> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</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="GtkCheckButton" id="checkbutton2"> - <property name="label" translatable="yes">When ~signing</property> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</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="GtkCheckButton" id="checkbutton3"> - <property name="label" translatable="yes">When ~printing</property> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</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="GtkCheckButton" id="checkbutton4"> - <property name="label" translatable="yes">When creating PDF ~files</property> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</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> - </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="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Warn if document contains recorded changes, versions, hidden information or notes:</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> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Security warnings</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">6</property> - <child> - <object class="GtkCheckButton" id="checkbutton5"> - <property name="label" translatable="yes">~Remove personal information on saving</property> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</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="GtkCheckButton" id="checkbutton6"> - <property name="label" translatable="yes">Recommend password protection on sa~ving</property> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</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="GtkCheckButton" id="checkbutton7"> - <property name="label" translatable="yes">Ctrl-click required ~to follow hyperlinks</property> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</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> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Security options</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="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-widgets> - </object> -</interface> commit c163123e1f1ffb7bcaa8f2f09f2830fdfabcaef3 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Feb 14 23:04:56 2013 +0000 adapt macro security dialog code to .ui Change-Id: I0527ff30508bd7fd9182ff0bfec87aef7907f1fb diff --git a/xmlsecurity/inc/xmlsecurity/global.hrc b/xmlsecurity/inc/xmlsecurity/global.hrc index e4393b2..4675f7e 100644 --- a/xmlsecurity/inc/xmlsecurity/global.hrc +++ b/xmlsecurity/inc/xmlsecurity/global.hrc @@ -25,9 +25,6 @@ #define RID_XMLSECTP_GENERAL 1003 #define RID_XMLSECTP_DETAILS 1004 #define RID_XMLSECTP_CERTPATH 1005 -#define RID_XMLSECTP_MACROSEC 1006 -#define RID_XMLSECTP_SECLEVEL 1007 -#define RID_XMLSECTP_TRUSTSOURCES 1008 #define RID_XMLSECTP_MACROWARN 1009 #define RID_XMLSECTP_READONLY_CONFIG_TIP 1010 #define RID_XMLSECTP_LOCK 1011 diff --git a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx index 4b500dc..42cc9a7 100644 --- a/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx +++ b/xmlsecurity/inc/xmlsecurity/macrosecurity.hxx @@ -58,32 +58,33 @@ private: friend class MacroSecurityLevelTP; friend class MacroSecurityTrustedSourcesTP; - TabControl maTabCtrl; - OKButton maOkBtn; - CancelButton maCancelBtn; - HelpButton maHelpBtn; - PushButton maResetBtn; + TabControl* m_pTabCtrl; + OKButton* m_pOkBtn; + PushButton* m_pResetBtn; cssu::Reference< cssu::XComponentContext > mxCtx; cssu::Reference< dcss::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment; SvtSecurityOptions maSecOptions; + sal_uInt16 m_nSecLevelId; + sal_uInt16 m_nSecTrustId; + MacroSecurityTP* mpLevelTP; MacroSecurityTP* mpTrustSrcTP; DECL_LINK( OkBtnHdl, void* ); public: - MacroSecurity( Window* pParent, const cssu::Reference< cssu::XComponentContext>& rxCtx, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment ); - virtual ~MacroSecurity(); + MacroSecurity(Window* pParent, + const cssu::Reference< cssu::XComponentContext>& rxCtx, + const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment); + virtual ~MacroSecurity(); - inline void EnableReset( bool _bEnable = true ); + inline void EnableReset(bool _bEnable = true) + { + m_pResetBtn->Enable ( _bEnable ); + } }; -inline void MacroSecurity::EnableReset( bool _bEnable ) -{ - maResetBtn.Enable ( _bEnable ); -} - class MacroSecurityTP : public TabPage { protected: diff --git a/xmlsecurity/source/dialogs/dialogs.hrc b/xmlsecurity/source/dialogs/dialogs.hrc index e2224f29..ffcf5d0 100644 --- a/xmlsecurity/source/dialogs/dialogs.hrc +++ b/xmlsecurity/source/dialogs/dialogs.hrc @@ -26,7 +26,6 @@ #define FL_BOTTOM_SEP 50 #define BTN_OK 51 -#define BTN_CANCEL 52 #define BTN_HELP 53 #define LB_SIGNATURES 54 #define BTN_VIEWCERT 55 diff --git a/xmlsecurity/source/dialogs/helpids.hrc b/xmlsecurity/source/dialogs/helpids.hrc index 9ce5a4f..637e9db 100644 --- a/xmlsecurity/source/dialogs/helpids.hrc +++ b/xmlsecurity/source/dialogs/helpids.hrc @@ -23,7 +23,6 @@ // Help-Ids -------------------------------------------------------------- -#define HID_XMLSEC_TP_MACROSEC "XMLSECURITY_HID_XMLSEC_TP_MACROSEC" #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" diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index b4c8b41..3b3d924 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -62,33 +62,34 @@ IMPL_LINK_NOARG(MacroSecurity, OkBtnHdl) return 0; } -MacroSecurity::MacroSecurity( Window* _pParent, const cssu::Reference< cssu::XComponentContext> &_rxCtx, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment ) - :TabDialog ( _pParent, XMLSEC_RES( RID_XMLSECTP_MACROSEC ) ) - ,maTabCtrl ( this, XMLSEC_RES( 1 ) ) - ,maOkBtn ( this, XMLSEC_RES( BTN_OK ) ) - ,maCancelBtn ( this, XMLSEC_RES( BTN_CANCEL ) ) - ,maHelpBtn ( this, XMLSEC_RES( BTN_HELP ) ) - ,maResetBtn ( this, XMLSEC_RES( BTN_RESET ) ) +MacroSecurity::MacroSecurity( Window* _pParent, + const cssu::Reference< cssu::XComponentContext> &_rxCtx, + const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment) + : TabDialog(_pParent, "MacroSecurityDialog", "xmlsec/ui/macrosecuritydialog.ui") + , mxCtx(_rxCtx) + , mxSecurityEnvironment(_rxSecurityEnvironment) { - FreeResource(); + get(m_pTabCtrl, "tabcontrol"); + get(m_pResetBtn, "reset"); + get(m_pOkBtn, "ok"); - mxCtx = _rxCtx; - mxSecurityEnvironment = _rxSecurityEnvironment; + mpLevelTP = new MacroSecurityLevelTP(m_pTabCtrl, this); + mpTrustSrcTP = new MacroSecurityTrustedSourcesTP(m_pTabCtrl, this); - mpLevelTP = new MacroSecurityLevelTP( &maTabCtrl, this ); - mpTrustSrcTP = new MacroSecurityTrustedSourcesTP( &maTabCtrl, this ); + m_nSecLevelId = m_pTabCtrl->GetPageId("SecurityLevelPage"); + m_nSecTrustId = m_pTabCtrl->GetPageId("SecurityTrustPage"); - maTabCtrl.SetTabPage( RID_XMLSECTP_SECLEVEL, mpLevelTP ); - maTabCtrl.SetTabPage( RID_XMLSECTP_TRUSTSOURCES, mpTrustSrcTP ); - maTabCtrl.SetCurPageId( RID_XMLSECTP_SECLEVEL ); + m_pTabCtrl->SetTabPage(m_nSecLevelId, mpLevelTP); + m_pTabCtrl->SetTabPage(m_nSecTrustId, mpTrustSrcTP); + m_pTabCtrl->SetCurPageId(m_nSecLevelId); - maOkBtn.SetClickHdl( LINK( this, MacroSecurity, OkBtnHdl ) ); + m_pOkBtn->SetClickHdl( LINK( this, MacroSecurity, OkBtnHdl ) ); } MacroSecurity::~MacroSecurity() { - delete maTabCtrl.GetTabPage( RID_XMLSECTP_TRUSTSOURCES ); - delete maTabCtrl.GetTabPage( RID_XMLSECTP_SECLEVEL ); + delete m_pTabCtrl->GetTabPage(m_nSecTrustId); + delete m_pTabCtrl->GetTabPage(m_nSecLevelId); } MacroSecurityTP::MacroSecurityTP(Window* _pParent, const OString& rID, diff --git a/xmlsecurity/source/dialogs/macrosecurity.src b/xmlsecurity/source/dialogs/macrosecurity.src index eaece23..2108846 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.src +++ b/xmlsecurity/source/dialogs/macrosecurity.src @@ -19,59 +19,6 @@ #include "dialogs.hrc" #include "helpids.hrc" -TabDialog RID_XMLSECTP_MACROSEC -{ - HelpID = HID_XMLSEC_TP_MACROSEC; - Size = MAP_APPFONT( TD_WIDTH, TD_HEIGHT ); - OutputSize = TRUE; - Closeable = TRUE; - Moveable = TRUE; - SVLook = TRUE; - - Text [ en-US ] = "Macro Security"; - TabControl 1 - { - Pos = MAP_APPFONT( TD_SP_INNERBORDER_LEFT, TD_SP_INNERBORDER_TOP ); - Size = MAP_APPFONT( TP_WIDTH, TP_HEIGHT+RIDDER_HEIGHT ); - SVLook = TRUE ; - PageList = - { - PageItem - { - Identifier = RID_XMLSECTP_SECLEVEL; - Text [ en-US ] = "Security Level"; - }; - PageItem - { - Identifier = RID_XMLSECTP_TRUSTSOURCES; - Text [ en-US ] = "Trusted Sources"; - }; - }; - }; - OKButton BTN_OK - { - Pos = MAP_APPFONT( MS_COL_H, CV_ROW_A ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - DefButton = TRUE; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT( MS_COL_F, CV_ROW_A ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT( MS_COL_D, CV_ROW_A ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - PushButton BTN_RESET - { - Pos = MAP_APPFONT( MS_COL_B, CV_ROW_A ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - Text [ en-US ] = "Reset"; - }; -}; - String RID_XMLSECTP_READONLY_CONFIG_TIP { Text [ en-US ] = "This setting is protected by the Administrator"; diff --git a/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui b/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui index dd48926..08cc254 100644 --- a/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui +++ b/xmlsecurity/uiconfig/ui/macrosecuritydialog.ui @@ -20,6 +20,8 @@ <property name="label">gtk-ok</property> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> <property name="receives_default">True</property> <property name="use_stock">True</property> </object> @@ -59,10 +61,11 @@ </child> <child> <object class="GtkButton" id="reset"> - <property name="label" translatable="yes">~Reset</property> + <property name="label">gtk-revert-to-saved</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> @@ -79,9 +82,11 @@ </packing> </child> <child> - <object class="GtkNotebook" id="notebook1"> + <object class="GtkNotebook" id="tabcontrol"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <child> <placeholder/> </child> @@ -99,7 +104,7 @@ <placeholder/> </child> <child type="tab"> - <object class="GtkLabel" id="label2"> + <object class="GtkLabel" id="SecurityTrustPage"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Trusted Sources</property> diff --git a/xmlsecurity/uiconfig/ui/securitylevelpage.ui b/xmlsecurity/uiconfig/ui/securitylevelpage.ui index 9e004dd..321418c 100644 --- a/xmlsecurity/uiconfig/ui/securitylevelpage.ui +++ b/xmlsecurity/uiconfig/ui/securitylevelpage.ui @@ -11,7 +11,8 @@ <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> +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> @@ -49,7 +50,8 @@ Confirmation required before executing macros from untrusted sources.</property> <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> +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> @@ -69,7 +71,8 @@ Only signed macros from trusted sources are allowed to run. Unsigned macros are <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> +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> commit 62726df969887cf6578a0f69c6c3dc8f689a3b06 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Feb 14 23:16:12 2013 +0000 use stock button Change-Id: I203eac7e8f4b49524c9255924725f5f1de4b9979 diff --git a/sfx2/uiconfig/ui/documentpropertiesdialog.ui b/sfx2/uiconfig/ui/documentpropertiesdialog.ui index 322429b..e505cf0 100644 --- a/sfx2/uiconfig/ui/documentpropertiesdialog.ui +++ b/sfx2/uiconfig/ui/documentpropertiesdialog.ui @@ -18,13 +18,11 @@ <child> <object class="GtkButton" id="ok"> <property name="label">gtk-ok</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="has_default">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -36,11 +34,9 @@ <child> <object class="GtkButton" id="cancel"> <property name="label">gtk-cancel</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -52,11 +48,9 @@ <child> <object class="GtkButton" id="help"> <property name="label">gtk-help</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -67,12 +61,11 @@ </child> <child> <object class="GtkButton" id="reset"> - <property name="label" translatable="yes">Reset</property> - <property name="use_action_appearance">False</property> + <property name="label">gtk-revert-to-saved</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> + <property name="use_stock">True</property> </object> <packing> <property name="expand">False</property>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits