From d7736eb6aebbbd27d6aa5ec7b7631826e3c22f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 3 Dec 2024 13:17:29 +0000 Subject: [PATCH] fix --disable-scripting build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0b0113d5e3a1652280e0d84c1beba7c572ded191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177736 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- cui/Library_cui.mk | 5 +++-- cui/source/factory/dlgfact.cxx | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 4942d1548524..5745cf821341 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -32,7 +32,7 @@ $(eval $(call gb_Library_use_sdk_api,cui)) $(eval $(call gb_Library_use_libraries,cui,\ $(call gb_Helper_optional,AVMEDIA,avmedia) \ - basctl \ + $(call gb_Helper_optional,SCRIPTING,basctl) \ basegfx \ comphelper \ cppu \ @@ -148,7 +148,8 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/dialogs/GraphicTestsDialog \ cui/source/dialogs/ImageViewerDialog \ cui/source/dialogs/scriptdlg \ - cui/source/dialogs/MacroManagerDialog \ + $(call gb_Helper_optional,SCRIPTING, \ + cui/source/dialogs/MacroManagerDialog) \ cui/source/dialogs/SignatureLineDialogBase \ cui/source/dialogs/SignatureLineDialog \ cui/source/dialogs/SignSignatureLineDialog \ diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 2018878eaefa..bb1561f4803c 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1003,13 +1003,31 @@ VclPtr AbstractDialogFactory_Impl::CreateMacroManagerDialog(weld::Window* pParent, const Reference& rxFrame) { +#if HAVE_FEATURE_SCRIPTING return VclPtr::Create( std::make_shared(pParent, rxFrame)); +#else + (void)pParent; + (void)rxFrame; + return nullptr; +#endif } -OUString AbstractMacroManagerDialog_Impl::GetScriptURL() const { return m_xDlg->GetScriptURL(); } +OUString AbstractMacroManagerDialog_Impl::GetScriptURL() const +{ +#if HAVE_FEATURE_SCRIPTING + return m_xDlg->GetScriptURL(); +#else + return OUString(); +#endif +} -void AbstractMacroManagerDialog_Impl::LoadLastUsedMacro() const { m_xDlg->LoadLastUsedMacro(); } +void AbstractMacroManagerDialog_Impl::LoadLastUsedMacro() const +{ +#if HAVE_FEATURE_SCRIPTING + m_xDlg->LoadLastUsedMacro(); +#endif +} VclPtr AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog(weld::Window* pParent, const OUString& rLanguage)