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@redhat.com>
This commit is contained in:
Caolán McNamara
2021-08-06 16:04:39 +01:00
parent 030cdbc7f8
commit cc21480a25
8 changed files with 27 additions and 8 deletions

View File

@@ -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();

View File

@@ -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;
}

View File

@@ -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
}

View File

@@ -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

View File

@@ -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;

View File

@@ -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:
{

View File

@@ -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 )
{

View File

@@ -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: */