summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/app.cxx18
-rw-r--r--sfx2/source/appl/appbas.cxx13
-rw-r--r--sfx2/source/appl/appbaslib.cxx11
-rw-r--r--sfx2/source/appl/appdata.cxx10
-rw-r--r--sfx2/source/appl/appdde.cxx2
-rw-r--r--sfx2/source/appl/appinit.cxx5
-rw-r--r--sfx2/source/appl/appquit.cxx10
-rw-r--r--sfx2/source/appl/appserv.cxx18
-rw-r--r--sfx2/source/appl/macroloader.cxx4
9 files changed, 50 insertions, 41 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;