[Libreoffice-commits] core.git: config_host.mk.in configure.ac cui/source cui/uiconfig distro-configs/Jenkins officecfg/registry postprocess/CustomTarget_registry.mk svx/source svx/uiconfig
Christian Lohmaier (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 25 22:29:44 UTC 2021
config_host.mk.in | 1
configure.ac | 19 +++++++++++++
cui/source/options/optupdt.cxx | 8 +++++
cui/source/options/optupdt.hxx | 1
cui/uiconfig/ui/optonlineupdatepage.ui | 14 +++++++++
distro-configs/Jenkins/macosx_clang_dbgutil | 1
distro-configs/Jenkins/windows_msc_dbgutil_32 | 1
officecfg/registry/data/org/openoffice/Office/Common.xcu | 3 ++
officecfg/registry/schema/org/openoffice/Office/Common.xcs | 5 +++
postprocess/CustomTarget_registry.mk | 1
svx/source/dialog/crashreportdlg.cxx | 9 ++++++
svx/source/dialog/crashreportdlg.hxx | 1
svx/uiconfig/ui/crashreportdlg.ui | 16 ++++++++++
13 files changed, 79 insertions(+), 1 deletion(-)
New commits:
commit 15ab55c092e0b474827abe104b73c5bfab6ef28c
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Tue May 25 13:30:38 2021 +0200
Commit: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Wed May 26 00:29:00 2021 +0200
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 at googlemail.com>
diff --git a/config_host.mk.in b/config_host.mk.in
index f7fa8ca12f9f..3dee84bf4f25 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -495,6 +495,7 @@ export POPPLER_LIBS=$(gb_SPACE)@POPPLER_LIBS@
export POSTGRESQL_INC=@POSTGRESQL_INC@
export POSTGRESQL_LIB=@POSTGRESQL_LIB@
export PREFIXDIR=@PREFIXDIR@
+export PRIVACY_POLICY_URL=@PRIVACY_POLICY_URL@
export PRODUCTNAME=@PRODUCTNAME@
export PRODUCTNAME_WITHOUT_SPACES=@PRODUCTNAME_WITHOUT_SPACES@
export PRODUCTVERSION=@PRODUCTVERSION@
diff --git a/configure.ac b/configure.ac
index 971d7ad440c5..4652067a64de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2576,6 +2576,17 @@ AC_ARG_WITH(vendor,
[Set vendor of the build.]),
,)
+AC_ARG_WITH(privacy-policy-url,
+ AS_HELP_STRING([--with-privacy-policy-url="https://yourdomain/privacy-policy"],
+ [The URL to your privacy policy (needed when
+ enabling online-update or crashreporting via breakpad)]),
+ [if test "x$with_privacy_policy_url" = "xyes"; then
+ AC_MSG_FAILURE([you need to specify an argument when using --with-privacy-policy-url])
+ elif test "x$with_privacy_policy_url" = "xno"; then
+ with_privacy_policy_url="undefined"
+ fi]
+,[with_privacy_policy_url="undefined"])
+
AC_ARG_WITH(android-package-name,
AS_HELP_STRING([--with-android-package-name="org.libreoffice"],
[Set Android package name of the build.]),
@@ -12946,6 +12957,14 @@ AC_SUBST(ENABLE_ONLINE_UPDATE)
AC_SUBST(ENABLE_ONLINE_UPDATE_MAR)
AC_SUBST(UPDATE_CONFIG)
+
+PRIVACY_POLICY_URL="$with_privacy_policy_url"
+if test "$ENABLE_ONLINE_UPDATE" = TRUE -o "$ENABLE_BREAKPAD" = "TRUE"; then
+ if test "x$with_privacy_policy_url" = "xundefined"; then
+ AC_MSG_FAILURE([online update or breakpad/crashreporting are enabled, but no privacy url was provided])
+ fi
+fi
+AC_SUBST(PRIVACY_POLICY_URL)
dnl ===================================================================
dnl Test whether we need bzip2
dnl ===================================================================
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">
diff --git a/distro-configs/Jenkins/macosx_clang_dbgutil b/distro-configs/Jenkins/macosx_clang_dbgutil
index 0a95e5db16eb..ebb715a75960 100644
--- a/distro-configs/Jenkins/macosx_clang_dbgutil
+++ b/distro-configs/Jenkins/macosx_clang_dbgutil
@@ -3,3 +3,4 @@
--disable-dependency-tracking
--enable-optimized
--enable-odk
+--disable-online-update
diff --git a/distro-configs/Jenkins/windows_msc_dbgutil_32 b/distro-configs/Jenkins/windows_msc_dbgutil_32
index 7e5b893a2aca..ecffe0669577 100644
--- a/distro-configs/Jenkins/windows_msc_dbgutil_32
+++ b/distro-configs/Jenkins/windows_msc_dbgutil_32
@@ -3,3 +3,4 @@
--disable-symbols
--disable-dependency-tracking
--enable-odk
+--disable-online-update
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 2144d43a5454..2277b42bdf74 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -366,6 +366,9 @@
<prop oor:name="VolunteerURL" oor:type="xs:string">
<value>https://hub.libreoffice.org/volunteersupport/</value>
</prop>
+ <prop oor:name="PrivacyPolicyURL" oor:type="xs:string">
+ <value>${PRIVACY_POLICY_URL}</value>
+ </prop>
</node>
<node oor:name="Forms">
<node oor:name="ControlLayout">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 908decfc99e0..56954ead6ffb 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2146,6 +2146,11 @@
<desc>Specifies the URL used for Install Java message box.</desc>
</info>
</prop>
+ <prop oor:name="PrivacyPolicyURL" oor:type="xs:string" oor:nillable="false">
+ <info>
+ <desc>Specifies the URL for a privacy policy.</desc>
+ </info>
+ </prop>
</group>
<group oor:name="History">
<!-- OldLocation: soffice.ini -->
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 57b3ef1221a4..16d0d801c4e9 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -562,6 +562,7 @@ postprocess_main_SED := \
-e 's,$${STARTCENTER_TEMPLREP_URL},http://templates.libreoffice.org/,g' \
-e 's,$${SYSTEM_LIBEXTTEXTCAT_DATA},$(SYSTEM_LIBEXTTEXTCAT_DATA),g' \
-e 's,$${SYSTEM_LIBNUMBERTEXT_DATA},$(SYSTEM_LIBNUMBERTEXT_DATA),g' \
+ -e 's,$${PRIVACY_POLICY_URL},$(PRIVACY_POLICY_URL),g' \
$(call gb_XcdTarget_get_target,main.xcd) \
: $(BUILDDIR)/config_host.mk.stamp \
diff --git a/svx/source/dialog/crashreportdlg.cxx b/svx/source/dialog/crashreportdlg.cxx
index 2845541d0b78..33c879866cfd 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -12,6 +12,9 @@
#include <desktop/crashreport.hxx>
#include <sfx2/safemode.hxx>
#include <comphelper/processfactory.hxx>
+#include <i18nlangtag/languagetag.hxx>
+#include <unotools/configmgr.hxx>
+#include <officecfg/Office/Common.hxx>
#include <com/sun/star/task/OfficeRestartManager.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
@@ -25,6 +28,7 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent)
, mxEditPostUpload(m_xBuilder->weld_text_view("ed_post"))
, mxFtBugReport(m_xBuilder->weld_text_view("ed_bugreport"))
, mxCBSafeMode(m_xBuilder->weld_check_button("check_safemode"))
+ , mxPrivacyPolicyButton(m_xBuilder->weld_link_button("btnPrivacyPolicy"))
{
maSuccessMsg = mxEditPostUpload->get_text();
@@ -36,6 +40,11 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent)
mxBtnSend->connect_clicked(LINK(this, CrashReportDialog, BtnHdl));
mxBtnCancel->connect_clicked(LINK(this, CrashReportDialog, BtnHdl));
mxBtnClose->connect_clicked(LINK(this, CrashReportDialog, BtnHdl));
+
+ mxPrivacyPolicyButton->set_uri(
+ officecfg::Office::Common::Menus::PrivacyPolicyURL::get()
+ + "?type=crashreport&LOvers=" + utl::ConfigManager::getProductVersion()
+ + "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47());
}
CrashReportDialog::~CrashReportDialog() {}
diff --git a/svx/source/dialog/crashreportdlg.hxx b/svx/source/dialog/crashreportdlg.hxx
index f913cabac43f..868f86c58e68 100644
--- a/svx/source/dialog/crashreportdlg.hxx
+++ b/svx/source/dialog/crashreportdlg.hxx
@@ -27,6 +27,7 @@ private:
std::unique_ptr<weld::TextView> mxEditPostUpload;
std::unique_ptr<weld::TextView> mxFtBugReport;
std::unique_ptr<weld::CheckButton> mxCBSafeMode;
+ std::unique_ptr<weld::LinkButton> mxPrivacyPolicyButton;
OUString maSuccessMsg;
diff --git a/svx/uiconfig/ui/crashreportdlg.ui b/svx/uiconfig/ui/crashreportdlg.ui
index 98779d897820..3b661706ca31 100644
--- a/svx/uiconfig/ui/crashreportdlg.ui
+++ b/svx/uiconfig/ui/crashreportdlg.ui
@@ -75,7 +75,7 @@ Thank you for your help in improving %PRODUCTNAME.</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
<child>
@@ -139,6 +139,20 @@ You can help us to fix this issue by sending an anonymous crash report to the %P
<property name="position">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkLinkButton" id="btnPrivacyPolicy">
+ <property name="label" translatable="yes" context="crashreportdlg|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">4</property>
+ </packing>
+ </child>
</object>
</child>
<child type="titlebar">
More information about the Libreoffice-commits
mailing list