diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-10-21 23:21:37 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-10-22 09:30:23 +0300 |
commit | 9ecac3874d179b1d7aa6b45337001b1def06a9dd (patch) | |
tree | 120fc40fda1055a0f504e60c553b5734030d2741 /sfx2 | |
parent | d0be09322d127e7d517851db38c764d57fbab2dc (diff) |
Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTING
Feature test macros that govern conditional compilation should be
defined in config_*.h include files, not on the compilation command
line.
Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/app.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/appl/appbas.cxx | 13 | ||||
-rw-r--r-- | sfx2/source/appl/appbaslib.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/appl/appdata.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/appl/appdde.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/appinit.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/appl/appquit.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/appl/macroloader.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/docmacromode.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 24 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/inc/appdata.hxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 2 |
16 files changed, 80 insertions, 66 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 83794e8ef17f..0eeb327f7db5 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -122,7 +122,7 @@ using namespace ::com::sun::star; // Static member SfxApplication* SfxApplication::pApp = NULL; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING static BasicDLL* pBasic = NULL; #endif @@ -209,7 +209,7 @@ SfxApplication::SfxApplication() pSfxHelp = new SfxHelp; #endif -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING pBasic = new BasicDLL; StarBASIC::SetGlobalErrorHdl( LINK( this, SfxApplication, GlobalBasicErrorHdl_Impl ) ); #endif @@ -232,7 +232,7 @@ SfxApplication::~SfxApplication() // delete global options SvtViewOptions::ReleaseOptions(); -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING delete pBasic; #endif if ( !pAppData_Impl->bDowning ) @@ -461,7 +461,7 @@ void SfxApplication::Invalidate( sal_uInt16 nId ) Invalidate_Impl( pFrame->GetBindings(), nId ); } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING #ifndef DISABLE_DYNLOADING @@ -481,7 +481,7 @@ extern "C" void *basicide_macro_organizer(sal_Int16); IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) pStarBasic; return 0; #else @@ -514,7 +514,7 @@ bool SfxApplication::IsXScriptURL( const OUString& rScriptURL ) { bool result = false; -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) rScriptURL; #else ::com::sun::star::uno::Reference @@ -550,7 +550,7 @@ SfxApplication::ChooseScript() { OUString aScriptURL; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); if ( pFact ) { @@ -580,7 +580,7 @@ SfxApplication::ChooseScript() void SfxApplication::MacroOrganizer( sal_Int16 nTabId ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) nTabId; #else @@ -610,7 +610,7 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId ) ErrCode SfxApplication::CallBasic( const OUString& rCode, BasicManager* pMgr, SbxArray* pArgs, SbxValue* pRet ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) rCode; (void) pMgr; (void) pArgs; diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 28f99280c3cc..85cbc66469d7 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -17,12 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> +#include <config_options.h> + #include <sal/config.h> #include <cassert> -#include <config_options.h> - #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/script/XLibraryContainer.hpp> #include <com/sun/star/uno/Reference.h> @@ -95,7 +96,7 @@ sal_uInt16 SfxApplication::SaveBasicAndDialogContainer() const BasicManager* SfxApplication::GetBasicManager() { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING return 0; #else return BasicManagerRepository::getApplicationBasicManager( true ); @@ -106,7 +107,7 @@ BasicManager* SfxApplication::GetBasicManager() XLibraryContainer * SfxApplication::GetDialogContainer() { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING return NULL; #else if ( !pAppData_Impl->pBasicManager->isValid() ) @@ -119,7 +120,7 @@ XLibraryContainer * SfxApplication::GetDialogContainer() XLibraryContainer * SfxApplication::GetBasicContainer() { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING return NULL; #else if ( !pAppData_Impl->pBasicManager->isValid() ) @@ -132,7 +133,7 @@ XLibraryContainer * SfxApplication::GetBasicContainer() StarBASIC* SfxApplication::GetBasic() { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING return 0; #else return GetBasicManager()->GetLib(0); diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx index a6dcf9abd0f7..980f2db2bdc8 100644 --- a/sfx2/source/appl/appbaslib.cxx +++ b/sfx2/source/appl/appbaslib.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> #include "appbaslib.hxx" @@ -46,7 +47,7 @@ void SfxBasicManagerHolder::reset( BasicManager* _pBasicManager ) { impl_releaseContainers(); -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) _pBasicManager; #else // Note: we do not delete the old BasicManager. BasicManager instances are @@ -73,7 +74,7 @@ void SfxBasicManagerHolder::reset( BasicManager* _pBasicManager ) void SfxBasicManagerHolder::storeAllLibraries() { -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING OSL_PRECOND( isValid(), "SfxBasicManagerHolder::storeAllLibraries: not initialized!" ); try { @@ -91,7 +92,7 @@ void SfxBasicManagerHolder::storeAllLibraries() void SfxBasicManagerHolder::setStorage( const Reference< XStorage >& _rxStorage ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) _rxStorage; #else try @@ -110,7 +111,7 @@ void SfxBasicManagerHolder::setStorage( const Reference< XStorage >& _rxStorage void SfxBasicManagerHolder::storeLibrariesToStorage( const Reference< XStorage >& _rxStorage ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) _rxStorage; #else OSL_PRECOND( isValid(), "SfxBasicManagerHolder::storeLibrariesToStorage: not initialized!" ); @@ -143,7 +144,7 @@ void SfxBasicManagerHolder::impl_releaseContainers() bool SfxBasicManagerHolder::LegacyPsswdBinaryLimitExceeded( Sequence< OUString >& sModules ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) sModules; #else if ( mpBasicManager ) diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index a062e746a020..c07c94ccaf5c 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -84,13 +84,13 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) , pFactArr(0) , pTopFrames( new SfxFrameArr_Impl ) , pMatcher( 0 ) -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING , pBasicResMgr( 0 ) #endif , pSvtResMgr( 0 ) , m_pToolsErrorHdl(0) , m_pSoErrorHdl(0) -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING , m_pSbxErrorHdl(0) #endif , pAppDispatch(NULL) @@ -127,7 +127,7 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) , bODFVersionWarningLater( false ) { -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING BasicManagerRepository::registerCreationListener( *pBasMgrListener ); #endif } @@ -138,7 +138,7 @@ SfxAppData_Impl::~SfxAppData_Impl() delete pTopFrames; delete pBasicManager; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING BasicManagerRepository::revokeCreationListener( *pBasMgrListener ); delete pBasMgrListener; #endif @@ -155,7 +155,7 @@ SfxDocumentTemplates* SfxAppData_Impl::GetDocumentTemplates() void SfxAppData_Impl::OnApplicationBasicManagerCreated( BasicManager& _rBasicManager ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) _rBasicManager; #else pBasicManager->reset( &_rBasicManager ); diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index f0dc0e735f03..9b740da95135 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -349,7 +349,7 @@ long SfxApplication::DdeExecute( const OUString& rCmd ) // Expressed in our B */ long SfxObjectShell::DdeExecute( const OUString& rCmd ) // Expressed in our BASIC-Syntax { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) rCmd; #else StarBASIC* pBasic = GetBasic(); diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index dfbed1e1760b..2fa68ad8cd9a 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> #include <sfx2/app.hxx> #include <com/sun/star/frame/XTerminateListener.hpp> @@ -224,14 +225,14 @@ bool SfxApplication::Initialize_Impl() pAppData_Impl->m_pToolsErrorHdl = new SfxErrorHandler( RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1); -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING pAppData_Impl->pBasicResMgr = ResMgr::CreateResMgr("sb"); #endif pAppData_Impl->pSvtResMgr = ResMgr::CreateResMgr("svt"); pAppData_Impl->m_pSoErrorHdl = new SfxErrorHandler( RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END, pAppData_Impl->pSvtResMgr ); -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING pAppData_Impl->m_pSbxErrorHdl = new SfxErrorHandler( RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END, pAppData_Impl->pBasicResMgr ); #endif diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index e37e98d29959..18b04e5543e5 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> + #include <basic/basmgr.hxx> #include <basic/sbstar.hxx> @@ -61,7 +63,7 @@ void SfxApplication::Deinitialize() if ( pAppData_Impl->bDowning ) return; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING StarBASIC::Stop(); SaveBasicAndDialogContainer(); @@ -91,7 +93,7 @@ void SfxApplication::Deinitialize() // Release Controller and others // then the remaining components should alse disapear ( Beamer! ) -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING BasicManagerRepository::resetApplicationBasicManager(); pAppData_Impl->pBasicManager->reset( NULL ); // this will also delete pBasMgr @@ -125,12 +127,12 @@ void SfxApplication::Deinitialize() pAppData_Impl->pPool = NULL; NoChaos::ReleaseItemPool(); -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING DELETEZ(pAppData_Impl->pBasicResMgr); #endif DELETEZ(pAppData_Impl->pSvtResMgr); -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING delete pAppData_Impl->m_pSbxErrorHdl; #endif delete pAppData_Impl->m_pSoErrorHdl; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 7d0f4c65eb52..e2477009b557 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> + #include <com/sun/star/document/XEmbeddedScripts.hpp> #include <com/sun/star/drawing/ModuleDispatcher.hpp> #include <com/sun/star/embed/XStorage.hpp> @@ -551,7 +553,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING case SID_BASICSTOP: StarBASIC::Stop(); break; @@ -725,7 +727,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) break; } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING case SID_BASICSTOP: if ( !StarBASIC::IsRunning() ) rSet.DisableItem(nWhich); @@ -826,7 +828,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) } } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING #ifndef DISABLE_DYNLOADING @@ -882,7 +884,7 @@ ResMgr* SfxApplication::GetOffResManager_Impl() namespace { -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING vcl::Window* lcl_getDialogParent( const Reference< XFrame >& _rxFrame, vcl::Window* _pFallback ) { if ( !_rxFrame.is() ) @@ -957,7 +959,7 @@ namespace } return NULL; } -#endif // !DISABLE_SCRIPTING +#endif // HAVE_FEATURE_SCRIPTING } void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) @@ -1036,7 +1038,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) } break; } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING case SID_BASICIDE_APPEAR: { SfxViewFrame* pView = lcl_getBasicIDEViewFrame( NULL ); @@ -1220,7 +1222,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) rReq.Done(); } break; -#endif // !DISABLE_SCRIPTING +#endif // HAVE_FEATURE_SCRIPTING case SID_OFFICE_CHECK_PLZ: { @@ -1231,7 +1233,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) { bRet = true /*!!!SfxIniManager::CheckPLZ( aPLZ )*/; } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING else SbxBase::SetError( SbxERR_WRONG_ARGS ); #endif diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index 0505c3885b09..55f610812a18 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> + #include <macroloader.hxx> #include <com/sun/star/document/UpdateDocMode.hpp> @@ -190,7 +192,7 @@ void SAL_CALL SfxMacroLoader::removeStatusListener( ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::Any& rRetval, SfxObjectShell* pSh ) throw ( ucb::ContentCreationException, uno::RuntimeException ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) rURL; (void) rRetval; (void) pSh; diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index 4d4ae52b4339..a032d8051685 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> #include <sfx2/docmacromode.hxx> #include <sfx2/signaturestate.hxx> @@ -365,7 +366,7 @@ namespace sfx2 bool DocumentMacroMode::hasMacroLibrary() const { bool bHasMacroLib = false; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING try { Reference< XEmbeddedScripts > xScripts( m_pData->m_rDocumentAccess.getEmbeddedDocumentScripts() ); diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index e1d3068ffe33..7ce7e253f539 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> + #include <sot/storage.hxx> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> @@ -805,7 +807,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) { if ( !pNameItem ) { -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING SbxBase::SetError( SbxERR_WRONG_ARGS ); #endif rReq.Ignore(); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 8828551136ae..48bfcc9bf6eb 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1037,7 +1037,7 @@ bool SfxObjectShell::DoSave() } else bOk = true; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING if ( HasBasic() ) { try @@ -3095,7 +3095,7 @@ bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium ) bChart = true; SetupStorage( xStorage, nVersion, bTemplate, bChart ); -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING if ( HasBasic() ) { // Initialize Basic @@ -3624,7 +3624,7 @@ void SfxObjectShell::SetConfigOptionsChecked( bool bChecked ) bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) xHandler; #else if ( !HasBasic() ) diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index dcb115d84624..67cd9642b351 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -113,7 +113,7 @@ namespace { class theCurrentComponent : public rtl::Static< WeakReference< XInterface >, theCurrentComponent > {}; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING // remember all registered components for VBA compatibility, to be able to remove them on disposing the model typedef ::std::map< XInterface*, OString > VBAConstantNameMap; @@ -179,7 +179,7 @@ void SAL_CALL SfxModelListener_Impl::disposing( const com::sun::star::lang::Even SfxObjectShell::SetCurrentComponent( Reference< XInterface >() ); } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING /* Remove VBA component from AppBasic. As every application registers its own current component, the disposed component may not be the "current component" of the SfxObjectShell. */ @@ -677,7 +677,7 @@ bool SfxObjectShell::PrepareClose } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING namespace { static BasicManager* lcl_getBasicManagerForDocument( const SfxObjectShell& _rDocument ) @@ -716,7 +716,7 @@ namespace BasicManager* SfxObjectShell::GetBasicManager() const { BasicManager* pBasMgr = NULL; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING try { pBasMgr = lcl_getBasicManagerForDocument( *this ); @@ -738,7 +738,7 @@ void SfxObjectShell::SetHasNoBasic() bool SfxObjectShell::HasBasic() const { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING return false; #else if ( pImp->m_bNoBasicCapabilities ) @@ -752,7 +752,7 @@ bool SfxObjectShell::HasBasic() const } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING namespace { const Reference< XLibraryContainer >& @@ -785,7 +785,7 @@ namespace Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer() { -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING try { if ( !pImp->m_bNoBasicCapabilities ) @@ -807,7 +807,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer() Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer() { -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING try { if ( !pImp->m_bNoBasicCapabilities ) @@ -828,7 +828,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer() StarBASIC* SfxObjectShell::GetBasic() const { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING return NULL; #else BasicManager * pMan = GetBasicManager(); @@ -873,7 +873,7 @@ void SfxObjectShell::InitBasicManager_Impl() does not take ownership but stores only the raw pointer. Owner of all Basic managers is the global BasicManagerRepository instance. */ -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING DBG_ASSERT( !pImp->bBasicInitialized && !pImp->aBasicManager.isValid(), "Lokaler BasicManager bereits vorhanden"); try { @@ -969,7 +969,7 @@ void SfxObjectShell::SetCurrentComponent( const Reference< XInterface >& _rxComp // In other words, it's still possible that we here do something which is not necessary, // but we should have filtered quite some unnecessary calls already. -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING BasicManager* pAppMgr = SfxGetpApp()->GetBasicManager(); rTheCurrentComponent = _rxComponent; if ( pAppMgr ) @@ -1063,7 +1063,7 @@ OUString SfxObjectShell::GetServiceNameFromFactory( const OUString& rFact ) { aServiceName = "com.sun.star.formula.FormulaProperties"; } -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING else if ( aFact == "sbasic" ) { aServiceName = "com.sun.star.script.BasicIDE"; diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 13a36c8d7e07..4e34a5080bbd 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -611,7 +611,7 @@ Reference< script::XStarBasicAccess > implGetStarBasicAccess( SfxObjectShell* pO { Reference< script::XStarBasicAccess > xRet; -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) pObjectShell; #else if( pObjectShell ) @@ -625,7 +625,7 @@ Reference< script::XStarBasicAccess > implGetStarBasicAccess( SfxObjectShell* pO Reference< container::XNameContainer > SAL_CALL SfxBaseModel::getLibraryContainer() throw( RuntimeException, std::exception ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING Reference< container::XNameContainer > dummy; return dummy; @@ -650,7 +650,7 @@ void SAL_CALL SfxBaseModel::createLibrary( const OUString& LibName, const OUStri const OUString& ExternalSourceURL, const OUString& LinkTargetURL ) throw(container::ElementExistException, RuntimeException, std::exception) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) LibName; (void) Password; (void) ExternalSourceURL; @@ -674,7 +674,7 @@ void SAL_CALL SfxBaseModel::addModule( const OUString& LibraryName, const OUStri const OUString& Language, const OUString& Source ) throw( container::NoSuchElementException, RuntimeException, std::exception) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) LibraryName; (void) ModuleName; (void) Language; @@ -698,7 +698,7 @@ void SAL_CALL SfxBaseModel::addDialog( const OUString& LibraryName, const OUStri const Sequence< sal_Int8 >& Data ) throw(container::NoSuchElementException, RuntimeException, std::exception) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) LibraryName; (void) DialogName; (void) Data; diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx index ead6ea5444fb..c3000407371c 100644 --- a/sfx2/source/inc/appdata.hxx +++ b/sfx2/source/inc/appdata.hxx @@ -19,6 +19,8 @@ #ifndef INCLUDED_SFX2_SOURCE_INC_APPDATA_HXX #define INCLUDED_SFX2_SOURCE_INC_APPDATA_HXX +#include <config_features.h> + #include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <svl/lstner.hxx> @@ -83,13 +85,13 @@ public: // application members SfxFilterMatcher* pMatcher; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING ResMgr* pBasicResMgr; #endif ResMgr* pSvtResMgr; SfxErrorHandler *m_pToolsErrorHdl; SfxErrorHandler *m_pSoErrorHdl; -#ifndef DISABLE_SCRIPTING +#if HAVE_FEATURE_SCRIPTING SfxErrorHandler *m_pSbxErrorHdl; #endif SfxStatusDispatcher* pAppDispatch; diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index b0c06b9aabd7..82e0e94bd36a 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2594,7 +2594,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra */ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro ) { -#ifdef DISABLE_SCRIPTING +#if !HAVE_FEATURE_SCRIPTING (void) sMacro; #else if ( sMacro.isEmpty() ) |