From 15ab55c092e0b474827abe104b73c5bfab6ef28c Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Tue, 25 May 2021 13:30:38 +0200 Subject: 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 --- cui/source/options/optupdt.cxx | 8 ++++++++ cui/source/options/optupdt.hxx | 1 + cui/uiconfig/ui/optonlineupdatepage.ui | 14 ++++++++++++++ 3 files changed, 23 insertions(+) (limited to 'cui') 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 #include #include +#include #include #include #include +#include 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 m_xLastChecked; std::unique_ptr m_xExtrasCheckBox; std::unique_ptr m_xUserAgentLabel; + std::unique_ptr 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 @@ 2 + + + Privacy Policy + True + True + True + none + + + False + True + 3 + + -- cgit