officecfg/Configuration_officecfg.mk                         |    1 
 officecfg/registry/data/org/openoffice/Office/UI/Infobar.xcu |   17 +++++++++++
 postprocess/CustomTarget_registry.mk                         |    4 ++
 solenv/bin/macosx-codesign-app-bundle                        |    3 +
 4 files changed, 25 insertions(+)

New commits:
commit 0161672546a07a17ab99deebf1f816e0daa8fae0
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Thu Jul 14 10:28:09 2022 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Sat Jul 16 09:57:32 2022 +0200

    macOS sandbox: disable donation info bar & help entries
    
    even when you are a verified non-profit, you still cannot just point to
    a donation site/you still would have to offer apple-pay...
    
    the helpmenu one is ugly since it changes the endresult compared to
    what is assembled in instdir, but is the least intrusive way for now...
    
    Change-Id: Id348d69371048bdd04d2961cad564fc73f11fd45
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137050
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    (cherry picked from commit 8eb09d4062c34bd4735d1988feda4564d0fa4c7d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137062
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/officecfg/Configuration_officecfg.mk 
b/officecfg/Configuration_officecfg.mk
index dc8802628451..89a8a57504e9 100644
--- a/officecfg/Configuration_officecfg.mk
+++ b/officecfg/Configuration_officecfg.mk
@@ -118,6 +118,7 @@ $(eval $(call 
gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
                org/openoffice/Office/UI/WriterWindowState-librelogo.xcu \
        ) \
        org/openoffice/Office/UI/Controller-reportbuilder.xcu \
+       org/openoffice/Office/UI/Infobar-macosxsandbox.xcu \
        org/openoffice/TypeDetection/UISort-writer.xcu \
        org/openoffice/TypeDetection/UISort-calc.xcu \
        org/openoffice/TypeDetection/UISort-draw.xcu \
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Infobar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Infobar.xcu
new file mode 100644
index 000000000000..109e2198d408
--- /dev/null
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Infobar.xcu
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+<!DOCTYPE oor:component-data SYSTEM "../../../../../component-update.dtd">
+<oor:component-data oor:name="Infobar" oor:package="org.openoffice.Office.UI" 
xmlns:install="http://openoffice.org/2004/installation"; 
xmlns:oor="http://openoffice.org/2001/registry"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+  <node oor:name="Enabled" install:module="macosxsandbox">
+    <prop oor:name="Donate">
+      <value>false</value>
+    </prop>
+  </node>
+</oor:component-data>
diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index fa30e33ae0c7..9e7fbb1398ae 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -306,6 +306,10 @@ ifneq ($(WITH_WEBDAV),)
 postprocess_FILES_main += 
$(postprocess_MOD)/org/openoffice/ucb/Configuration-webdav.xcu
 endif
 
+ifneq ($(ENABLE_MACOSX_SANDBOX),)
+postprocess_FILES_main += 
$(postprocess_MOD)/org/openoffice/Office/UI/Infobar-macosxsandbox.xcu
+endif
+
 ifneq (,$(SYSTEM_LIBEXTTEXTCAT_DATA))
 postprocess_FILES_main += 
$(postprocess_MOD)/org/openoffice/Office/Paths-externallibexttextcatdata.xcu
 else
diff --git a/solenv/bin/macosx-codesign-app-bundle 
b/solenv/bin/macosx-codesign-app-bundle
index b79c3d8003b3..a29b339de744 100755
--- a/solenv/bin/macosx-codesign-app-bundle
+++ b/solenv/bin/macosx-codesign-app-bundle
@@ -31,6 +31,9 @@ if test -n "$ENABLE_MACOSX_SANDBOX"; then
     # All data files are in Resources and included in the app bundle signature
     # through that. I think.
     other_files=''
+    # HACK: remove donate menu entries, need to support apple-pay and be 
verified
+    # as non profit as a bare minimum to allow asking....
+    sed -I "" -e '\#<menu:menuitem menu:id=".uno:Donation"/>#d' 
$APP_BUNDLE/Contents/Resources/config/soffice.cfg/modules/*/menubar/menubar.xml
 else
     # We then want to sign data files, too, hmm.
     entitlements="--entitlements $BUILDDIR/hardened_runtime.xcent"

Reply via email to