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 cc6807333189d22616e6594952a13692234848c6
Author:     Andras Timar <[email protected]>
AuthorDate: Sun Dec 17 17:37:51 2023 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Mon Dec 18 08:59:46 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]>

diff --git a/configure.ac b/configure.ac
index 7ca3da5fd1be..a730528b5080 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12830,6 +12830,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 939234b1dc15..ca48917a31ba 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 89a8a57504e9..590fdfcdd98c 100644
--- a/officecfg/Configuration_officecfg.mk
+++ b/officecfg/Configuration_officecfg.mk
@@ -65,12 +65,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 \
@@ -95,7 +99,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 \
@@ -111,13 +117,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 \
@@ -147,7 +157,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 \
@@ -162,7 +174,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 \
@@ -174,7 +188,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 ac68a84b068f..bf350ebd0647 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -599,6 +599,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