[Libreoffice-commits] core.git: cui/source filter/source include/sfx2 sfx2/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 10 20:12:44 UTC 2021
cui/source/customize/acccfg.cxx | 8 ++++++++
cui/source/customize/cfgutil.cxx | 2 ++
cui/source/inc/acccfg.hxx | 5 +++++
cui/source/inc/cfgutil.hxx | 5 +++++
filter/source/msfilter/msvbahelper.cxx | 4 ++--
include/sfx2/minfitem.hxx | 7 +++++--
sfx2/source/control/minfitem.cxx | 4 ++++
7 files changed, 31 insertions(+), 4 deletions(-)
New commits:
commit c54da86b850e079b4d6f0249fe7c5956ed5c400a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 10 19:47:45 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 10 22:12:04 2021 +0200
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 at redhat.com>
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: */
More information about the Libreoffice-commits
mailing list