[Libreoffice-commits] core.git: basic/source sc/source sd/source svx/source unotest/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 6 19:16:07 UTC 2021
basic/source/inc/sbintern.hxx | 5 +++--
basic/source/runtime/methods.cxx | 8 +++++---
sc/source/ui/docshell/docsh.cxx | 3 ++-
sc/source/ui/unoobj/servuno.cxx | 3 +++
sd/source/ui/func/fuexecuteinteraction.cxx | 3 +++
sd/source/ui/slideshow/slideshowimpl.cxx | 2 ++
svx/source/form/fmscriptingenv.cxx | 3 ++-
unotest/source/cpp/bootstrapfixturebase.cxx | 8 +++++++-
8 files changed, 27 insertions(+), 8 deletions(-)
New commits:
commit cc21480a25f1a289c7dd1bc536699fcae1457fc8
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Aug 6 16:04:39 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Aug 6 21:15:31 2021 +0200
make --disable-scripting compile
Change-Id: Ie2be232e062389b74408dd9f001b1cf4db7db7d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120123
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/basic/source/inc/sbintern.hxx b/basic/source/inc/sbintern.hxx
index d4bed5bf845e..bf0439724c4f 100644
--- a/basic/source/inc/sbintern.hxx
+++ b/basic/source/inc/sbintern.hxx
@@ -23,6 +23,7 @@
#include <sbxfac.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <vcl/errcode.hxx>
+#include <config_features.h>
namespace utl
{
@@ -99,8 +100,6 @@ public:
virtual SbxObjectRef CreateObject( const OUString& ) override;
};
-
-
struct SbiGlobals
{
static SbiGlobals* pGlobals;
@@ -129,7 +128,9 @@ struct SbiGlobals
OUString aErrMsg; // buffer for GetErrorText()
std::unique_ptr<::utl::TransliterationWrapper> pTransliterationWrapper; // For StrComp
bool bBlockCompilerError;
+#if HAVE_FEATURE_SCRIPTING
std::unique_ptr<BasicManager> pAppBasMgr;
+#endif
StarBASIC* pMSOMacroRuntimLib; // Lib containing MSO Macro Runtime API entry symbols
SbiGlobals();
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 27da5fdac33d..77e1d26e4fe5 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4741,11 +4741,13 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
else
#endif
{
- if ( 0 <= nYear && nYear < 100 && (bUseTwoDigitYear
+ if ( 0 <= nYear && nYear < 100 &&
#if HAVE_FEATURE_SCRIPTING
- || SbiRuntime::isVBAEnabled()
+ (bUseTwoDigitYear || SbiRuntime::isVBAEnabled())
+#else
+ bUseTwoDigitYear
#endif
- ) )
+ )
{
nYear += 1900;
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 7a5732e0a154..5801636d3cc2 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -435,7 +435,7 @@ public:
void hide_ask() const { m_xWarningOnBox->set_visible(false); };
};
-
+#if HAVE_FEATURE_SCRIPTING
class VBAScriptListener : public ::cppu::WeakImplHelper< css::script::vba::XVBAScriptListener >
{
private:
@@ -460,6 +460,7 @@ public:
{
}
};
+#endif
}
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index ac3e93771cb1..a66050487a34 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -83,6 +83,7 @@ static bool isInVBAMode( ScDocShell& rDocSh )
namespace {
+#if HAVE_FEATURE_SCRIPTING
class ScVbaObjectForCodeNameProvider : public ::cppu::WeakImplHelper< container::XNameAccess >
{
uno::Any maWorkbook;
@@ -242,6 +243,8 @@ public:
}
};
+#endif
+
using Type = ScServiceProvider::Type;
struct ProvNamesId_Type
diff --git a/sd/source/ui/func/fuexecuteinteraction.cxx b/sd/source/ui/func/fuexecuteinteraction.cxx
index 8b037c41bed5..981fc8bac024 100644
--- a/sd/source/ui/func/fuexecuteinteraction.cxx
+++ b/sd/source/ui/func/fuexecuteinteraction.cxx
@@ -20,6 +20,7 @@
#include <fuexecuteinteraction.hxx>
#include <app.hrc>
+#include <config_features.h>
#include <avmedia/mediawindow.hxx>
#include <basic/sbstar.hxx>
#include <config_features.h>
@@ -195,6 +196,7 @@ void FuExecuteInteraction::DoExecute(SfxRequest&)
}
break;
+#if HAVE_FEATURE_SCRIPTING
case presentation::ClickAction_MACRO:
{
// Execute macro
@@ -223,6 +225,7 @@ void FuExecuteInteraction::DoExecute(SfxRequest&)
}
}
break;
+#endif
default:
break;
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index dc3b3bef239a..6e4e30ad7183 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1509,6 +1509,7 @@ void SlideshowImpl::click( const Reference< XShape >& xShape )
}
break;
+#if HAVE_FEATURE_SCRIPTING
case presentation::ClickAction_MACRO:
{
const OUString aMacro( pEvent->maStrBookmark );
@@ -1537,6 +1538,7 @@ void SlideshowImpl::click( const Reference< XShape >& xShape )
}
}
break;
+#endif
case ClickAction_VERB:
{
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 73ad3f83eceb..cdff131df959 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -793,6 +793,7 @@ namespace svxform
impl_registerOrRevoke_throw( _rxManager, false );
}
+#if HAVE_FEATURE_SCRIPTING
namespace
{
class NewStyleUNOScript
@@ -830,7 +831,7 @@ namespace svxform
m_rObjectShell.CallXScript( m_sScriptCode, _rArguments, _rSynchronousResult, aOutArgsIndex, aOutArgs, true, aCaller.hasValue() ? &aCaller : nullptr );
}
}
-
+#endif
void FormScriptingEnvironment::doFireScriptEvent( const ScriptEvent& _rEvent, Any* _pSynchronousResult )
{
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx b/unotest/source/cpp/bootstrapfixturebase.cxx
index 5c5b3bcc3a9c..aec7d4f820dd 100644
--- a/unotest/source/cpp/bootstrapfixturebase.cxx
+++ b/unotest/source/cpp/bootstrapfixturebase.cxx
@@ -12,6 +12,7 @@
#include <unotest/bootstrapfixturebase.hxx>
#include <comphelper/processfactory.hxx>
#include <basic/sbstar.hxx>
+#include <config_features.h>
using namespace ::com::sun::star;
@@ -30,6 +31,11 @@ void test::BootstrapFixtureBase::setUp()
m_xSFactory.set(m_xFactory, uno::UNO_QUERY_THROW);
}
-void test::BootstrapFixtureBase::tearDown() { StarBASIC::DetachAllDocBasicItems(); }
+void test::BootstrapFixtureBase::tearDown()
+{
+#if HAVE_FEATURE_SCRIPTING
+ StarBASIC::DetachAllDocBasicItems();
+#endif
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list