summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-11 17:44:57 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-14 11:13:23 +0100
commit18be6f161de20f3b0e05d0dd494242eda16ee5c4 (patch)
tree392721c5af7da358dec1875c340c9654a30f337d /cui
parent7d989aef3d073e67a4bdbb16f71c8cc38c0c60b0 (diff)
Add "block untrusted referer links" switch
Change-Id: Id2f2a3dafc3bb7ec6fada6bfda5843348dfac5a1
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optinet2.cxx1
-rw-r--r--cui/source/options/securityoptions.cxx3
-rw-r--r--cui/source/options/securityoptions.hxx3
-rw-r--r--cui/uiconfig/ui/securityoptionsdialog.ui32
4 files changed, 38 insertions, 1 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index f6a07de4b01a..3dc09596b5a9 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -899,6 +899,7 @@ sal_Bool SvxSecurityTabPage::FillItemSet( SfxItemSet& )
CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO, mpSecOptDlg->IsRemovePersInfoChecked(), bModified );
CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD, mpSecOptDlg->IsRecommPasswdChecked(), bModified );
CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_CTRLCLICK_HYPERLINK, mpSecOptDlg->IsCtrlHyperlinkChecked(), bModified );
+ CheckAndSave( *mpSecOptions, SvtSecurityOptions::E_BLOCKUNTRUSTEDREFERERLINKS, mpSecOptDlg->IsBlockUntrustedRefererLinksChecked(), bModified );
}
return bModified;
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index e95bb196b940..2a2810a61c1a 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -67,6 +67,9 @@ SecurityOptionsDialog::SecurityOptionsDialog(Window* pParent, SvtSecurityOptions
get(m_pCtrlHyperlinkCB, "ctrlclick");
enableAndSet(*pOptions, SvtSecurityOptions::E_CTRLCLICK_HYPERLINK, *m_pCtrlHyperlinkCB,
*get<FixedImage>("lockctrlclick"));
+ get(m_pBlockUntrustedRefererLinksCB, "blockuntrusted");
+ enableAndSet(*pOptions, SvtSecurityOptions::E_BLOCKUNTRUSTEDREFERERLINKS, *m_pBlockUntrustedRefererLinksCB,
+ *get<FixedImage>("lockblockuntrusted"));
}
SecurityOptionsDialog::~SecurityOptionsDialog()
diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx
index 950fa256a2bc..7ff25c4ae5b1 100644
--- a/cui/source/options/securityoptions.hxx
+++ b/cui/source/options/securityoptions.hxx
@@ -45,7 +45,7 @@ namespace svx
CheckBox* m_pRemovePersInfoCB;
CheckBox* m_pRecommPasswdCB;
CheckBox* m_pCtrlHyperlinkCB;
-
+ CheckBox* m_pBlockUntrustedRefererLinksCB;
public:
SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions );
@@ -58,6 +58,7 @@ namespace svx
bool IsRemovePersInfoChecked() const { return m_pRemovePersInfoCB->IsChecked() != sal_False; }
bool IsRecommPasswdChecked() const { return m_pRecommPasswdCB->IsChecked() != sal_False; }
bool IsCtrlHyperlinkChecked() const { return m_pCtrlHyperlinkCB->IsChecked() != sal_False; }
+ bool IsBlockUntrustedRefererLinksChecked() const { return m_pBlockUntrustedRefererLinksCB->IsChecked() != sal_False; }
};
//........................................................................
diff --git a/cui/uiconfig/ui/securityoptionsdialog.ui b/cui/uiconfig/ui/securityoptionsdialog.ui
index b24de59fa8c3..2a4258f0c7db 100644
--- a/cui/uiconfig/ui/securityoptionsdialog.ui
+++ b/cui/uiconfig/ui/securityoptionsdialog.ui
@@ -343,6 +343,24 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="blockuntrusted">
+ <property name="label" translatable="yes">Block any links from documents not among the trusted locations (see Macro Security)</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="hexpand">True</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">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkImage" id="lockremovepersonal">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
@@ -385,6 +403,20 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkImage" id="lockblockuntrusted">
+ <property name="can_focus">False</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>
</child>
</object>