summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-10 19:47:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-10 22:12:04 +0200
commitc54da86b850e079b4d6f0249fe7c5956ed5c400a (patch)
treeb0da769740ca4bf6d09bfa9c917e31a2986b4929 /cui
parentab0bb71280999ef7c11c341f5269ea98019fe4c3 (diff)
add some --disable-scripting fixes
Change-Id: I45f08bce8e067ead82f4c73c8150b7027c083172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120288 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/acccfg.cxx8
-rw-r--r--cui/source/customize/cfgutil.cxx2
-rw-r--r--cui/source/inc/acccfg.hxx5
-rw-r--r--cui/source/inc/cfgutil.hxx5
4 files changed, 20 insertions, 0 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index d850da88f70b..2701e7204f34 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -61,6 +61,8 @@
#include <svtools/acceleratorexecute.hxx>
#include <vcl/svapp.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <config_features.h>
+
// namespaces
using namespace css;
@@ -824,7 +826,9 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage(weld::Container* pPage,
weld::DialogController* pController,
const SfxItemSet& aSet)
: SfxTabPage(pPage, pController, "cui/ui/accelconfigpage.ui", "AccelConfigPage", &aSet)
+#if HAVE_FEATURE_SCRIPTING
, m_pMacroInfoItem()
+#endif
, aLoadAccelConfigStr(CuiResId(RID_SVXSTR_LOADACCELCONFIG))
, aSaveAccelConfigStr(CuiResId(RID_SVXSTR_SAVEACCELCONFIG))
, aFilterAllStr(SfxResId(STR_SFX_FILTERNAME_ALL))
@@ -1514,12 +1518,16 @@ void SfxAcceleratorConfigPage::Reset(const SfxItemSet* rSet)
RadioHdl(*m_xOfficeButton);
+#if HAVE_FEATURE_SCRIPTING
const SfxPoolItem* pMacroItem = nullptr;
if (SfxItemState::SET == rSet->GetItemState(SID_MACROINFO, true, &pMacroItem))
{
m_pMacroInfoItem = &dynamic_cast<const SfxMacroInfoItem&>(*pMacroItem);
m_xGroupLBox->SelectMacro(m_pMacroInfoItem);
}
+#else
+ (void)rSet;
+#endif
}
sal_Int32 SfxAcceleratorConfigPage::MapKeyCodeToPos(const vcl::KeyCode& aKey) const
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 685af57c83b7..dc6b073eea6d 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -1022,6 +1022,7 @@ IMPL_LINK(CuiConfigGroupListBox, ExpandingHdl, const weld::TreeIter&, rIter, boo
return true;
}
+#if HAVE_FEATURE_SCRIPTING
void CuiConfigGroupListBox::SelectMacro( const SfxMacroInfoItem *pItem )
{
SelectMacro( pItem->GetBasicManager()->GetName(),
@@ -1097,6 +1098,7 @@ void CuiConfigGroupListBox::SelectMacro( std::u16string_view rBasic,
}
} while (m_xTreeView->iter_next_sibling(*xIter));
}
+#endif
/*
* Implementation of SvxScriptSelectorDialog
diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index ee9e56222113..e9207d5a1add 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -28,9 +28,12 @@
#include <vcl/idle.hxx>
#include <vcl/keycod.hxx>
#include <i18nutil/searchopt.hxx>
+#include <config_features.h>
#include "cfgutil.hxx"
+#if HAVE_FEATURE_SCRIPTING
class SfxMacroInfoItem;
+#endif
class CuiConfigFunctionListBox;
class SfxAcceleratorConfigPage;
class SfxStringItem;
@@ -76,7 +79,9 @@ enum class StartFileDialogType
class SfxAcceleratorConfigPage : public SfxTabPage
{
private:
+#if HAVE_FEATURE_SCRIPTING
const SfxMacroInfoItem* m_pMacroInfoItem;
+#endif
std::unique_ptr<sfx2::FileDialogHelper> m_pFileDlg;
OUString aLoadAccelConfigStr;
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 15d82db18e8d..8040b90afa8f 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -31,10 +31,13 @@
#include <com/sun/star/script/browse/XBrowseNode.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <vcl/weld.hxx>
+#include <config_features.h>
class Button;
class SaveInData;
+#if HAVE_FEATURE_SCRIPTING
class SfxMacroInfoItem;
+#endif
struct SfxStyleInfo_Impl
{
@@ -225,8 +228,10 @@ public:
void SetFunctionListBox( CuiConfigFunctionListBox *pBox )
{ m_pFunctionListBox = pBox; }
void GroupSelected();
+#if HAVE_FEATURE_SCRIPTING
void SelectMacro(const SfxMacroInfoItem*);
void SelectMacro(std::u16string_view, const OUString&);
+#endif
void SetStylesInfo(SfxStylesInfo_Impl* pStyles);
};