diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-03-01 01:11:48 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-03-01 01:26:19 +0200 |
commit | fead7eb86f0e7e095f873f20bd6812a5bded0e74 (patch) | |
tree | cf5e68806762e3002d417463554a0ee0b28e0233 | |
parent | 6d33801b4498f5c13d2dc75588f88c22a11f455b (diff) |
Some initial DISABLE_SCRIPTING ifdefs
-rw-r--r-- | sc/source/core/data/validat.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 12 |
3 files changed, 20 insertions, 1 deletions
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index a759385c31ae..dbb3f076da52 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -292,6 +292,7 @@ sal_Bool ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput, // ist das Sbx-Objekt evtl. nicht angelegt (?) // pDocSh->GetSbxObject(); +#ifndef DISABLE_SCRIPTING // keine Sicherheitsabfrage mehr vorneweg (nur CheckMacroWarn), das passiert im CallBasic // Funktion ueber den einfachen Namen suchen, @@ -367,7 +368,7 @@ sal_Bool ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput, bRet = sal_True; bDone = sal_True; } - +#endif if ( !bDone && !pCell ) // Makro nicht gefunden (nur bei Eingabe) { //! andere Fehlermeldung, wenn gefunden, aber nicht bAllowed ?? diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index a1c1ecfc4764..454fab93c246 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2878,6 +2878,11 @@ bool ScCompiler::IsReference( const String& rName ) bool ScCompiler::IsMacro( const String& rName ) { +#ifdef DISABLE_SCRIPTING + (void) rName; + + return false; +#else String aName( rName); StarBASIC* pObj = 0; SfxObjectShell* pDocSh = pDoc->GetDocumentShell(); @@ -2913,6 +2918,7 @@ bool ScCompiler::IsMacro( const String& rName ) aToken.eOp = ocMacro; pRawToken = aToken.Clone(); return true; +#endif } bool ScCompiler::IsNamedRange( const String& rUpperName ) diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 9e047ac0214e..56af5a140443 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3045,6 +3045,8 @@ void ScInterpreter::ScMissing() PushTempToken( new FormulaMissingToken ); } +#ifndef DISABLE_SCRIPTING + uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCellRange, ScDocument* pDok ) { uno::Reference< sheet::XSheetCellRange > xSheetRange( xCellRange, uno::UNO_QUERY_THROW ); @@ -3101,11 +3103,17 @@ lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPar ) return bOk; } +#endif + void ScInterpreter::ScMacro() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMacro" ); SbxBase::ResetError(); +#ifdef DISABLE_SCRIPTING + PushNoValue(); // ohne DocShell kein CallBasic + return; +#else sal_uInt8 nParamCount = GetByte(); String aMacro( pCur->GetExternal() ); @@ -3348,8 +3356,10 @@ void ScInterpreter::ScMacro() if (bVolatileMacro && meVolatileType == NOT_VOLATILE) meVolatileType = VOLATILE_MACRO; +#endif } +#ifndef DISABLE_SCRIPTING bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos ) { @@ -3405,6 +3415,8 @@ bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos ) return bOk; } +#endif + namespace { class FindByPointer : ::std::unary_function<ScInterpreterTableOpParams, bool> |