cui/Library_cui.mk | 5 +++-- cui/source/factory/dlgfact.cxx | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-)
New commits: commit d7736eb6aebbbd27d6aa5ec7b7631826e3c22f07 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Dec 3 13:17:29 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Dec 3 15:23:45 2024 +0100 fix --disable-scripting build Change-Id: I0b0113d5e3a1652280e0d84c1beba7c572ded191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177736 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> 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<AbstractMacroManagerDialog> AbstractDialogFactory_Impl::CreateMacroManagerDialog(weld::Window* pParent, const Reference<frame::XFrame>& rxFrame) { +#if HAVE_FEATURE_SCRIPTING return VclPtr<AbstractMacroManagerDialog_Impl>::Create( std::make_shared<MacroManagerDialog>(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<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog(weld::Window* pParent, const OUString& rLanguage)