[Libreoffice-commits] core.git: Branch 'feature/wasm' - config_host.mk.in cui/Library_cui.mk cui/source RepositoryExternal.mk solenv/gbuild writerperfect/Library_wpftwriter.mk writerperfect/source

Armin Le Grand (Allotropia) (via logerrit) logerrit at kemper.freedesktop.org
Tue May 25 16:48:40 UTC 2021


 RepositoryExternal.mk                                      |    2 
 config_host.mk.in                                          |    1 
 cui/Library_cui.mk                                         |    2 
 cui/source/factory/dlgfact.cxx                             |    2 
 cui/source/factory/dlgfact.hxx                             |    2 
 solenv/gbuild/gbuild.mk                                    |    1 
 writerperfect/Library_wpftwriter.mk                        |   11 ++
 writerperfect/source/writer/wpftwriter.component           |   30 -------
 writerperfect/source/writer/wpftwriter.extended2.component |   51 +++++++++++++
 9 files changed, 67 insertions(+), 35 deletions(-)

New commits:
commit bfee2970a79e10c72978598b53e032719cccdb07
Author:     Armin Le Grand (Allotropia) <Armin.Le.Grand at me.com>
AuthorDate: Tue May 25 18:47:54 2021 +0200
Commit:     Armin Le Grand (Allotropia) <Armin.Le.Grand at me.com>
CommitDate: Tue May 25 18:47:54 2021 +0200

    Wasm strip some SW exports & corrections
    
    Change-Id: I4dae3fc978d082215e780a371e0442d6f3687237

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 7fe8b624d4ef..9750e4026b45 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -577,7 +577,7 @@ $(call gb_ExternalProject_use_external_project,$(1),hunspell)
 
 endef
 
-endif # ENABLE_WASM_STRIP_EXTRA
+endif # ENABLE_WASM_STRIP_HUNSPELL
 endif # SYSTEM_HUNSPELL
 
 
diff --git a/config_host.mk.in b/config_host.mk.in
index 5a17772744d4..a885166aa226 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -217,6 +217,7 @@ export ENABLE_WASM_STRIP_LOCALES=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_GUESSLANG=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_HUNSPELL=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_PREMULTIPLY=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_SWEXPORTS=@ENABLE_WASM_STRIP@
 export ENABLE_WERROR=@ENABLE_WERROR@
 export ENDIANNESS=@ENDIANNESS@
 export EPM=@EPM@
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index dda524c97c41..5c7a68051439 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -99,7 +99,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 ))
 endif
 
-ifneq ($(ENABLE_WASM_STRIP_EXTRA),TRUE)
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
 $(eval $(call gb_Library_add_exception_objects,cui,\
     cui/source/dialogs/hyphen \
 ))
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 7c1dce6e2e35..eb697277b936 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1081,7 +1081,7 @@ VclPtr<AbstractThesaurusDialog> AbstractDialogFactory_Impl::CreateThesaurusDialo
     return VclPtr<AbstractThesaurusDialog_Impl>::Create(std::make_shared<SvxThesaurusDialog>(pParent, xThesaurus, rWord, nLanguage));
 }
 
-#ifndef ENABLE_WASM_STRIP_EXTRA
+#ifndef ENABLE_WASM_STRIP_HUNSPELL
 VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDialog(weld::Widget* pParent,
                                                 const OUString &rWord, LanguageType nLang,
                                                 css::uno::Reference< css::linguistic2::XHyphenator >  &xHyphen,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 9e1475b74fce..102c1b9d8fd3 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -798,7 +798,7 @@ public:
                                                 css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus,
                                                 const OUString &rWord, LanguageType nLanguage) override;
 
-#ifndef ENABLE_WASM_STRIP_EXTRA
+#ifndef ENABLE_WASM_STRIP_HUNSPELL
     virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog(weld::Widget*,
                                                 const OUString &rWord, LanguageType nLang,
                                                 css::uno::Reference< css::linguistic2::XHyphenator >  &xHyphen,
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 2acbc0e73d07..e96168f52cc4 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -238,6 +238,7 @@ gb_GLOBALDEFS += -DENABLE_WASM_STRIP_LOCALES
 gb_GLOBALDEFS += -DENABLE_WASM_STRIP_GUESSLANG
 gb_GLOBALDEFS += -DENABLE_WASM_STRIP_HUNSPELL
 gb_GLOBALDEFS += -DENABLE_WASM_STRIP_PREMULTIPLY
+gb_GLOBALDEFS += -DENABLE_WASM_STRIP_SWEXPORTS
 endif
 
 ifeq ($(gb_ENABLE_DBGUTIL),$(true))
diff --git a/writerperfect/Library_wpftwriter.mk b/writerperfect/Library_wpftwriter.mk
index 516e96770c3c..90ffa4b5cd56 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -30,6 +30,10 @@ ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE)
 $(eval $(call gb_Library_set_componentfile,wpftwriter,writerperfect/source/writer/wpftwriter.extended))
 endif
 
+ifneq ($(ENABLE_WASM_STRIP_SWEXPORTS),TRUE)
+$(eval $(call gb_Library_set_componentfile,wpftwriter,writerperfect/source/writer/wpftwriter.extended2))
+endif
+
 $(eval $(call gb_Library_use_sdk_api,wpftwriter))
 
 $(eval $(call gb_Library_use_common_precompiled_header,wpftwriter))
@@ -89,14 +93,19 @@ $(eval $(call gb_Library_add_exception_objects,wpftwriter,\
 ))
 endif
 
+ifneq ($(ENABLE_WASM_STRIP_SWEXPORTS),TRUE)
 $(eval $(call gb_Library_add_exception_objects,wpftwriter,\
 	writerperfect/source/writer/AbiWordImportFilter \
 	writerperfect/source/writer/EBookImportFilter \
 	writerperfect/source/writer/MSWorksImportFilter \
 	writerperfect/source/writer/MWAWImportFilter \
 	writerperfect/source/writer/PagesImportFilter \
-	writerperfect/source/writer/StarOfficeWriterImportFilter \
 	writerperfect/source/writer/WordPerfectImportFilter \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,wpftwriter,\
+	writerperfect/source/writer/StarOfficeWriterImportFilter \
 	writerperfect/source/writer/exp/XMLBase64ImportContext \
 	writerperfect/source/writer/exp/XMLFootnoteImportContext \
 	writerperfect/source/writer/exp/XMLSectionContext \
diff --git a/writerperfect/source/writer/wpftwriter.component b/writerperfect/source/writer/wpftwriter.component
index ace6b687363c..819e873f0921 100644
--- a/writerperfect/source/writer/wpftwriter.component
+++ b/writerperfect/source/writer/wpftwriter.component
@@ -18,36 +18,6 @@
 -->
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
     xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.Writer.AbiWordImportFilter"
-      constructor="com_sun_star_comp_Writer_AbiWordImportFilter_get_implementation">
-    <service name="com.sun.star.document.ImportFilter"/>
-    <service name="com.sun.star.document.ExtendedTypeDetection"/>
-  </implementation>
-  <implementation name="com.sun.star.comp.Writer.MSWorksImportFilter"
-      constructor="com_sun_star_comp_Writer_MSWorksImportFilter_get_implementation">
-    <service name="com.sun.star.document.ImportFilter"/>
-    <service name="com.sun.star.document.ExtendedTypeDetection"/>
-  </implementation>
-  <implementation name="com.sun.star.comp.Writer.MWAWImportFilter"
-      constructor="com_sun_star_comp_Writer_MWAWImportFilter_get_implementation">
-    <service name="com.sun.star.document.ImportFilter"/>
-    <service name="com.sun.star.document.ExtendedTypeDetection"/>
-  </implementation>
-  <implementation name="com.sun.star.comp.Writer.WordPerfectImportFilter"
-      constructor="com_sun_star_comp_Writer_WordPerfectImportFilter_get_implementation">
-    <service name="com.sun.star.document.ExtendedTypeDetection"/>
-    <service name="com.sun.star.document.ImportFilter"/>
-  </implementation>
-  <implementation name="org.libreoffice.comp.Writer.EBookImportFilter"
-      constructor="org_libreoffice_comp_Writer_EBookImportFilter_get_implementation">
-    <service name="com.sun.star.document.ExtendedTypeDetection"/>
-    <service name="com.sun.star.document.ImportFilter"/>
-  </implementation>
-  <implementation name="org.libreoffice.comp.Writer.PagesImportFilter"
-      constructor="org_libreoffice_comp_Writer_PagesImportFilter_get_implementation">
-    <service name="com.sun.star.document.ExtendedTypeDetection"/>
-    <service name="com.sun.star.document.ImportFilter"/>
-  </implementation>
   <implementation name="org.libreoffice.comp.Writer.StarOfficeWriterImportFilter"
       constructor="org_libreoffice_comp_Writer_StarOfficeWriterImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
diff --git a/writerperfect/source/writer/wpftwriter.extended2.component b/writerperfect/source/writer/wpftwriter.extended2.component
new file mode 100644
index 000000000000..4c5f37fa4ceb
--- /dev/null
+++ b/writerperfect/source/writer/wpftwriter.extended2.component
@@ -0,0 +1,51 @@
+<?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.Writer.AbiWordImportFilter"
+      constructor="com_sun_star_comp_Writer_AbiWordImportFilter_get_implementation">
+    <service name="com.sun.star.document.ImportFilter"/>
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+  </implementation>
+  <implementation name="com.sun.star.comp.Writer.MSWorksImportFilter"
+      constructor="com_sun_star_comp_Writer_MSWorksImportFilter_get_implementation">
+    <service name="com.sun.star.document.ImportFilter"/>
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+  </implementation>
+  <implementation name="com.sun.star.comp.Writer.MWAWImportFilter"
+      constructor="com_sun_star_comp_Writer_MWAWImportFilter_get_implementation">
+    <service name="com.sun.star.document.ImportFilter"/>
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+  </implementation>
+  <implementation name="com.sun.star.comp.Writer.WordPerfectImportFilter"
+      constructor="com_sun_star_comp_Writer_WordPerfectImportFilter_get_implementation">
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+    <service name="com.sun.star.document.ImportFilter"/>
+  </implementation>
+  <implementation name="org.libreoffice.comp.Writer.EBookImportFilter"
+      constructor="org_libreoffice_comp_Writer_EBookImportFilter_get_implementation">
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+    <service name="com.sun.star.document.ImportFilter"/>
+  </implementation>
+  <implementation name="org.libreoffice.comp.Writer.PagesImportFilter"
+      constructor="org_libreoffice_comp_Writer_PagesImportFilter_get_implementation">
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+    <service name="com.sun.star.document.ImportFilter"/>
+  </implementation>
+</component>


More information about the Libreoffice-commits mailing list