Makefile | 6 RepositoryFixes.mk | 1 basic/Library_sb.mk | 15 + basic/Module_basic.mk | 2 basic/source/runtime/methods.cxx | 196 +++++++++++--------- basic/source/runtime/methods1.cxx | 80 ++++---- basic/source/sbx/sbxarray.cxx | 2 basic/source/sbx/sbxdbl.cxx | 4 basic/source/sbx/sbxscan.cxx | 2 basic/source/sbx/sbxstr.cxx | 4 basic/source/sbx/sbxvalue.cxx | 13 + basic/source/sbx/sbxvar.cxx | 8 dbaccess/source/core/dataaccess/databasecontext.cxx | 11 + filter/source/msfilter/msvbahelper.cxx | 32 +++ filter/source/msfilter/svxmsbas2.cxx | 3 sd/source/ui/slideshow/slideshowimpl.cxx | 4 sd/source/ui/view/ViewShellImplementation.cxx | 4 sd/source/ui/view/drviews2.cxx | 12 - sd/source/ui/view/drviews3.cxx | 6 sd/source/ui/view/drviews9.cxx | 54 +++-- sd/source/ui/view/drviewsb.cxx | 4 sd/source/ui/view/viewshe3.cxx | 6 sfx2/source/doc/objstor.cxx | 4 sw/source/core/doc/doc.cxx | 2 sw/source/core/unocore/unocoll.cxx | 13 + sw/source/filter/html/htmlbas.cxx | 2 sw/source/filter/ww8/ww8par.cxx | 4 sw/source/ui/app/docsh.cxx | 2 sw/source/ui/app/docsh2.cxx | 2 sw/source/ui/shells/frmsh.cxx | 2 30 files changed, 339 insertions(+), 161 deletions(-)
New commits: commit b344c30ab49b6faf8a24be42bdfcf4e946a861cd Author: Tor Lillqvist <t...@iki.fi> Date: Mon Mar 5 21:41:31 2012 +0200 Sprinkle more DISABLE_SCRIPTING ifdefs diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index efcf67f..28ce80f 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -120,6 +120,8 @@ SbxVariable* getDefaultProp( SbxVariable* pRef ); #undef GradientSyle_RECT #endif +#ifndef DISABLE_SCRIPTING + // from source/classes/sbxmod.cxx Reference< XModel > getDocumentModel( StarBASIC* ); @@ -143,20 +145,7 @@ static void FilterWhiteSpace( String& rStr ) rStr = aRet.makeStringAndClear(); } -static long GetDayDiff( const Date& rDate ) -{ - Date aRefDate( 1,1,1900 ); - long nDiffDays; - if ( aRefDate > rDate ) - { - nDiffDays = (long)(aRefDate - rDate); - nDiffDays *= -1; - } - else - nDiffDays = (long)(rDate - aRefDate); - nDiffDays += 2; // adjustment VisualBasic: 1.Jan.1900 == 2 - return nDiffDays; -} +static long GetDayDiff( const Date& rDate ); static const CharClass& GetCharClass( void ) { @@ -1761,68 +1750,7 @@ sal_Int16 implGetDateMonth( double aDate ) return nRet; } -sal_Int16 implGetDateYear( double aDate ) -{ - Date aRefDate( 1,1,1900 ); - long nDays = (long) aDate; - nDays -= 2; // standardize: 1.1.1900 => 0.0 - aRefDate += nDays; - sal_Int16 nRet = (sal_Int16)( aRefDate.GetYear() ); - return nRet; -} - -sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet ) -{ - if ( nYear < 30 && SbiRuntime::isVBAEnabled() ) - nYear += 2000; - else if ( nYear < 100 ) - nYear += 1900; - Date aCurDate( nDay, nMonth, nYear ); - if ((nYear < 100 || nYear > 9999) ) - { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); - return sal_False; - } - if ( !SbiRuntime::isVBAEnabled() ) - { - if ( (nMonth < 1 || nMonth > 12 )|| - (nDay < 1 || nDay > 31 ) ) - { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); - return sal_False; - } - } - else - { - // grab the year & month - aCurDate = Date( 1, (( nMonth % 12 ) > 0 ) ? ( nMonth % 12 ) : 12 + ( nMonth % 12 ), nYear ); - - // adjust year based on month value - // e.g. 2000, 0, xx = 1999, 12, xx ( or December of the previous year ) - // 2000, 13, xx = 2001, 1, xx ( or January of the following year ) - if( ( nMonth < 1 ) || ( nMonth > 12 ) ) - { - // inacurrate around leap year, don't use days to calculate, - // just modify the months directory - sal_Int16 nYearAdj = ( nMonth /12 ); // default to positive months inputed - if ( nMonth <=0 ) - nYearAdj = ( ( nMonth -12 ) / 12 ); - aCurDate.SetYear( aCurDate.GetYear() + nYearAdj ); - } - - // adjust day value, - // e.g. 2000, 2, 0 = 2000, 1, 31 or the last day of the previous month - // 2000, 1, 32 = 2000, 2, 1 or the first day of the following month - if( ( nDay < 1 ) || ( nDay > aCurDate.GetDaysInMonth() ) ) - aCurDate += nDay - 1; - else - aCurDate.SetDay( nDay ); - } - - long nDiffDays = GetDayDiff( aCurDate ); - rdRet = (double)nDiffDays; - return sal_True; -} +sal_Int16 implGetDateYear( double aDate ); // Function to convert date to ISO 8601 date format RTLFUNC(CDateToIso) @@ -2077,17 +2005,7 @@ RTLFUNC(Hour) } } -sal_Int16 implGetMinute( double dDate ) -{ - if( dDate < 0.0 ) - dDate *= -1.0; - double nFrac = dDate - floor( dDate ); - nFrac *= 86400.0; - sal_Int32 nSeconds = (sal_Int32)(nFrac + 0.5); - sal_Int16 nTemp = (sal_Int16)(nSeconds % 3600); - sal_Int16 nMin = nTemp / 60; - return nMin; -} +sal_Int16 implGetMinute( double dDate ); RTLFUNC(Minute) { @@ -4428,4 +4346,108 @@ RTLFUNC(Partition) rPar.Get(0)->PutString( String(aRetStr.makeStringAndClear()) ); } +#endif + +static long GetDayDiff( const Date& rDate ) +{ + Date aRefDate( 1,1,1900 ); + long nDiffDays; + if ( aRefDate > rDate ) + { + nDiffDays = (long)(aRefDate - rDate); + nDiffDays *= -1; + } + else + nDiffDays = (long)(rDate - aRefDate); + nDiffDays += 2; // adjustment VisualBasic: 1.Jan.1900 == 2 + return nDiffDays; +} + +sal_Int16 implGetDateYear( double aDate ) +{ + Date aRefDate( 1,1,1900 ); + long nDays = (long) aDate; + nDays -= 2; // standardize: 1.1.1900 => 0.0 + aRefDate += nDays; + sal_Int16 nRet = (sal_Int16)( aRefDate.GetYear() ); + return nRet; +} + +sal_Bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet ) +{ +#ifndef DISABLE_SCRIPTING + if ( nYear < 30 && SbiRuntime::isVBAEnabled() ) + nYear += 2000; + else +#endif + if ( nYear < 100 ) + nYear += 1900; + Date aCurDate( nDay, nMonth, nYear ); + if ((nYear < 100 || nYear > 9999) ) + { +#ifndef DISABLE_SCRIPTING + StarBASIC::Error( SbERR_BAD_ARGUMENT ); +#endif + return sal_False; + } + +#ifndef DISABLE_SCRIPTING + if ( !SbiRuntime::isVBAEnabled() ) +#endif + { + if ( (nMonth < 1 || nMonth > 12 )|| + (nDay < 1 || nDay > 31 ) ) + { +#ifndef DISABLE_SCRIPTING + StarBASIC::Error( SbERR_BAD_ARGUMENT ); +#endif + return sal_False; + } + } +#ifndef DISABLE_SCRIPTING + else + { + // grab the year & month + aCurDate = Date( 1, (( nMonth % 12 ) > 0 ) ? ( nMonth % 12 ) : 12 + ( nMonth % 12 ), nYear ); + + // adjust year based on month value + // e.g. 2000, 0, xx = 1999, 12, xx ( or December of the previous year ) + // 2000, 13, xx = 2001, 1, xx ( or January of the following year ) + if( ( nMonth < 1 ) || ( nMonth > 12 ) ) + { + // inacurrate around leap year, don't use days to calculate, + // just modify the months directory + sal_Int16 nYearAdj = ( nMonth /12 ); // default to positive months inputed + if ( nMonth <=0 ) + nYearAdj = ( ( nMonth -12 ) / 12 ); + aCurDate.SetYear( aCurDate.GetYear() + nYearAdj ); + } + + // adjust day value, + // e.g. 2000, 2, 0 = 2000, 1, 31 or the last day of the previous month + // 2000, 1, 32 = 2000, 2, 1 or the first day of the following month + if( ( nDay < 1 ) || ( nDay > aCurDate.GetDaysInMonth() ) ) + aCurDate += nDay - 1; + else + aCurDate.SetDay( nDay ); + } +#endif + + long nDiffDays = GetDayDiff( aCurDate ); + rdRet = (double)nDiffDays; + return sal_True; +} + +sal_Int16 implGetMinute( double dDate ) +{ + if( dDate < 0.0 ) + dDate *= -1.0; + double nFrac = dDate - floor( dDate ); + nFrac *= 86400.0; + sal_Int32 nSeconds = (sal_Int32)(nFrac + 0.5); + sal_Int16 nTemp = (sal_Int16)(nSeconds % 3600); + sal_Int16 nMin = nTemp / 60; + return nMin; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 04a21d5..91c739f 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -107,6 +107,8 @@ static Reference< XCalendar3 > getLocaleCalendar( void ) return xCalendar; } +#ifndef DISABLE_SCRIPTING + RTLFUNC(CallByName) { (void)pBasic; @@ -1835,42 +1837,6 @@ RTLFUNC(WeekdayName) rPar.Get(0)->PutString( String(aRetStr) ); } -sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 ) -{ - Date aRefDate( 1,1,1900 ); - long nDays = (long) aDate; - nDays -= 2; // normieren: 1.1.1900 => 0 - aRefDate += nDays; - DayOfWeek aDay = aRefDate.GetDayOfWeek(); - sal_Int16 nDay; - if ( aDay != SUNDAY ) - nDay = (sal_Int16)aDay + 2; - else - nDay = 1; // 1 == Sunday - - // #117253 optional 2nd parameter "firstdayofweek" - if( bFirstDayParam ) - { - if( nFirstDay < 0 || nFirstDay > 7 ) - { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); - return 0; - } - if( nFirstDay == 0 ) - { - Reference< XCalendar3 > xCalendar = getLocaleCalendar(); - if( !xCalendar.is() ) - { - StarBASIC::Error( SbERR_INTERNAL_ERROR ); - return 0; - } - nFirstDay = sal_Int16( xCalendar->getFirstDayOfWeek() + 1 ); - } - nDay = 1 + (nDay + 7 - nFirstDay) % 7; - } - return nDay; -} - RTLFUNC(Weekday) { (void)pBasic; @@ -3242,4 +3208,46 @@ RTLFUNC(Me) refVar->PutObject( pClassModuleObject ); } +#endif + +sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 ) +{ + Date aRefDate( 1,1,1900 ); + long nDays = (long) aDate; + nDays -= 2; // normieren: 1.1.1900 => 0 + aRefDate += nDays; + DayOfWeek aDay = aRefDate.GetDayOfWeek(); + sal_Int16 nDay; + if ( aDay != SUNDAY ) + nDay = (sal_Int16)aDay + 2; + else + nDay = 1; // 1 == Sunday + + // #117253 optional 2nd parameter "firstdayofweek" + if( bFirstDayParam ) + { + if( nFirstDay < 0 || nFirstDay > 7 ) + { +#ifndef DISABLE_SCRIPTING + StarBASIC::Error( SbERR_BAD_ARGUMENT ); +#endif + return 0; + } + if( nFirstDay == 0 ) + { + Reference< XCalendar3 > xCalendar = getLocaleCalendar(); + if( !xCalendar.is() ) + { +#ifndef DISABLE_SCRIPTING + StarBASIC::Error( SbERR_INTERNAL_ERROR ); +#endif + return 0; + } + nFirstDay = sal_Int16( xCalendar->getFirstDayOfWeek() + 1 ); + } + nDay = 1 + (nDay + 7 - nFirstDay) % 7; + } + return nDay; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 544f717..d221e4d 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -767,10 +767,12 @@ void SbxDimArray::Put32( SbxVariable* p, const sal_Int32* pIdx ) sal_uInt32 SbxDimArray::Offset32( SbxArray* pPar ) { +#ifndef DISABLE_SCRIPTING if( nDim == 0 || !pPar || ( ( nDim != ( pPar->Count() - 1 ) ) && SbiRuntime::isVBAEnabled() ) ) { SetError( SbxERR_BOUNDS ); return 0; } +#endif sal_uInt32 nPos = 0; sal_uInt16 nOff = 1; // Non element 0! for( SbxDim* p = pFirst; p && !IsError(); p = p->pNext ) diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx index ef6a8ae..9eca1dd 100644 --- a/basic/source/sbx/sbxdbl.cxx +++ b/basic/source/sbx/sbxdbl.cxx @@ -78,8 +78,10 @@ double ImpGetDouble( const SbxValues* p ) if( !p->pOUString ) { nRes = 0; +#ifndef DISABLE_SCRIPTING if ( SbiRuntime::isVBAEnabled() )// VBA only behaviour SbxBase::SetError( SbxERR_CONVERSION ); +#endif } else { @@ -88,8 +90,10 @@ double ImpGetDouble( const SbxValues* p ) if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK ) { nRes = 0; +#ifndef DISABLE_SCRIPTING if ( SbiRuntime::isVBAEnabled() )// VBA only behaviour SbxBase::SetError( SbxERR_CONVERSION ); +#endif } else nRes = d; diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index a253377..b4f111c 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -219,11 +219,13 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType if( l >= SbxMININT && l <= SbxMAXINT ) eScanType = SbxINTEGER; } +#ifndef DISABLE_SCRIPTING else if ( SbiRuntime::isVBAEnabled() ) { OSL_TRACE("Reporting error converting"); return SbxERR_CONVERSION; } +#endif if( pLen ) *pLen = (sal_uInt16) ( p - pStart ); if( !bRes ) diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx index fc95c57..20a7b11 100644 --- a/basic/source/sbx/sbxstr.cxx +++ b/basic/source/sbx/sbxstr.cxx @@ -260,7 +260,11 @@ SbxArray* StringToByteArray(const ::rtl::OUString& rStr) sal_Int32 nArraySize = rStr.getLength() * 2; const sal_Unicode* pSrc = rStr.getStr(); SbxDimArray* pArray = new SbxDimArray(SbxBYTE); +#ifdef DISABLE_SCRIPTING + bool bIncIndex = false; +#else bool bIncIndex = ( IsBaseIndexOne() && SbiRuntime::isVBAEnabled() ); +#endif if( nArraySize ) { if( bIncIndex ) diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index be36119..74b9d9c 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -297,7 +297,11 @@ SbxValue* SbxValue::TheRealValue( sal_Bool bObjInObjError ) const ((SbxValue*) pObj)->aData.eType == SbxOBJECT && ((SbxValue*) pObj)->aData.pObj == pObj ) { +#ifdef DISABLE_SCRIPTING // No sbunoobj + const bool bSuccess = false; +#else bool bSuccess = handleToStringForCOMObjects( pObj, p ); +#endif if( !bSuccess ) { SetError( SbxERR_BAD_PROP_VALUE ); @@ -914,8 +918,11 @@ sal_Bool SbxValue::Convert( SbxDataType eTo ) sal_Bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) { +#ifdef DISABLE_SCRIPTING + bool bVBAInterop = false; +#else bool bVBAInterop = SbiRuntime::isVBAEnabled(); - +#endif SbxDataType eThisType = GetType(); SbxDataType eOpType = rOp.GetType(); SbxError eOld = GetError(); @@ -1283,7 +1290,11 @@ Lbl_OpIsEmpty: sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const { +#ifdef DISABLE_SCRIPTING + bool bVBAInterop = false; +#else bool bVBAInterop = SbiRuntime::isVBAEnabled(); +#endif sal_Bool bRes = sal_False; SbxError eOld = GetError(); diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index d00115a..9ad7a5f 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -93,8 +93,10 @@ SbxVariable::SbxVariable( const SbxVariable& r ) if( r.mpSbxVariableImpl != NULL ) { mpSbxVariableImpl = new SbxVariableImpl( *r.mpSbxVariableImpl ); +#ifndef DISABLE_SCRIPTING if( mpSbxVariableImpl->m_xComListener.is() ) registerComListenerVariableForBasic( this, mpSbxVariableImpl->m_pComListenerParentBasic ); +#endif } pCst = NULL; if( r.CanRead() ) @@ -141,8 +143,10 @@ SbxVariable::~SbxVariable() if ( maName.EqualsAscii( aCellsStr ) ) maName.AssignAscii( aCellsStr, sizeof( aCellsStr )-1 ); #endif +#ifndef DISABLE_SCRIPTING if( IsSet( SBX_DIM_AS_NEW )) removeDimAsNewRecoverItem( this ); +#endif delete mpSbxVariableImpl; delete pCst; } @@ -333,8 +337,10 @@ SbxVariable& SbxVariable::operator=( const SbxVariable& r ) if( r.mpSbxVariableImpl != NULL ) { mpSbxVariableImpl = new SbxVariableImpl( *r.mpSbxVariableImpl ); +#ifndef DISABLE_SCRIPTING if( mpSbxVariableImpl->m_xComListener.is() ) registerComListenerVariableForBasic( this, mpSbxVariableImpl->m_pComListenerParentBasic ); +#endif } else mpSbxVariableImpl = NULL; @@ -422,7 +428,9 @@ void SbxVariable::SetComListener( ::com::sun::star::uno::Reference< ::com::sun:: SbxVariableImpl* pImpl = getImpl(); pImpl->m_xComListener = xComListener; pImpl->m_pComListenerParentBasic = pParentBasic; +#ifndef DISABLE_SCRIPTING registerComListenerVariableForBasic( this, pParentBasic ); +#endif } void SbxVariable::ClearComListener( void ) diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index cac2b87..74e5fc2 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -185,7 +185,10 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon ,m_aContainerListeners(m_aMutex) { m_pDatabaseDocumentLoader = new DatabaseDocumentLoader( m_aContext ); + +#ifndef DISABLE_SCRIPTING ::basic::BasicManagerRepository::registerCreationListener( *this ); +#endif osl_incrementInterlockedCount( &m_refCount ); { @@ -199,7 +202,10 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon ODatabaseContext::~ODatabaseContext() { +#ifndef DISABLE_SCRIPTING ::basic::BasicManagerRepository::revokeCreationListener( *this ); +#endif + if ( m_pDatabaseDocumentLoader ) m_pDatabaseDocumentLoader->release(); @@ -749,6 +755,10 @@ Sequence< sal_Int8 > ODatabaseContext::getUnoTunnelImplementationId() void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForDocument, BasicManager& _rBasicManager ) { +#ifdef DISABLE_SCRIPTING + (void) _rxForDocument; + (void) _rBasicManager; +#else // if it's a database document ... Reference< XOfficeDatabaseDocument > xDatabaseDocument( _rxForDocument, UNO_QUERY ); // ... or a sub document of a database document ... @@ -762,6 +772,7 @@ void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForD // ... whose BasicManager has just been created, then add the global DatabaseDocument variable to its scope. if ( xDatabaseDocument.is() ) _rBasicManager.SetGlobalUNOConstant( "ThisDatabaseDocument", makeAny( xDatabaseDocument ) ); +#endif } } // namespace dbaccess diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index 4c7d3f9..b707158 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -181,6 +181,13 @@ SfxObjectShell* findShellForUrl( const rtl::OUString& sMacroURLOrPath ) bool hasMacro( SfxObjectShell* pShell, const String& sLibrary, String& sMod, const String& sMacro ) { bool bFound = false; + +#ifdef DISABLE_SCRIPTING + (void) pShell; + (void) sLibrary; + (void) sMod; + (void) sMacro; +#else if ( sLibrary.Len() && sMacro.Len() ) { OSL_TRACE("** Searching for %s.%s in library %s" @@ -228,6 +235,7 @@ bool hasMacro( SfxObjectShell* pShell, const String& sLibrary, String& sMod, con } } } +#endif return bFound; } @@ -266,6 +274,12 @@ void parseMacro( const rtl::OUString& sMacro, String& sContainer, String& sModul ::rtl::OUString resolveVBAMacro( SfxObjectShell* pShell, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModuleName, const ::rtl::OUString& rMacroName ) { +#ifdef DISABLE_SCRIPTING + (void) pShell; + (void) rLibName; + (void) rModuleName; + (void) rMacroName; +#else if( pShell ) { ::rtl::OUString aLibName = rLibName.isEmpty() ? getDefaultProjectName( pShell ) : rLibName ; @@ -273,11 +287,19 @@ void parseMacro( const rtl::OUString& sMacro, String& sContainer, String& sModul if( hasMacro( pShell, aLibName, aModuleName, rMacroName ) ) return ::rtl::OUStringBuffer( aLibName ).append( sal_Unicode( '.' ) ).append( aModuleName ).append( sal_Unicode( '.' ) ).append( rMacroName ).makeStringAndClear(); } +#endif return ::rtl::OUString(); } MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& MacroName, bool bSearchGlobalTemplates ) { +#ifdef DISABLE_SCRIPTING + (void) pShell; + (void) MacroName; + (void) bSearchGlobalTemplates; + + return MacroResolvedInfo(); +#else if( !pShell ) return MacroResolvedInfo(); @@ -439,11 +461,20 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& aRes.msResolvedMacro = sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert( '.', 0 ).Insert( sContainer, 0 ); return aRes; +#endif } // Treat the args as possible inouts ( convertion at bottom of method ) sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& aRet, const uno::Any& /*aCaller*/) { +#ifdef DISABLE_SCRIPTING + (void) pShell; + (void) sMacroName; + (void) aArgs; + (void) aRet; + + return sal_False; +#else sal_Bool bRes = sal_False; if ( !pShell ) return bRes; @@ -476,6 +507,7 @@ sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Se bRes = sal_False; } return bRes; +#endif } // ============================================================================ diff --git a/filter/source/msfilter/svxmsbas2.cxx b/filter/source/msfilter/svxmsbas2.cxx index 6e3969d..5058c17 100644 --- a/filter/source/msfilter/svxmsbas2.cxx +++ b/filter/source/msfilter/svxmsbas2.cxx @@ -47,10 +47,11 @@ sal_uLong SvxImportMSVBasic::SaveOrDelMSVBAStorage( sal_Bool bSaveInto, xVBAStg = 0; if( bSaveInto ) { +#ifndef DISABLE_SCRIPTING BasicManager *pBasicMan = rDocSh.GetBasicManager(); if( pBasicMan && pBasicMan->IsBasicModified() ) nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE; - +#endif SotStorageRef xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, STREAM_STD_READ ); SotStorageRef xDst = xRoot->OpenSotStorage( rStorageName, STREAM_READWRITE | STREAM_TRUNC ); xSrc->CopyTo( xDst ); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index bc8b3ba..3bc8dc1 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -693,9 +693,11 @@ void SAL_CALL SlideshowImpl::disposing() if( maPresSettings.mbFullScreen ) { +#ifndef DISABLE_SCRIPTING // restore StarBASICErrorHdl StarBASIC::SetGlobalErrorHdl(maStarBASICGlobalErrorHdl); maStarBASICGlobalErrorHdl = Link(); +#endif } else { @@ -1038,9 +1040,11 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings ) if( maPresSettings.mbFullScreen ) { +#ifndef DISABLE_SCRIPTING // disable basic ide error handling maStarBASICGlobalErrorHdl = StarBASIC::GetGlobalErrorHdl(); StarBASIC::SetGlobalErrorHdl( Link() ); +#endif } // call resize handler diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index c83267e..e0e0750 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -177,7 +177,9 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( } else { +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); +#endif rRequest.Ignore (); break; } @@ -189,7 +191,9 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( } else { +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif rRequest.Ignore (); break; } diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index ee16ce6..af8239f 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -492,8 +492,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) rReq.Ignore (); break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif rReq.Ignore (); break; } @@ -519,8 +520,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) rReq.Ignore (); break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif rReq.Ignore (); break; } @@ -567,13 +569,15 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) rBindings.Invalidate( SID_ZOOM_OUT ); rBindings.Invalidate( SID_ATTR_ZOOMSLIDER ); } +#ifndef DISABLE_SCRIPTING else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); - +#endif rReq.Ignore (); break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif rReq.Ignore (); break; } diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index eb7d967..f67f60f 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -174,7 +174,9 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue (); if (! CHECK_RANGE (PK_STANDARD, nWhatKind, PK_HANDOUT)) { +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); +#endif rReq.Ignore (); break; } @@ -182,7 +184,9 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) { if (! CHECK_RANGE (0, nWhatPage, GetDoc()->GetSdPageCount((PageKind)nWhatKind))) { +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); +#endif rReq.Ignore (); break; } @@ -193,7 +197,9 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) } else { +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif rReq.Ignore (); break; } diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index 107fca6..f2741cd 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -273,12 +273,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) pAttr->Put (XFillStyleItem ((XFillStyle) pFillStyle->GetValue ()), XATTR_FILLSTYLE); rBindings.Invalidate (SID_ATTR_FILL_STYLE); } +#ifndef DISABLE_SCRIPTING else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); - +#endif break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; // linienstil neu bestimmen @@ -293,12 +295,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) pAttr->Put (XLineStyleItem ((XLineStyle) pLineStyle->GetValue ()), XATTR_LINESTYLE); rBindings.Invalidate (SID_ATTR_LINE_STYLE); } +#ifndef DISABLE_SCRIPTING else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); - +#endif break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; // linienbreite setzen @@ -312,8 +316,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) rBindings.Invalidate (SID_ATTR_LINE_WIDTH); break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; case SID_SETFILLCOLOR : @@ -335,8 +340,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) rBindings.Invalidate (SID_ATTR_FILL_STYLE); break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; case SID_SETLINECOLOR : @@ -355,8 +361,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) rBindings.Invalidate (SID_ATTR_LINE_COLOR); break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; case SID_SETGRADSTARTCOLOR : @@ -416,8 +423,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) rBindings.Invalidate (SID_ATTR_FILL_GRADIENT); break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; case SID_SETHATCHCOLOR : @@ -469,8 +477,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) rBindings.Invalidate (SID_ATTR_FILL_STYLE); break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; // einstellungen fuer liniendash @@ -513,12 +522,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) rBindings.Invalidate (SID_ATTR_LINE_DASH); rBindings.Invalidate (SID_ATTR_FILL_STYLE); } +#ifndef DISABLE_SCRIPTING else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); - +#endif break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; // einstellungen fuer farbverlauf @@ -588,12 +599,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) rBindings.Invalidate (SID_ATTR_FILL_GRADIENT); rBindings.Invalidate (SID_ATTR_FILL_STYLE); } +#ifndef DISABLE_SCRIPTING else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); - +#endif break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; // einstellungen fuer schraffur @@ -648,12 +661,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) rBindings.Invalidate (SID_ATTR_FILL_HATCH); rBindings.Invalidate (SID_ATTR_FILL_STYLE); } +#ifndef DISABLE_SCRIPTING else StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); - +#endif break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; case SID_SELECTGRADIENT : @@ -686,8 +701,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; case SID_SELECTHATCH : @@ -720,8 +736,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; case SID_UNSELECT : @@ -734,8 +751,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) { break; } - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif break; /* case SID_SETFONTFAMILYNAME : diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index 231c6d5..516e7b8 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -164,7 +164,9 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq) } else if (pArgs->Count () != 4) { +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif Cancel(); rReq.Ignore (); break; @@ -340,7 +342,9 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq) } else { +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif Cancel (); rReq.Ignore (); break; diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 674b344..87b88cf 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -300,8 +300,9 @@ SdPage* ViewShell::CreateOrDuplicatePage ( if(HasCurrentFunction( SID_BEZIER_EDIT ) ) GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON); - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_BAD_PROP_VALUE); +#endif rRequest.Ignore (); return NULL; } @@ -312,8 +313,9 @@ SdPage* ViewShell::CreateOrDuplicatePage ( if(HasCurrentFunction(SID_BEZIER_EDIT) ) GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON); - +#ifndef DISABLE_SCRIPTING StarBASIC::FatalError (SbERR_WRONG_ARGS); +#endif rRequest.Ignore (); return NULL; } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 41fba16..52c9a70 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -2688,6 +2688,7 @@ void SwDoc::ChkCondColls() uno::Reference< script::vba::XVBAEventProcessor > SwDoc::GetVbaEventProcessor() { +#ifndef DISABLE_SCRIPTING if( !mxVbaEvents.is() && pDocShell && ooo::vba::isAlienWordDoc( *pDocShell ) ) { try @@ -2701,6 +2702,7 @@ SwDoc::GetVbaEventProcessor() { } } +#endif return mxVbaEvents; } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 3ea7552..f5302fb 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -97,6 +97,8 @@ using namespace ::com::sun::star::lang; using rtl::OUString; +#ifndef DISABLE_SCRIPTING + class SwVbaCodeNameProvider : public ::cppu::WeakImplHelper1< document::XCodeNameQuery > { SwDocShell* mpDocShell; @@ -260,6 +262,7 @@ public: return sal_True; return sal_False; } + ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { if ( !hasByName( aName ) ) @@ -282,6 +285,8 @@ public: }; +#endif + struct ProvNamesId_Type { const char * pName; @@ -573,12 +578,15 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 } break; case SW_SERVICE_VBAOBJECTPROVIDER : +#ifndef DISABLE_SCRIPTING { SwVbaObjectForCodeNameProvider* pObjProv = new SwVbaObjectForCodeNameProvider( pDoc->GetDocShell() ); xRet = (cppu::OWeakObject*)pObjProv; } +#endif break; case SW_SERVICE_VBACODENAMEPROVIDER : +#ifndef DISABLE_SCRIPTING { if ( pDoc->GetDocShell() && ooo::vba::isAlienWordDoc( *pDoc->GetDocShell() ) ) { @@ -586,8 +594,10 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 xRet = (cppu::OWeakObject*)pObjProv; } } +#endif break; case SW_SERVICE_VBAPROJECTNAMEPROVIDER : +#ifndef DISABLE_SCRIPTING { uno::Reference< container::XNameContainer > xProjProv = pDoc->GetVBATemplateToProjectCache(); if ( !xProjProv.is() && pDoc->GetDocShell() && ooo::vba::isAlienWordDoc( *pDoc->GetDocShell() ) ) @@ -598,8 +608,10 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 //xRet = (cppu::OWeakObject*)xProjProv; xRet = xProjProv; } +#endif break; case SW_SERVICE_VBAGLOBALS : +#ifndef DISABLE_SCRIPTING { if ( pDoc ) { @@ -614,6 +626,7 @@ uno::Reference< uno::XInterface > SwXServiceProvider::MakeInstance(sal_uInt16 aGlobs >>= xRet; } } +#endif break; case SW_SERVICE_TYPE_FOOTNOTE : diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 665da03..5fbd867 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -267,6 +267,7 @@ void SwHTMLParser::InsertBasicDocEvent( rtl::OUString aEvent, const String& rNam void SwHTMLWriter::OutBasic() { +#ifndef DISABLE_SCRIPTING if( !bCfgStarBasic ) return; @@ -319,6 +320,7 @@ void SwHTMLWriter::OutBasic() eDestEnc, &aNonConvertableCharacters ); } } +#endif } static const char* aEventNames[] = diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index f417f3d..3b34027 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4610,10 +4610,12 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) uno::Sequence< uno::Any > aArgs(1); aArgs[ 0 ] <<= mpDocShell->GetModel(); aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( "ooo.vba.word.Globals", aArgs ); + +#ifndef DISABLE_SCRIPTING BasicManager *pBasicMan = mpDocShell->GetBasicManager(); if (pBasicMan) pBasicMan->SetGlobalUNOConstant( "VBAGlobals", aGlobs ); - +#endif BasicProjImportHelper aBasicImporter( *mpDocShell ); // Import vba via oox filter bool bRet = aBasicImporter.import( mpDocShell->GetMedium()->GetInputStream() ); diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 707899b..46cd709 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -1583,6 +1583,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView // there are some from Meta-Tags dublicated or triplicated afterwards. ClearHeaderAttributesForSourceViewHack(); +#ifndef DISABLE_SCRIPTING // The Document-Basic also bites the dust ... // A EnterBasicCall is not needed here, because nothing is called and // there can't be any Dok-Basic, that has not yet been loaded inside @@ -1623,6 +1624,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView "Deleting Basics didn't work" ); } } +#endif sal_Bool bWasBrowseMode = pDoc->get(IDocumentSettingAccess::BROWSE_MODE); RemoveLink(); diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 58917a4..504efda 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -1100,7 +1100,9 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) } //Distance nur setzen, wenn der Request vom Controller kommt +#ifndef DISABLE_SCRIPTING if(!StarBASIC::IsRunning()) +#endif { aNewBox.SetDistance( rBoxItem.GetDistance() ); } commit b69285590d704b08852c22dbb5ed073bff9998ce Author: Tor Lillqvist <t...@iki.fi> Date: Mon Mar 5 21:36:01 2012 +0200 Change my mind again: Do build a subset sb library even for DISABLE_SCRIPTING The tables functionality in Writer documents need SbxValue. diff --git a/Makefile b/Makefile index b83ee6a..5834728 100644 --- a/Makefile +++ b/Makefile @@ -384,12 +384,12 @@ bootstrap: $(WORKDIR_BOOTSTRAP) # build: bootstrap fetch $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross-toolset) ifeq ($(DISABLE_SCRIPTING),TRUE) -# We must get the headers from basic and vbahelper "delivered" because -# as we don't link to any libs from those they won't otherwise be, or +# We must get the headers from vbahelper "delivered" because +# as we don't link to any libs from there they won't otherwise be, or # something. And we still do include those headers always even if the # libs aren't built in the --disable-scripting case. (Ifdefs for # DISABLE_SCRIPTING will be added to the code later as necessary.) - $(GNUMAKE) basic vbahelper + $(GNUMAKE) vbahelper endif ifeq ($(DISABLE_DBCONNECTIVITY),TRUE) # Ditto for dbconnectivity in the --disable-database-connectivity case diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk index ef2b957..c15643f 100644 --- a/RepositoryFixes.mk +++ b/RepositoryFixes.mk @@ -132,7 +132,6 @@ endif # ifeq ($(OS),WNT) ifeq (,$(filter SCRIPTING,$(BUILD_TYPE))) -gb_Library_FILENAMES := $(patsubst sb:libsb%,,$(gb_Library_FILENAMES)) gb_Library_FILENAMES := $(patsubst vbahelper:libvbahelper%,,$(gb_Library_FILENAMES)) endif diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk index 0171682..4ba93cb 100644 --- a/basic/Library_sb.mk +++ b/basic/Library_sb.mk @@ -64,6 +64,8 @@ $(eval $(call gb_Library_add_linked_libs,sb,\ $(gb_STDLIBS) \ )) +ifneq ($(DISABLE_SCRIPTING),TRUE) + $(eval $(call gb_Library_add_exception_objects,sb,\ basic/source/basmgr/basicmanagerrepository \ basic/source/basmgr/basmgr \ @@ -102,8 +104,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\ basic/source/runtime/ddectrl \ basic/source/runtime/inputbox \ basic/source/runtime/iosys \ - basic/source/runtime/methods \ - basic/source/runtime/methods1 \ basic/source/runtime/props \ basic/source/runtime/runtime \ basic/source/runtime/sbdiagnose \ @@ -112,13 +112,21 @@ $(eval $(call gb_Library_add_exception_objects,sb,\ basic/source/runtime/step0 \ basic/source/runtime/step1 \ basic/source/runtime/step2 \ + basic/source/sbx/sbxmstrm \ +)) + +endif + +$(eval $(call gb_Library_add_exception_objects,sb,\ + basic/source/runtime/methods \ + basic/source/runtime/methods1 \ basic/source/sbx/sbxarray \ - basic/source/sbx/sbxbase \ basic/source/sbx/sbxbool \ basic/source/sbx/sbxbyte \ basic/source/sbx/sbxchar \ basic/source/sbx/sbxcoll \ basic/source/sbx/sbxcurr \ + basic/source/sbx/sbxbase \ basic/source/sbx/sbxdate \ basic/source/sbx/sbxdbl \ basic/source/sbx/sbxdec \ @@ -126,7 +134,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\ basic/source/sbx/sbxform \ basic/source/sbx/sbxint \ basic/source/sbx/sbxlng \ - basic/source/sbx/sbxmstrm \ basic/source/sbx/sbxobj \ basic/source/sbx/sbxres \ basic/source/sbx/sbxscan \ diff --git a/basic/Module_basic.mk b/basic/Module_basic.mk index bbd9b61..c3ba0ee 100644 --- a/basic/Module_basic.mk +++ b/basic/Module_basic.mk @@ -32,7 +32,6 @@ ifneq ($(DISABLE_SCRIPTING),TRUE) $(eval $(call gb_Module_add_targets,basic,\ AllLangResTarget_sb \ - Library_sb \ )) $(eval $(call gb_Module_add_check_targets,basic,\ @@ -42,6 +41,7 @@ $(eval $(call gb_Module_add_check_targets,basic,\ endif $(eval $(call gb_Module_add_targets,basic,\ + Library_sb \ Package_inc \ )) commit 07eb8bdcdf0f75a36f5e22a825102070e1255240 Author: Tor Lillqvist <t...@iki.fi> Date: Mon Mar 5 13:17:43 2012 +0200 WaE: unused parameter in the DISABLE_SCRIPTING case diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index dac0751..fd47493 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3553,7 +3553,9 @@ void SfxObjectShell::SetConfigOptionsChecked( sal_Bool bChecked ) sal_Bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) { -#ifndef DISABLE_SCRIPTING +#ifdef DISABLE_SCRIPTING + (void) xHandler; +#else if ( !HasBasic() ) return sal_True; commit f914c5230a5b119a35bb8fa4da9c4aba105fd8d1 Author: Tor Lillqvist <t...@iki.fi> Date: Mon Mar 5 13:16:59 2012 +0200 WaE: unused variable in the DISABLE_SCRIPTING case diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index ef3d10a..cf1d327 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -580,8 +580,8 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) if( pFlt->GetUserData().EqualsAscii( "HTML") ) { - SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); #ifndef DISABLE_SCRIPTING + SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); if( !rHtmlOpt.IsStarBasic() && rHtmlOpt.IsStarBasicWarning() && HasBasic() ) { uno::Reference< XLibraryContainer > xLibCont(GetBasicContainer(), UNO_QUERY); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits