diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-11-08 14:28:26 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-11-28 15:32:47 +0100 |
commit | ab01462192ac5b11c91e898e4af475ea088042f3 (patch) | |
tree | 7aa2df1179f6ff59ede625ff55797a9134b06916 /sw | |
parent | 7ea19dd9086c9afe1a044716ca7f9643442a846c (diff) |
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.stahl@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/Library_sw.mk | 2 | ||||
-rw-r--r-- | sw/Library_swui.mk | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 11 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 5 |
4 files changed, 18 insertions, 2 deletions
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: |