[Libreoffice-commits] core.git: Branch 'feature/wasm' - config_host.mk.in cui/Library_cui.mk cui/source editeng/source external/hunspell external/hyphen external/mythes include/editeng lingucomponent/Module_lingucomponent.mk postprocess/Rdb_services.mk RepositoryExternal.mk Repository.mk solenv/bin solenv/gbuild
Armin Le Grand (Allotropia) (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 20 16:58:20 UTC 2021
Repository.mk | 17 +++++++++++------
RepositoryExternal.mk | 2 ++
config_host.mk.in | 1 +
cui/Library_cui.mk | 7 ++++++-
cui/source/factory/dlgfact.cxx | 4 ++++
cui/source/factory/dlgfact.hxx | 4 ++++
editeng/source/misc/splwrap.cxx | 4 ++++
external/hunspell/StaticLibrary_hunspell.mk | 7 ++++++-
external/hyphen/ExternalProject_hyphen.mk | 2 ++
external/mythes/ExternalProject_mythes.mk | 2 ++
include/editeng/edtdlg.hxx | 2 ++
lingucomponent/Module_lingucomponent.mk | 7 ++++++-
postprocess/Rdb_services.mk | 11 ++++++++---
solenv/bin/native-code.py | 16 ++++++++--------
solenv/gbuild/gbuild.mk | 1 +
15 files changed, 67 insertions(+), 20 deletions(-)
New commits:
commit ec9e2c81b4ec6a1efce632a7fbc47683219582bf
Author: Armin Le Grand (Allotropia) <Armin.Le.Grand at me.com>
AuthorDate: Thu May 20 18:56:25 2021 +0200
Commit: Armin Le Grand (Allotropia) <Armin.Le.Grand at me.com>
CommitDate: Thu May 20 18:56:25 2021 +0200
Wasm remove hunspell/hyphen optionally
Change-Id: I104264202e147f7a037647b84f07647ae28f3e60
diff --git a/Repository.mk b/Repository.mk
index 700d61a2e55a..613fe92f1892 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -365,6 +365,17 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
))
endif
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+ hyphen \
+ lnth \
+ spell \
+ $(if $(filter iOS MACOSX,$(OS)), \
+ MacOSXSpell \
+ ) \
+))
+endif
+
$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
$(call gb_Helper_optional,AVMEDIA,avmedia) \
$(if $(filter MACOSX,$(OS)),\
@@ -409,7 +420,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
fwk \
i18npool \
i18nsearch \
- hyphen \
icg \
$(if $(ENABLE_JAVA),jdbc) \
$(if $(ENABLE_LDAP),ldapbe2) \
@@ -417,7 +427,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
localebe1 \
log \
lng \
- lnth \
$(if $(filter $(OS),MACOSX),macbe1) \
$(if $(MERGELIBS),merged) \
migrationoo2 \
@@ -448,7 +457,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
sfx \
slideshow \
sot \
- spell \
$(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,spl) \
storagefd \
$(call gb_Helper_optional,SCRIPTING,stringresource) \
@@ -499,9 +507,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
) \
fps_aqua \
) \
- $(if $(filter iOS MACOSX,$(OS)), \
- MacOSXSpell \
- ) \
))
$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,ooo, \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index c7c530294aa9..7fe8b624d4ef 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -549,6 +549,7 @@ endef
gb_ExternalProject__use_hunspell :=
else # !SYSTEM_HUNSPELL
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
define gb_LinkTarget__use_hunspell
$(call gb_LinkTarget_add_defs,$(1),\
@@ -576,6 +577,7 @@ $(call gb_ExternalProject_use_external_project,$(1),hunspell)
endef
+endif # ENABLE_WASM_STRIP_EXTRA
endif # SYSTEM_HUNSPELL
diff --git a/config_host.mk.in b/config_host.mk.in
index f723a6559a1e..b7075e473c60 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -215,6 +215,7 @@ export ENABLE_WASM_STRIP_UCPHELP=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_EPUB=@ENABLE_WASM_STRIP@
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_WERROR=@ENABLE_WERROR@
export ENDIANNESS=@ENDIANNESS@
export EPM=@EPM@
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 075085e659e4..dda524c97c41 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -99,6 +99,12 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
))
endif
+ifneq ($(ENABLE_WASM_STRIP_EXTRA),TRUE)
+$(eval $(call gb_Library_add_exception_objects,cui,\
+ cui/source/dialogs/hyphen \
+))
+endif
+
$(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/customize/acccfg \
cui/source/customize/cfg \
@@ -132,7 +138,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/dialogs/hlmailtp \
cui/source/dialogs/hlmarkwn \
cui/source/dialogs/hltpbase \
- cui/source/dialogs/hyphen \
cui/source/dialogs/iconcdlg \
cui/source/dialogs/insdlg \
cui/source/dialogs/insrc \
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 4b3fa290fbeb..7c1dce6e2e35 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -121,10 +121,12 @@ short AbstractFmShowColsDialog_Impl::Execute()
return m_xDlg->run();
}
+#ifndef ENABLE_WASM_STRIP_HUNSPELL
short AbstractHyphenWordDialog_Impl::Execute()
{
return m_xDlg->run();
}
+#endif
short AbstractThesaurusDialog_Impl::Execute()
{
@@ -1079,6 +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
VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDialog(weld::Widget* pParent,
const OUString &rWord, LanguageType nLang,
css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
@@ -1086,6 +1089,7 @@ VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDia
{
return VclPtr<AbstractHyphenWordDialog_Impl>::Create(std::make_unique<SvxHyphenWordDialog>(rWord, nLang, pParent, xHyphen, pWrapper));
}
+#endif
VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDialog(weld::Window* pParent)
{
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index ae4c59ce0fa7..9e1475b74fce 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -210,6 +210,7 @@ public:
virtual OUString GetWord() override;
};
+#ifndef ENABLE_WASM_STRIP_HUNSPELL
class AbstractHyphenWordDialog_Impl: public AbstractHyphenWordDialog
{
std::unique_ptr<SvxHyphenWordDialog> m_xDlg;
@@ -220,6 +221,7 @@ public:
}
virtual short Execute() override;
};
+#endif
class FmShowColsDialog;
class AbstractFmShowColsDialog_Impl : public AbstractFmShowColsDialog
@@ -796,10 +798,12 @@ public:
css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus,
const OUString &rWord, LanguageType nLanguage) override;
+#ifndef ENABLE_WASM_STRIP_EXTRA
virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog(weld::Widget*,
const OUString &rWord, LanguageType nLang,
css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper) override;
+#endif
virtual VclPtr<AbstractFmShowColsDialog> CreateFmShowColsDialog(weld::Window* pParent) override;
virtual VclPtr<AbstractSvxZoomDialog> CreateSvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) override;
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index b51c9c97b613..c3810907495c 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -249,6 +249,9 @@ void SvxSpellWrapper::InsertHyphen( const sal_Int32 )
// Testing of the document areas in the order specified by the flags
void SvxSpellWrapper::SpellDocument( )
{
+#ifdef ENABLE_WASM_STRIP_HUNSPELL
+ return;
+#else
if ( bOtherCntnt )
{
bReverse = false;
@@ -275,6 +278,7 @@ void SvxSpellWrapper::SpellDocument( )
xHyph, this ));
pDlg->Execute();
}
+#endif
}
diff --git a/external/hunspell/StaticLibrary_hunspell.mk b/external/hunspell/StaticLibrary_hunspell.mk
index 02d534f69169..3a2eccafb0aa 100644
--- a/external/hunspell/StaticLibrary_hunspell.mk
+++ b/external/hunspell/StaticLibrary_hunspell.mk
@@ -20,6 +20,12 @@ $(eval $(call gb_StaticLibrary_add_defs,hunspell,\
-DOPENOFFICEORG \
))
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\
+ UnpackedTarball/hunspell/src/hunspell/hunspell \
+))
+endif
+
$(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\
UnpackedTarball/hunspell/src/hunspell/affentry \
UnpackedTarball/hunspell/src/hunspell/affixmgr \
@@ -30,7 +36,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\
UnpackedTarball/hunspell/src/hunspell/hunzip \
UnpackedTarball/hunspell/src/hunspell/filemgr \
UnpackedTarball/hunspell/src/hunspell/replist \
- UnpackedTarball/hunspell/src/hunspell/hunspell \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/hyphen/ExternalProject_hyphen.mk b/external/hyphen/ExternalProject_hyphen.mk
index 63d167f7804b..1419c9b02890 100644
--- a/external/hyphen/ExternalProject_hyphen.mk
+++ b/external/hyphen/ExternalProject_hyphen.mk
@@ -9,7 +9,9 @@
$(eval $(call gb_ExternalProject_ExternalProject,hyphen))
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
$(eval $(call gb_ExternalProject_use_external,hyphen,hunspell))
+endif
$(eval $(call gb_ExternalProject_register_targets,hyphen,\
build \
diff --git a/external/mythes/ExternalProject_mythes.mk b/external/mythes/ExternalProject_mythes.mk
index 298607f0aa73..6a1e9b14e882 100644
--- a/external/mythes/ExternalProject_mythes.mk
+++ b/external/mythes/ExternalProject_mythes.mk
@@ -9,7 +9,9 @@
$(eval $(call gb_ExternalProject_ExternalProject,mythes))
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
$(eval $(call gb_ExternalProject_use_external,mythes,hunspell))
+endif
$(eval $(call gb_ExternalProject_register_targets,mythes,\
build \
diff --git a/include/editeng/edtdlg.hxx b/include/editeng/edtdlg.hxx
index 15b591a41ff9..0fa8a18553ba 100644
--- a/include/editeng/edtdlg.hxx
+++ b/include/editeng/edtdlg.hxx
@@ -97,10 +97,12 @@ public:
css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus,
const OUString &rWord, LanguageType nLanguage) = 0;
+#ifndef ENABLE_WASM_STRIP_HUNSPELL
virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog(weld::Widget*,
const OUString &rWord, LanguageType nLang,
css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper) = 0;
+#endif
virtual VclPtr<AbstractHangulHanjaConversionDialog> CreateHangulHanjaConversionDialog(weld::Widget* pParent) = 0;
};
diff --git a/lingucomponent/Module_lingucomponent.mk b/lingucomponent/Module_lingucomponent.mk
index 1a22d9bbf143..9f19dcedbc67 100644
--- a/lingucomponent/Module_lingucomponent.mk
+++ b/lingucomponent/Module_lingucomponent.mk
@@ -16,12 +16,17 @@ $(eval $(call gb_Module_add_targets,lingucomponent,\
))
endif
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
$(eval $(call gb_Module_add_targets,lingucomponent,\
Library_hyphen \
Library_lnth \
- $(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \
Library_spell \
StaticLibrary_ulingu \
+))
+endif
+
+$(eval $(call gb_Module_add_targets,lingucomponent,\
+ $(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \
Library_numbertext \
))
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index be2cb9d54225..9ab2d849e94e 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -103,6 +103,14 @@ $(eval $(call gb_Rdb_add_components,services,\
))
endif
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_Rdb_add_components,services,\
+ lingucomponent/source/hyphenator/hyphen/hyphen \
+ lingucomponent/source/thesaurus/libnth/lnth \
+ lingucomponent/source/spellcheck/spell/spell \
+))
+endif
+
$(eval $(call gb_Rdb_add_components,services,\
animations/source/animcore/animcore \
cui/util/cui \
@@ -123,9 +131,6 @@ $(eval $(call gb_Rdb_add_components,services,\
$(call gb_Helper_optional,DESKTOP,fpicker/source/office/fps_office) \
$(if $(filter MACOSX,$(OS)),fpicker/source/aqua/fps_aqua) \
hwpfilter/source/hwp \
- lingucomponent/source/hyphenator/hyphen/hyphen \
- lingucomponent/source/spellcheck/spell/spell \
- lingucomponent/source/thesaurus/libnth/lnth \
lingucomponent/source/numbertext/numbertext \
linguistic/source/lng \
$(if $(ENABLE_LWP), \
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index d31d7283479d..f0c94246063e 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -281,10 +281,10 @@ core_constructor_list = [
# linguistic/source/spellcheck/MacOSXSpellMacOSXSpell.component
("lingucomponent_MacSpellChecker_get_implementation", "#ifdef IOS"),
# lingucomponent/source/thesaurus/libnth/lnth.component
- "lingucomponent_Thesaurus_get_implementation",
- "lingucomponent_SpellChecker_get_implementation",
- ("lingucomponent_LangGuess_get_implementation", "#ifndef ENABLE_WASM_STRIP_GUESSLANG"),
- "lingucomponent_Hyphenator_get_implementation",
+ ("lingucomponent_Thesaurus_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"),
+ ("lingucomponent_SpellChecker_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"),
+ ("lingucomponent_LangGuess_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"),
+ ("lingucomponent_Hyphenator_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"),
# package/source/xstor/xstor.component
"package_OStorageFactory_get_implementation",
# package/util/package2.component
@@ -843,10 +843,10 @@ desktop_constructor_list = [
"framework_ToolbarsMenuController_get_implementation",
"i18npool_Collator_Unicode_get_implementation",
"IndexedPropertyValuesContainer_get_implementation",
- "lingucomponent_Hyphenator_get_implementation",
- ("lingucomponent_LangGuess_get_implementation", "#ifndef ENABLE_WASM_STRIP_GUESSLANG"),
- "lingucomponent_SpellChecker_get_implementation",
- "lingucomponent_Thesaurus_get_implementation",
+ ("lingucomponent_Hyphenator_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"),
+ ("lingucomponent_LangGuess_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"),
+ ("lingucomponent_SpellChecker_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"),
+ ("lingucomponent_Thesaurus_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"),
"linguistic_DicList_get_implementation",
"linguistic_GrammarCheckingIterator_get_implementation",
"linguistic_LinguProps_get_implementation",
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 3b3b41e575d0..34ce4023441c 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -236,6 +236,7 @@ gb_GLOBALDEFS += -DENABLE_WASM_STRIP_UCPHELP
gb_GLOBALDEFS += -DENABLE_WASM_STRIP_EPUB
gb_GLOBALDEFS += -DENABLE_WASM_STRIP_LOCALES
gb_GLOBALDEFS += -DENABLE_WASM_STRIP_GUESSLANG
+gb_GLOBALDEFS += -DENABLE_WASM_STRIP_HUNSPELL
endif
ifeq ($(gb_ENABLE_DBGUTIL),$(true))
More information about the Libreoffice-commits
mailing list