configure.ac                         |    1 +
 filter/Configuration_filter.mk       |    2 ++
 officecfg/Configuration_officecfg.mk |   32 ++++++++++++++++++++++++--------
 postprocess/CustomTarget_registry.mk |   15 +++++++++++++++
 solenv/bin/removereportbuilder.xslt  |   19 +++++++++++++++++++
 5 files changed, 61 insertions(+), 8 deletions(-)

New commits:
commit a2a9850217b3f711440283131fdfc58a9a254919
Author:     Andras Timar <[email protected]>
AuthorDate: Sun Dec 17 17:37:51 2023 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Dec 21 07:03:28 2023 +0100

    get rid of warnings when reportbuilder is not configured for build
    
    In the LOK case for example, where there is no reportbuilder, there
    were a lot of bogus warning messages at startup, confimgr complained
    that there were translations for non existing configuration nodes,
    all belonged to reportbuilder.
    
    Change-Id: I7f9cef3206bddd9e333b97ee966fb950fbb352d2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160887
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161048
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/configure.ac b/configure.ac
index e9755b9ee584..788342733d1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12974,6 +12974,7 @@ if test "$enable_report_builder" != "no" -a 
"$with_java" != "no"; then
         BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
         NEED_ANT=TRUE
     fi
+    BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
 else
     AC_MSG_RESULT([no])
     ENABLE_REPORTBUILDER=
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 8a323e83fd54..29d503c0cc33 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -307,6 +307,7 @@ $(eval $(call 
filter_Configuration_add_others,fcfg_langpack,fcfg_database_others
        frameloaders/org_openoffice_comp_dbflt_DBContentLoader2 \
 ))
 
+ifeq ($(ENABLE_REPORTBUILDER),TRUE)
 # fcfg_reportbuilder
 $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_reportbuilder_types.xcu,filter/source/config/fragments/types,\
        StarBaseReport \
@@ -317,6 +318,7 @@ $(eval $(call 
filter_Configuration_add_filters,fcfg_langpack,fcfg_reportbuilder_
        StarBaseReport \
        StarBaseReportChart \
 ))
+endif
 
 # fcfg_writer
 $(eval $(call 
filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter/source/config/fragments/types,\
diff --git a/officecfg/Configuration_officecfg.mk 
b/officecfg/Configuration_officecfg.mk
index fc5a4ed6ebe7..aa4eec7b054c 100644
--- a/officecfg/Configuration_officecfg.mk
+++ b/officecfg/Configuration_officecfg.mk
@@ -64,12 +64,16 @@ $(eval $(call 
gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
        org/openoffice/Setup-base.xcu \
        org/openoffice/Setup-math.xcu \
        org/openoffice/Setup-report.xcu \
-       org/openoffice/Setup-reportbuilder.xcu \
+       $(call gb_Helper_optional,REPORTBUILDER, \
+               org/openoffice/Setup-reportbuilder.xcu \
+       ) \
        org/openoffice/Setup-start.xcu \
        org/openoffice/UserProfile-unixdesktop.xcu \
        org/openoffice/VCL-unixdesktop.xcu \
        org/openoffice/Office/Accelerators-macosx.xcu \
-       org/openoffice/Office/Accelerators-reportbuilder.xcu \
+       $(call gb_Helper_optional,REPORTBUILDER, \
+               org/openoffice/Office/Accelerators-reportbuilder.xcu \
+       ) \
        org/openoffice/Office/Accelerators-unxwnt.xcu \
        $(call gb_Helper_optional,LIBRELOGO, \
                org/openoffice/Office/Addons-librelogo.xcu \
@@ -93,7 +97,9 @@ $(eval $(call 
gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
        org/openoffice/Office/Common-ctl.xcu \
        org/openoffice/Office/Common-ctlseqcheck.xcu \
        org/openoffice/Office/DataAccess-evoab2.xcu \
-       org/openoffice/Office/DataAccess-reportbuilder.xcu \
+       $(call gb_Helper_optional,REPORTBUILDER, \
+               org/openoffice/Office/DataAccess-reportbuilder.xcu \
+       ) \
        org/openoffice/Office/Paths-macosx.xcu \
        org/openoffice/Office/Paths-unxwnt.xcu \
        org/openoffice/Office/Paths-unixdesktop.xcu \
@@ -109,13 +115,17 @@ $(eval $(call 
gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
        org/openoffice/Office/Embedding-impress.xcu \
        org/openoffice/Office/Embedding-math.xcu \
        org/openoffice/Office/Embedding-base.xcu \
-       org/openoffice/Office/Embedding-reportbuilder.xcu \
+       $(call gb_Helper_optional,REPORTBUILDER, \
+               org/openoffice/Office/Embedding-reportbuilder.xcu \
+       ) \
        org/openoffice/Office/Embedding-writer.xcu \
        $(call gb_Helper_optional,LIBRELOGO, \
                org/openoffice/Office/UI/WriterCommands-librelogo.xcu \
                org/openoffice/Office/UI/WriterWindowState-librelogo.xcu \
        ) \
-       org/openoffice/Office/UI/Controller-reportbuilder.xcu \
+       $(call gb_Helper_optional,REPORTBUILDER, \
+               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 \
@@ -145,7 +155,9 @@ $(eval $(call 
gb_Configuration_add_localized_datas,registry,officecfg/registry/d
        org/openoffice/Office/TableWizard.xcu \
        org/openoffice/Office/UI.xcu \
        org/openoffice/Office/Embedding.xcu \
-       org/openoffice/Office/ExtendedColorScheme.xcu \
+       $(call gb_Helper_optional,REPORTBUILDER, \
+               org/openoffice/Office/ExtendedColorScheme.xcu \
+       ) \
        org/openoffice/Office/FormWizard.xcu \
        org/openoffice/Office/Writer.xcu \
        org/openoffice/Office/UI/BasicIDECommands.xcu \
@@ -160,7 +172,9 @@ $(eval $(call 
gb_Configuration_add_localized_datas,registry,officecfg/registry/d
        org/openoffice/Office/UI/DbQueryWindowState.xcu \
        org/openoffice/Office/UI/DbTableWindowState.xcu \
        org/openoffice/Office/UI/DbRelationWindowState.xcu \
-        org/openoffice/Office/UI/DbReportWindowState.xcu \
+       $(call gb_Helper_optional,REPORTBUILDER, \
+               org/openoffice/Office/UI/DbReportWindowState.xcu \
+       ) \
        org/openoffice/Office/UI/DbBrowserWindowState.xcu \
        org/openoffice/Office/UI/DbTableDataWindowState.xcu \
        org/openoffice/Office/UI/DrawImpressCommands.xcu \
@@ -172,7 +186,9 @@ $(eval $(call 
gb_Configuration_add_localized_datas,registry,officecfg/registry/d
        org/openoffice/Office/UI/DrawWindowState.xcu \
        org/openoffice/Office/UI/ImpressWindowState.xcu \
        org/openoffice/Office/UI/MathWindowState.xcu \
-       org/openoffice/Office/UI/ReportCommands.xcu \
+       $(call gb_Helper_optional,REPORTBUILDER, \
+               org/openoffice/Office/UI/ReportCommands.xcu \
+       ) \
        org/openoffice/Office/UI/Sidebar.xcu \
        org/openoffice/Office/UI/StartModuleWindowState.xcu \
        org/openoffice/Office/UI/WriterWindowState.xcu \
diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index 1e2e473e0b4d..c2f823369262 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -590,6 +590,21 @@ $(call gb_XcdTarget_get_target,main.xcd) \
        )
        $(call gb_Trace_EndRange,main,XCD)
 
+$(call gb_XcdTarget_get_target,registry_%.xcd) : \
+        | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
+       $(call gb_Output_announce,registry_$*,$(true),XCD,3)
+       $(call gb_Trace_StartRange,registry_$*,XCD)
+       $(call gb_Helper_abbreviate_dirs, \
+               mkdir -p $(dir $@) && \
+               $(call gb_ExternalExecutable_get_command,xsltproc) --nonet \
+                       $(SRCDIR)/solenv/bin/packregistry.xslt $< \
+                       $(if $(filter REPORTBUILDER,$(BUILD_TYPE)),, | \
+                       $(call gb_ExternalExecutable_get_command,xsltproc) 
--nonet \
+                       $(SRCDIR)/solenv/bin/removereportbuilder.xslt - ) \
+                       > $@ \
+       )
+       $(call gb_Trace_EndRange,$*,XCD)
+
 $(call gb_XcdTarget_get_target,%.xcd) : \
         | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
        $(call gb_Output_announce,$*,$(true),XCD,3)
diff --git a/solenv/bin/removereportbuilder.xslt 
b/solenv/bin/removereportbuilder.xslt
new file mode 100644
index 000000000000..1c2b0135feb9
--- /dev/null
+++ b/solenv/bin/removereportbuilder.xslt
@@ -0,0 +1,19 @@
+<?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/.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+       xmlns:oor="http://openoffice.org/2001/registry";>
+<xsl:template match="*">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/>
+  </xsl:copy>
+</xsl:template>
+<xsl:template match="*[@oor:name='com.sun.star.report.ReportDefinition']"/>
+</xsl:stylesheet>

Reply via email to