summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-03-04 23:46:09 +0200
committerTor Lillqvist <tml@iki.fi>2012-03-05 02:05:24 +0200
commitc91f279e7e2fc1e520758016d35aee723d6e009b (patch)
treeff693c5d2a99d74df3f7712cc5ec5b7a8c355923 /basic
parent8d8c7739d7d47aa8da481d12b94d2d195bbe0467 (diff)
Revert "Build libsb with a few dummy classes also for --disable-scripting"
Nah, these dummy classes would turn out quite complex anyway. Better to just use ifdefs elsewhere, the number required is not that large. This reverts commit 6d33801b4498f5c13d2dc75588f88c22a11f455b.
Diffstat (limited to 'basic')
-rw-r--r--basic/Library_sb.mk17
-rw-r--r--basic/Module_basic.mk5
-rw-r--r--basic/source/basmgr/basmgr-dummy.cxx389
-rw-r--r--basic/source/classes/sbxmod-dummy.cxx236
4 files changed, 1 insertions, 646 deletions
diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index 0629c3974f0c..017168278608 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -64,8 +64,6 @@ $(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 \
@@ -140,21 +138,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/sbx/sbxvar \
))
-else
-
-$(eval $(call gb_Library_add_exception_objects,sb,\
- basic/source/basmgr/basmgr-dummy \
- basic/source/classes/sbxmod-dummy \
-))
-
-# basic/source/classes/sbunoobj-dummy \
-# basic/source/runtime/basrdll-dummy \
-# basic/source/sbx/sbxobj-dummy \
-# basic/source/sbx/sbxvalue-dummy \
-# basic/source/sbx/sbxvar-dummy \
-
-endif
-
# Uncomment the following line if DBG_TRACE_PROFILING is active in source/inc/sbtrace.hxx
# $(eval $(call gb_Library_add_linked_libs,sb,\
canvastools \
diff --git a/basic/Module_basic.mk b/basic/Module_basic.mk
index af235db8212c..bbd9b6124e24 100644
--- a/basic/Module_basic.mk
+++ b/basic/Module_basic.mk
@@ -32,6 +32,7 @@ ifneq ($(DISABLE_SCRIPTING),TRUE)
$(eval $(call gb_Module_add_targets,basic,\
AllLangResTarget_sb \
+ Library_sb \
))
$(eval $(call gb_Module_add_check_targets,basic,\
@@ -41,10 +42,6 @@ $(eval $(call gb_Module_add_check_targets,basic,\
endif
$(eval $(call gb_Module_add_targets,basic,\
- Library_sb \
-))
-
-$(eval $(call gb_Module_add_targets,basic,\
Package_inc \
))
diff --git a/basic/source/basmgr/basmgr-dummy.cxx b/basic/source/basmgr/basmgr-dummy.cxx
deleted file mode 100644
index c6f57fb3261d..000000000000
--- a/basic/source/basmgr/basmgr-dummy.cxx
+++ /dev/null
@@ -1,389 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <tools/stream.hxx>
-#include <sot/storage.hxx>
-#include <tools/urlobj.hxx>
-#include <svl/smplhint.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/window.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/msgbox.hxx>
-#include <basic/sbx.hxx>
-#include <sot/storinfo.hxx>
-#include <unotools/pathoptions.hxx>
-#include <tools/debug.hxx>
-#include <tools/diagnose_ex.h>
-#include <basic/sbmod.hxx>
-#include <unotools/intlwrapper.hxx>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/string.hxx>
-
-#include <basic/sbuno.hxx>
-#include <basic/basmgr.hxx>
-#include <basic/global.hxx>
-#include <sbunoobj.hxx>
-#include "basrid.hxx"
-#include "sbintern.hxx"
-#include <sb.hrc>
-
-#include <vector>
-
-#define LIB_SEP 0x01
-#define LIBINFO_SEP 0x02
-#define LIBINFO_ID 0x1491
-#define PASSWORD_MARKER 0x31452134
-
-
-// Library API, implemented for XML import/export
-
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/container/XContainer.hpp>
-#include <com/sun/star/script/XStarBasicAccess.hpp>
-#include <com/sun/star/script/XStarBasicModuleInfo.hpp>
-#include <com/sun/star/script/XStarBasicDialogInfo.hpp>
-#include <com/sun/star/script/XStarBasicLibraryInfo.hpp>
-#include <com/sun/star/script/XLibraryContainerPassword.hpp>
-#include <com/sun/star/script/ModuleInfo.hpp>
-#include <com/sun/star/script/vba/XVBACompatibility.hpp>
-#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
-
-#include <cppuhelper/implbase1.hxx>
-
-using com::sun::star::uno::Reference;
-using ::std::vector;
-using ::std::advance;
-using namespace com::sun::star::container;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::script;
-using namespace cppu;
-
-typedef WeakImplHelper1< XNameContainer > NameContainerHelper;
-typedef WeakImplHelper1< XStarBasicModuleInfo > ModuleInfoHelper;
-typedef WeakImplHelper1< XStarBasicDialogInfo > DialogInfoHelper;
-typedef WeakImplHelper1< XStarBasicLibraryInfo > LibraryInfoHelper;
-typedef WeakImplHelper1< XStarBasicAccess > StarBasicAccessHelper;
-
-// Version 1
-// sal_uIntPtr nEndPos
-// sal_uInt16 nId
-// sal_uInt16 nVer
-// sal_Bool bDoLoad
-// String LibName
-// String AbsStorageName
-// String RelStorageName
-// Version 2
-// + sal_Bool bReference
-
-TYPEINIT1( BasicManager, SfxBroadcaster );
-DBG_NAME( BasicManager );
-
-StreamMode eStreamReadMode = STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL;
-StreamMode eStorageReadMode = STREAM_READ | STREAM_SHARE_DENYWRITE;
-
-//----------------------------------------------------------------------------
-// BasicManager impl data
-struct BasicManagerImpl
-{
-};
-
-BasicError::BasicError( sal_uIntPtr nId, sal_uInt16 nR, const String& rErrStr ) :
- aErrStr( rErrStr )
-{
- nErrorId = nId;
- nReason = nR;
-}
-
-BasicError::BasicError( const BasicError& rErr ) :
- aErrStr( rErr.aErrStr )
-{
- nErrorId = rErr.nErrorId;
- nReason = rErr.nReason;
-}
-
-
-//=====================================================================
-
-class BasicLibInfo
-{
-};
-
-
-//=====================================================================
-
-class BasicLibs
-{
-};
-
-BasicManager::BasicManager( SotStorage& /* rStorage */, const String& /* rBaseURL */, StarBASIC* /* pParentFromStdLib */, String* /* pLibPath */, sal_Bool /* bDocMgr */ )
-{
-}
-
-#if 0
-const Reference< XPersistentLibraryContainer >& BasicManager::GetDialogLibraryContainer() const
-{
- static Reference< XPersistentLibraryContainer > dummy;
-
- return dummy;
-}
-
-const Reference< XPersistentLibraryContainer >& BasicManager::GetScriptLibraryContainer() const
-{
- static Reference< XPersistentLibraryContainer > dummy;
-
- return dummy;
-}
-#endif
-void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& /* rInfo */ )
-{
-}
-
-BasicManager::BasicManager( StarBASIC* /* pSLib */, String* /* pLibPath */, sal_Bool /* bDocMgr */ )
-{
-}
-
-void BasicManager::ImpMgrNotLoaded( const String& /* rStorageName */ )
-{
-}
-
-
-void BasicManager::ImpCreateStdLib( StarBASIC* /* pParentFromStdLib */ )
-{
-}
-
-void BasicManager::LoadBasicManager( SotStorage& /* rStorage */, const String& /* rBaseURL */, sal_Bool /* bLoadLibs */ )
-{
-}
-
-void BasicManager::LoadOldBasicManager( SotStorage& /* rStorage */ )
-{
-}
-
-BasicManager::~BasicManager()
-{
- DBG_DTOR( BasicManager, 0 );
-
- // Notify listener if something needs to be saved
- Broadcast( SfxSimpleHint( SFX_HINT_DYING) );
-
- // Destroy Basic-Infos...
- // In reverse order
- delete pLibs;
- delete mpImpl;
-}
-
-void BasicManager::LegacyDeleteBasicManager( BasicManager*& _rpManager )
-{
- delete _rpManager;
- _rpManager = NULL;
-}
-
-
-bool BasicManager::HasExeCode( const String& /* sLib */ )
-{
- return false;
-}
-
-void BasicManager::Init()
-{
-}
-
-BasicLibInfo* BasicManager::CreateLibInfo()
-{
- return 0;
-}
-
-sal_Bool BasicManager::ImpLoadLibary( BasicLibInfo* /* pLibInfo */, SotStorage* /* pCurStorage */, sal_Bool /* bInfosOnly */ )
-{
- return sal_False;
-}
-
-sal_Bool BasicManager::ImplEncryptStream( SvStream& /* rStrm */ ) const
-{
- return sal_False;
-}
-
-// This code is necessary to load the BASIC of Beta 1
-// TODO: Which Beta 1?
-sal_Bool BasicManager::ImplLoadBasic( SvStream& /* rStrm */, StarBASICRef& /* rOldBasic */ ) const
-{
- return sal_False;
-}
-
-void BasicManager::CheckModules( StarBASIC* /* pLib */, sal_Bool /* bReference */ ) const
-{
-}
-
-StarBASIC* BasicManager::AddLib( SotStorage& /* rStorage */, const String& /* rLibName */, sal_Bool /* bReference */ )
-{
- return 0;
-}
-
-sal_Bool BasicManager::IsReference( sal_uInt16 /* nLib */ )
-{
- return sal_False;
-}
-
-sal_Bool BasicManager::RemoveLib( sal_uInt16 /* nLib */ )
-{
- return sal_False;
-}
-
-sal_Bool BasicManager::RemoveLib( sal_uInt16 /* nLib */, sal_Bool /* bDelBasicFromStorage */ )
-{
- return sal_False;
-}
-
-sal_uInt16 BasicManager::GetLibCount() const
-{
- return 0;
-}
-
-StarBASIC* BasicManager::GetLib( sal_uInt16 /* nLib */ ) const
-{
- return 0;
-}
-
-StarBASIC* BasicManager::GetStdLib() const
-{
- return 0;
-}
-
-StarBASIC* BasicManager::GetLib( const String& /* rName */ ) const
-{
- return 0;
-}
-
-sal_uInt16 BasicManager::GetLibId( const String& /* rName */ ) const
-{
- return LIB_NOTFOUND;
-}
-
-sal_Bool BasicManager::HasLib( const String& /* rName */ ) const
-{
- return sal_False;
-}
-
-sal_Bool BasicManager::SetLibName( sal_uInt16 /* nLib */, const String& /* rName */ )
-{
- return sal_False;
-}
-
-String BasicManager::GetLibName( sal_uInt16 /* nLib */ )
-{
- return String();
-}
-
-sal_Bool BasicManager::LoadLib( sal_uInt16 /* nLib */ )
-{
- return sal_False;
-}
-
-StarBASIC* BasicManager::CreateLib( const String& /* rLibName */ )
-{
- return 0;
-}
-
-// For XML import/export:
-StarBASIC* BasicManager::CreateLib
-( const String& /* rLibName */, const String& /* Password */, const String& /* LinkTargetURL */ )
-{
- return 0;
-}
-
-StarBASIC* BasicManager::CreateLibForLibContainer( const String& /* rLibName */,
- const Reference< XLibraryContainer >& /* xScriptCont */ )
-{
- return 0;
-}
-
-
-BasicLibInfo* BasicManager::FindLibInfo( StarBASIC* /* pBasic */ ) const
-{
- return 0;
-}
-
-
-sal_Bool BasicManager::IsModified() const
-{
- return sal_False;
-}
-
-sal_Bool BasicManager::IsBasicModified() const
-{
- return sal_False;
-}
-
-std::vector<BasicError>& BasicManager::GetErrors()
-{
- static std::vector<BasicError> dummy;
-
- return dummy;
-}
-
-bool BasicManager::GetGlobalUNOConstant( const sal_Char* /* _pAsciiName */, ::com::sun::star::uno::Any& /* aOut */ )
-{
- return false;
-}
-
-Any BasicManager::SetGlobalUNOConstant( const sal_Char* /* _pAsciiName */, const Any& /* _rValue */ )
-{
- return Any();
-}
-
-bool BasicManager::LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< rtl::OUString >& /* _out_rModuleNames */ )
-{
- return false;
-}
-
-
-bool BasicManager::HasMacro( String const& /* i_fullyQualifiedName */ ) const
-{
- return false;
-}
-
-ErrCode BasicManager::ExecuteMacro( String const& /* i_fullyQualifiedName */, SbxArray* /* i_arguments */, SbxValue* /* retValue */ )
-{
- return ERRCODE_BASIC_PROC_UNDEFINED;
-}
-
-ErrCode BasicManager::ExecuteMacro( String const& /* i_fullyQualifiedName */, String const& /* i_commaSeparatedArgs */, SbxValue* /* i_retValue */ )
-{
- return ERRCODE_BASIC_PROC_UNDEFINED;
-}
-
-// Basic XML Import/Export
-Reference< XStarBasicAccess > getStarBasicAccess( BasicManager* /* pMgr */ )
-{
- static Reference< XStarBasicAccess > dummy;
-
- return dummy;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/classes/sbxmod-dummy.cxx b/basic/source/classes/sbxmod-dummy.cxx
deleted file mode 100644
index f83d9db91e24..000000000000
--- a/basic/source/classes/sbxmod-dummy.cxx
+++ /dev/null
@@ -1,236 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include <list>
-
-#include <vcl/svapp.hxx>
-#include <tools/stream.hxx>
-#include <svl/brdcst.hxx>
-#include <tools/shl.hxx>
-#include <basic/sbx.hxx>
-#include "sbdiagnose.hxx"
-#include "sb.hxx"
-#include <sbjsmeth.hxx>
-#include "sbjsmod.hxx"
-#include "sbintern.hxx"
-#include "image.hxx"
-#include "opcodes.hxx"
-#include "runtime.hxx"
-#include "token.hxx"
-#include "sbunoobj.hxx"
-
-#include <svtools/syntaxhighlight.hxx>
-
-#include <basic/basrdll.hxx>
-#include <osl/mutex.hxx>
-#include <basic/sbobjmod.hxx>
-#include <basic/vbahelper.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <unotools/eventcfg.hxx>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/script/ModuleType.hpp>
-#include <com/sun/star/script/vba/XVBACompatibility.hpp>
-#include <com/sun/star/document/XVbaMethodParameter.hpp>
-#include <com/sun/star/script/vba/VBAScriptEventId.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/document/XEventBroadcaster.hpp>
-#include <com/sun/star/document/XEventListener.hpp>
-
-using namespace com::sun::star;
-
-#include <stdio.h>
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <comphelper/processfactory.hxx>
-#include <vcl/svapp.hxx>
-#include <map>
-#include <com/sun/star/reflection/XProxyFactory.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <basic/sbobjmod.hxx>
-#include <com/sun/star/uno/XAggregation.hpp>
-#include <com/sun/star/script/XInvocation.hpp>
-
-using namespace ::com::sun::star;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::reflection;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::script;
-
-
-#include <com/sun/star/script/XLibraryContainer.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/awt/XDialogProvider.hpp>
-#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/awt/XControl.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <comphelper/anytostring.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <ooo/vba/VbQueryClose.hpp>
-
-typedef ::cppu::WeakImplHelper1< XInvocation > DocObjectWrapper_BASE;
-typedef ::std::map< sal_Int16, Any, ::std::less< sal_Int16 > > OutParamMap;
-::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
-void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue );
-
-// TYPEINIT1(SbModule,SbxObject)
-// TYPEINIT1(SbMethod,SbxMethod)
-
-SbModule::SbModule( const String& /* rName */, sal_Bool /* bVBACompat */ )
- : SbxObject( String( ) )
-{
-}
-
-SbModule::~SbModule()
-{
-}
-
-uno::Reference< script::XInvocation >
-SbModule::GetUnoModule()
-{
- static uno::Reference< script::XInvocation > dummy;
-
- return dummy;
-}
-
-sal_Bool SbModule::IsCompiled() const
-{
- return sal_False;
-}
-
-const SbxObject* SbModule::FindType( String /* aTypeName */ ) const
-{
- return 0;
-}
-
-void SbModule::Clear()
-{
-}
-
-SbxVariable* SbModule::Find( const XubString& /* rName */, SbxClassType /* t */ )
-{
- return 0;
-}
-
-const ::rtl::OUString& SbModule::GetSource32() const
-{
- static ::rtl::OUString dummy;
-
- return dummy;
-}
-
-const String& SbModule::GetSource() const
-{
- static String dummy;
-
- return dummy;
-}
-
-void SbModule::SetParent( SbxObject* /* p */ )
-{
-}
-
-void SbModule::SFX_NOTIFY( SfxBroadcaster& /* rBC */, const TypeId& /* rBCType */,
- const SfxHint& /* rHint */, const TypeId& /* rHintType */ )
-{
-}
-
-void SbModule::SetSource( const String& /* r */ )
-{
-}
-
-SbMethod* SbModule::GetFunctionForLine( sal_uInt16 /* nLine */ )
-{
- return 0;
-}
-
-sal_Bool SbModule::IsVBACompat() const
-{
- return sal_False;
-}
-
-void SbModule::SetVBACompat( sal_Bool /* bCompat */ )
-{
-}
-
-sal_Bool SbModule::IsBreakable( sal_uInt16 /* nLine */ ) const
-{
- return sal_False;
-}
-
-size_t SbModule::GetBPCount() const
-{
- return 0;
-}
-
-sal_uInt16 SbModule::GetBP( size_t /* n */ ) const
-{
- return 0;
-}
-
-sal_Bool SbModule::IsBP( sal_uInt16 /* nLine */ ) const
-{
- return sal_False;
-}
-
-sal_Bool SbModule::SetBP( sal_uInt16 /* nLine */ )
-{
- return sal_False;
-}
-
-sal_Bool SbModule::ClearBP( sal_uInt16 /* nLine */ )
-{
- return sal_False;
-}
-
-void SbModule::ClearAllBP()
-{
-}
-
-sal_Bool SbModule::LoadData( SvStream& /* rStrm */, sal_uInt16 /* nVer */ )
-{
- return sal_False;
-}
-
-sal_Bool SbModule::StoreData( SvStream& /* rStrm */ ) const
-{
- return sal_False;
-}
-
-sal_Bool SbModule::LoadCompleted()
-{
- return sal_False;
-}
-
-sal_Bool SbModule::Compile()
-{
- return sal_False;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */