summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--solenv/bin/createcomponent.xslt11
-rw-r--r--solenv/gbuild/ComponentTarget.mk3
-rw-r--r--solenv/gbuild/Library.mk6
-rw-r--r--svx/Library_svx.mk5
-rw-r--r--svx/util/crashreport.component26
-rw-r--r--svx/util/svx.component5
-rw-r--r--sw/Library_sw.mk5
-rw-r--r--sw/util/sw.component10
-rw-r--r--sw/util/sw_mm.component29
9 files changed, 30 insertions, 70 deletions
diff --git a/solenv/bin/createcomponent.xslt b/solenv/bin/createcomponent.xslt
index 4e20a2db1901..d33641cc62fa 100644
--- a/solenv/bin/createcomponent.xslt
+++ b/solenv/bin/createcomponent.xslt
@@ -23,6 +23,7 @@
xmlns:uc="http://openoffice.org/2010/uno-components">
<xsl:param name="uri"/>
<xsl:param name="cppu_env"/>
+ <xsl:param name="features"/>
<xsl:strip-space elements="*"/>
<xsl:template match="uc:component">
<components>
@@ -35,6 +36,15 @@
</xsl:copy>
</components>
</xsl:template>
+ <xsl:template match="uc:implementation[@CONDITION]">
+ <xsl:variable name="feature" select="concat('(',@CONDITION,')')"/>
+ <xsl:if test="contains($features,$feature)">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:if>
+ </xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates select="@*"/>
@@ -50,6 +60,7 @@
</xsl:call-template>
</xsl:attribute>
</xsl:template>
+ <xsl:template match="@CONDITION"/>
<xsl:template match="@*">
<xsl:copy/>
</xsl:template>
diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
index 8aef599dc59a..8c4ef55bbad1 100644
--- a/solenv/gbuild/ComponentTarget.mk
+++ b/solenv/gbuild/ComponentTarget.mk
@@ -32,7 +32,8 @@ $(if $(LIBFILENAME),,$(call gb_Output_error,No LIBFILENAME set at component targ
mkdir -p $(dir $(1)) && \
$(call gb_ExternalExecutable_get_command,xsltproc) --nonet \
--stringparam uri '$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(subst \d,$$,$(COMPONENTPREFIX)))$(LIBFILENAME)' \
- --stringparam cppu_env $(CPPU_ENV) -o $(1) \
+ --stringparam cppu_env $(CPPU_ENV) \
+ --stringparam features '$(patsubst %,(BUILD_TYPE:%),$(BUILD_TYPE))' -o $(1) \
$(gb_ComponentTarget_XSLTCOMMANDFILE) $(COMPONENTSOURCE)
endef
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index df42c047f846..19d77bcd29ff 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -148,12 +148,6 @@ $(call gb_Library_get_clean_target,$(gb_Library__get_name)) : \
endef
-# call gb_Library_set_componentfiles,library,componentfiles,rdb
-define gb_Library_set_componentfiles
-$(foreach comp,$(2),$(call gb_Library_set_componentfile,$(1),$(comp),$(3)))
-
-endef
-
gb_Library__get_name = $(if $(filter $(1),$(gb_MERGEDLIBS)),merged,$(1))
gb_Library__get_componentprefix = \
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index c11aac85071c..efb5a6e1b031 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -19,10 +19,7 @@
$(eval $(call gb_Library_Library,svx))
-$(eval $(call gb_Library_set_componentfiles,svx, \
- $(call gb_Helper_optional,BREAKPAD,svx/util/crashreport) \
- svx/util/svx \
-,services))
+$(eval $(call gb_Library_set_componentfile,svx,svx/util/svx,services))
$(eval $(call gb_Library_set_include,svx,\
-I$(SRCDIR)/svx/inc \
diff --git a/svx/util/crashreport.component b/svx/util/crashreport.component
deleted file mode 100644
index 7d3dddf366aa..000000000000
--- a/svx/util/crashreport.component
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- -->
-
-<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.svx.CrashReportUI"
- constructor="com_sun_star_comp_svx_CrashReportUI_get_implementation">
- <service name="com.sun.star.dialog.CrashReportUI"/>
- </implementation>
-</component>
diff --git a/svx/util/svx.component b/svx/util/svx.component
index 97f68c4734c8..9fffed787719 100644
--- a/svx/util/svx.component
+++ b/svx/util/svx.component
@@ -32,6 +32,11 @@
constructor="com_sun_star_comp_svx_RecoveryUI_get_implementation">
<service name="com.sun.star.dialog.RecoveryUI"/>
</implementation>
+ <implementation name="com.sun.star.comp.svx.CrashReportUI"
+ constructor="com_sun_star_comp_svx_CrashReportUI_get_implementation"
+ CONDITION="BUILD_TYPE:BREAKPAD">
+ <service name="com.sun.star.dialog.CrashReportUI"/>
+ </implementation>
<implementation name="com.sun.star.comp.svx.SafeModeUI"
constructor="com_sun_star_comp_svx_SafeModeUI_get_implementation">
<service name="com.sun.star.dialog.SafeModeUI"/>
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 7ff8190b8858..6989bce49cea 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -21,10 +21,7 @@ $(eval $(call gb_Library_Library,sw))
$(eval $(call gb_Library_add_sdi_headers,sw,sw/sdi/swslots))
-$(eval $(call gb_Library_set_componentfiles,sw, \
- $(call gb_Helper_optional,DBCONNECTIVITY,sw/util/sw_mm) \
- sw/util/sw \
-,services))
+$(eval $(call gb_Library_set_componentfile,sw,sw/util/sw,services))
$(eval $(call gb_Library_set_precompiled_header,sw,sw/inc/pch/precompiled_sw))
diff --git a/sw/util/sw.component b/sw/util/sw.component
index 594c43cc68b1..a36eaee795a8 100644
--- a/sw/util/sw.component
+++ b/sw/util/sw.component
@@ -39,6 +39,16 @@
<service name="com.sun.star.sdb.DataAccessDescriptor"/>
<service name="com.sun.star.text.MailMerge"/>
</implementation>
+ <implementation name="lo.writer.MMCurrentEntryController"
+ constructor="lo_writer_MMCurrentEntryController_get_implementation"
+ CONDITION="BUILD_TYPE:DBCONNECTIVITY">
+ <service name="com.sun.star.frame.ToolbarController"/>
+ </implementation>
+ <implementation name="lo.writer.MMExcludeEntryController"
+ constructor="lo_writer_MMExcludeEntryController_get_implementation"
+ CONDITION="BUILD_TYPE:DBCONNECTIVITY">
+ <service name="com.sun.star.frame.ToolbarController"/>
+ </implementation>
<implementation name="lo.writer.PageSizeToolBoxControl"
constructor="lo_writer_PageSizeToolBoxControl_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
diff --git a/sw/util/sw_mm.component b/sw/util/sw_mm.component
deleted file mode 100644
index 701064e97c78..000000000000
--- a/sw/util/sw_mm.component
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- -->
-<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="lo.writer.MMCurrentEntryController"
- constructor="lo_writer_MMCurrentEntryController_get_implementation">
- <service name="com.sun.star.frame.ToolbarController"/>
- </implementation>
- <implementation name="lo.writer.MMExcludeEntryController"
- constructor="lo_writer_MMExcludeEntryController_get_implementation">
- <service name="com.sun.star.frame.ToolbarController"/>
- </implementation>
-</component>