linguistic/Library_lng.mk | 4 ++-- sw/Library_sw.mk | 2 +- sw/Library_swui.mk | 2 +- sw/source/ui/dialog/swdlgfact.cxx | 11 +++++++++++ sw/source/uibase/shells/textsh1.cxx | 5 +++++ 5 files changed, 20 insertions(+), 4 deletions(-)
New commits: commit ab01462192ac5b11c91e898e4af475ea088042f3 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Nov 8 14:28:26 2022 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Nov 28 15:32:47 2022 +0100 WASM linguistic,sw: disable curl-using deepl code Curl is currently not built - not sure if possible at all. So disable new feature added in commit e20d2de7836da52dbf9e528d1043b1e188097bfd Change-Id: Idb5d97792d59c850bc1d38a08b79d1be8cb92cdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143388 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/linguistic/Library_lng.mk b/linguistic/Library_lng.mk index 6ac44d7770b8..49c37b807685 100644 --- a/linguistic/Library_lng.mk +++ b/linguistic/Library_lng.mk @@ -51,7 +51,7 @@ $(eval $(call gb_Library_use_externals,lng,\ boost_headers \ icuuc \ icu_headers \ - curl \ + $(if $(ENABLE_CURL),curl) \ )) $(eval $(call gb_Library_add_exception_objects,lng,\ @@ -73,7 +73,7 @@ $(eval $(call gb_Library_add_exception_objects,lng,\ linguistic/source/spelldsp \ linguistic/source/spelldta \ linguistic/source/thesdsp \ - linguistic/source/translate \ + $(if $(ENABLE_CURL),linguistic/source/translate) \ )) # vim: set noet sw=4 ts=4: diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index 0e6c2679cb66..9c0b6d268e60 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -696,7 +696,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/uibase/shells/grfsh \ sw/source/uibase/shells/grfshex \ sw/source/uibase/shells/langhelper \ - sw/source/uibase/shells/translatehelper \ + $(if $(ENABLE_CURL),sw/source/uibase/shells/translatehelper) \ sw/source/uibase/shells/listsh \ sw/source/uibase/shells/mediash \ sw/source/uibase/shells/navsh \ diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk index 8e9222d97cc1..7228dca1cd7e 100644 --- a/sw/Library_swui.mk +++ b/sw/Library_swui.mk @@ -153,7 +153,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\ sw/source/ui/misc/pgfnote \ sw/source/ui/misc/pggrid \ sw/source/ui/misc/srtdlg \ - sw/source/ui/misc/translatelangselect \ + $(if $(ENABLE_CURL),sw/source/ui/misc/translatelangselect) \ sw/source/ui/misc/swmodalredlineacceptdlg \ sw/source/ui/misc/titlepage \ sw/source/ui/table/colwd \ diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 56bce661390d..a21b6e60b70a 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -19,6 +19,7 @@ #include <config_features.h> #include <config_fuzzers.h> +#include <config_wasm_strip.h> #include "swdlgfact.hxx" #include <svl/style.hxx> @@ -824,8 +825,12 @@ sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const std::optional<SwLanguageListItem> AbstractSwTranslateLangSelectDlg_Impl::GetSelectedLanguage() { +#if !ENABLE_WASM_STRIP_EXTRA SwTranslateLangSelectDlg* pDlg = dynamic_cast<SwTranslateLangSelectDlg*>(m_xDlg.get()); return pDlg->GetSelectedLanguage(); +#else + return {}; +#endif } VclPtr<AbstractSwInsertAbstractDlg> SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg(weld::Window* pParent) @@ -889,7 +894,13 @@ std::shared_ptr<AbstractSwBreakDlg> SwAbstractDialogFactory_Impl::CreateSwBreakD std::shared_ptr<AbstractSwTranslateLangSelectDlg> SwAbstractDialogFactory_Impl::CreateSwTranslateLangSelectDlg(weld::Window* pParent, SwWrtShell &rSh) { +#if !ENABLE_WASM_STRIP_EXTRA return std::make_shared<AbstractSwTranslateLangSelectDlg_Impl>(std::make_unique<SwTranslateLangSelectDlg>(pParent, rSh)); +#else + (void) pParent; + (void) rSh; + return nullptr; +#endif } VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& rVw) diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index b38748039bc9..b4fba6972fbe 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -103,9 +103,12 @@ #include <bookmark.hxx> #include <linguistic/misc.hxx> #include <authfld.hxx> +#include <config_wasm_strip.h> +#if !ENABLE_WASM_STRIP_EXTRA #include <translatelangselect.hxx> #include <svtools/deeplcfg.hxx> #include <translatehelper.hxx> +#endif // ENABLE_WASM_STRIP_EXTRA using namespace ::com::sun::star; using namespace com::sun::star::beans; @@ -1491,6 +1494,7 @@ void SwTextShell::Execute(SfxRequest &rReq) break; case SID_FM_TRANSLATE: { +#if !ENABLE_WASM_STRIP_EXTRA const SfxPoolItem* pTargetLangStringItem = nullptr; if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TARGETLANG_STR, false, &pTargetLangStringItem)) { @@ -1513,6 +1517,7 @@ void SwTextShell::Execute(SfxRequest &rReq) std::shared_ptr<weld::DialogController> pDialogController(pAbstractDialog->getDialogController()); weld::DialogController::runAsync(pDialogController, [] (sal_Int32 /*nResult*/) { }); } +#endif // ENABLE_WASM_STRIP_EXTRA } break; case SID_SPELLCHECK_IGNORE: