diff options
-rw-r--r-- | cui/source/customize/acccfg.cxx | 8 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 2 | ||||
-rw-r--r-- | cui/source/inc/acccfg.hxx | 5 | ||||
-rw-r--r-- | cui/source/inc/cfgutil.hxx | 5 | ||||
-rw-r--r-- | filter/source/msfilter/msvbahelper.cxx | 4 | ||||
-rw-r--r-- | include/sfx2/minfitem.hxx | 7 | ||||
-rw-r--r-- | sfx2/source/control/minfitem.cxx | 4 |
7 files changed, 31 insertions, 4 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); }; diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index 3f28fb1385ff..d682eb954e85 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -224,6 +224,8 @@ static bool hasMacro( SfxObjectShell const * pShell, const OUString& sLibrary, O #endif +#if HAVE_FEATURE_SCRIPTING + OUString getDefaultProjectName( SfxObjectShell const * pShell ) { OUString aPrjName; @@ -236,8 +238,6 @@ OUString getDefaultProjectName( SfxObjectShell const * pShell ) return aPrjName; } -#if HAVE_FEATURE_SCRIPTING - static void parseMacro( const OUString& sMacro, OUString& sContainer, OUString& sModule, OUString& sProcedure ) { sal_Int32 nMacroDot = sMacro.lastIndexOf( '.' ); diff --git a/include/sfx2/minfitem.hxx b/include/sfx2/minfitem.hxx index 6a3eb5a65738..ce6f8b25a3dc 100644 --- a/include/sfx2/minfitem.hxx +++ b/include/sfx2/minfitem.hxx @@ -16,13 +16,16 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SFX2_MINFITEM_HXX -#define INCLUDED_SFX2_MINFITEM_HXX + +#pragma once #include <rtl/ustring.hxx> #include <sal/config.h> #include <sfx2/dllapi.h> #include <svl/poolitem.hxx> +#include <config_features.h> + +#if HAVE_FEATURE_SCRIPTING class BasicManager; diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx index e14b827bdbf2..8d8f0a80ac30 100644 --- a/sfx2/source/control/minfitem.cxx +++ b/sfx2/source/control/minfitem.cxx @@ -19,6 +19,9 @@ #include <sfx2/minfitem.hxx> #include <sal/log.hxx> +#include <config_features.h> + +#if HAVE_FEATURE_SCRIPTING SfxPoolItem* SfxMacroInfoItem::CreateDefault() { SAL_WARN( "sfx", "No SfxMacroInfItem factory available"); return nullptr; } @@ -67,5 +70,6 @@ OUString SfxMacroInfoItem::GetQualifiedName() const return aMacroName; } +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |