summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-05-25 13:30:38 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-05-26 00:29:00 +0200
commit15ab55c092e0b474827abe104b73c5bfab6ef28c (patch)
treec9189516786794e229ac1d356eb17e0c85c4b290 /cui
parent4d800dd7b58291386850d69570d027192419c5a0 (diff)
add privacy URL to crashreport dialog & updatecheck tab in options
Change-Id: I35cda87c35876469bf581be223bc608e29f07b09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116105 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optupdt.cxx8
-rw-r--r--cui/source/options/optupdt.hxx1
-rw-r--r--cui/uiconfig/ui/optonlineupdatepage.ui14
3 files changed, 23 insertions, 0 deletions
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index db1402825f7c..d89fdec0aa4f 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -37,9 +37,11 @@
#include <com/sun/star/configuration/ReadWriteAccess.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <officecfg/Office/Common.hxx>
#include <osl/file.hxx>
#include <osl/security.hxx>
#include <tools/diagnose_ex.h>
+#include <unotools/configmgr.hxx>
using namespace ::css;
@@ -58,6 +60,7 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::Dia
, m_xLastChecked(m_xBuilder->weld_label("lastchecked"))
, m_xExtrasCheckBox(m_xBuilder->weld_check_button("extrabits"))
, m_xUserAgentLabel(m_xBuilder->weld_label("useragent"))
+ , m_xPrivacyPolicyButton(m_xBuilder->weld_link_button("btnPrivacyPolicy"))
{
m_aNeverChecked = m_xNeverChecked->get_label();
@@ -65,6 +68,11 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage(weld::Container* pPage, weld::Dia
m_xExtrasCheckBox->connect_toggled( LINK( this, SvxOnlineUpdateTabPage, ExtrasCheckHdl_Impl ) );
m_xCheckNowButton->connect_clicked( LINK( this, SvxOnlineUpdateTabPage, CheckNowHdl_Impl ) );
m_xChangePathButton->connect_clicked( LINK( this, SvxOnlineUpdateTabPage, FileDialogHdl_Impl ) );
+ m_xPrivacyPolicyButton->set_uri(
+ officecfg::Office::Common::Menus::PrivacyPolicyURL::get()
+ + "?type=updatecheck&LOvers=" + utl::ConfigManager::getProductVersion()
+ + "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47());
+
uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
diff --git a/cui/source/options/optupdt.hxx b/cui/source/options/optupdt.hxx
index f41fe2e2dd55..7143bf333f65 100644
--- a/cui/source/options/optupdt.hxx
+++ b/cui/source/options/optupdt.hxx
@@ -47,6 +47,7 @@ private:
std::unique_ptr<weld::Label> m_xLastChecked;
std::unique_ptr<weld::CheckButton> m_xExtrasCheckBox;
std::unique_ptr<weld::Label> m_xUserAgentLabel;
+ std::unique_ptr<weld::LinkButton> m_xPrivacyPolicyButton;
DECL_LINK(FileDialogHdl_Impl, weld::Button&, void);
DECL_LINK(CheckNowHdl_Impl, weld::Button&, void);
diff --git a/cui/uiconfig/ui/optonlineupdatepage.ui b/cui/uiconfig/ui/optonlineupdatepage.ui
index c7fe2ab6687f..bf623a8388d7 100644
--- a/cui/uiconfig/ui/optonlineupdatepage.ui
+++ b/cui/uiconfig/ui/optonlineupdatepage.ui
@@ -422,6 +422,20 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkLinkButton" id="btnPrivacyPolicy">
+ <property name="label" translatable="yes" context="optonlineupdatepage|privacy">Privacy Policy</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="relief">none</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
</child>
<child type="label">