From bfee2970a79e10c72978598b53e032719cccdb07 Mon Sep 17 00:00:00 2001 From: "Armin Le Grand (Allotropia)" Date: Tue, 25 May 2021 18:47:54 +0200 Subject: Wasm strip some SW exports & corrections Change-Id: I4dae3fc978d082215e780a371e0442d6f3687237 --- 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 ------------- .../source/writer/wpftwriter.extended2.component | 51 ++++++++++++++++++++++ 9 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 writerperfect/source/writer/wpftwriter.extended2.component 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 AbstractDialogFactory_Impl::CreateThesaurusDialo return VclPtr::Create(std::make_shared(pParent, xThesaurus, rWord, nLanguage)); } -#ifndef ENABLE_WASM_STRIP_EXTRA +#ifndef ENABLE_WASM_STRIP_HUNSPELL VclPtr 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 xThesaurus, const OUString &rWord, LanguageType nLanguage) override; -#ifndef ENABLE_WASM_STRIP_EXTRA +#ifndef ENABLE_WASM_STRIP_HUNSPELL virtual VclPtr 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 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit