From c91f279e7e2fc1e520758016d35aee723d6e009b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 4 Mar 2012 23:46:09 +0200 Subject: 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. --- Makefile | 6 +- RepositoryFixes.mk | 1 + basic/Library_sb.mk | 17 -- basic/Module_basic.mk | 5 +- basic/source/basmgr/basmgr-dummy.cxx | 389 ---------------------------------- basic/source/classes/sbxmod-dummy.cxx | 236 --------------------- ios/qa/sc/Makefile | 2 +- 7 files changed, 6 insertions(+), 650 deletions(-) delete mode 100644 basic/source/basmgr/basmgr-dummy.cxx delete mode 100644 basic/source/classes/sbxmod-dummy.cxx diff --git a/Makefile b/Makefile index cd1d27febda6..b83ee6a67db0 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 vbahelper "delivered" because as we -# don't link to any libs from there they won't otherwise be, or +# 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 # 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) vbahelper + $(GNUMAKE) basic vbahelper endif ifeq ($(DISABLE_DBCONNECTIVITY),TRUE) # Ditto for dbconnectivity in the --disable-database-connectivity case diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk index c15643f62df7..ef2b957105cc 100644 --- a/RepositoryFixes.mk +++ b/RepositoryFixes.mk @@ -132,6 +132,7 @@ 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 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,\ @@ -40,10 +41,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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "basrid.hxx" -#include "sbintern.hxx" -#include - -#include - -#define LIB_SEP 0x01 -#define LIBINFO_SEP 0x02 -#define LIBINFO_ID 0x1491 -#define PASSWORD_MARKER 0x31452134 - - -// Library API, implemented for XML import/export - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -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& BasicManager::GetErrors() -{ - static std::vector 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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include - -#include -#include -#include -#include -#include -#include "sbdiagnose.hxx" -#include "sb.hxx" -#include -#include "sbjsmod.hxx" -#include "sbintern.hxx" -#include "image.hxx" -#include "opcodes.hxx" -#include "runtime.hxx" -#include "token.hxx" -#include "sbunoobj.hxx" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace com::sun::star; - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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: */ diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile index 3bfbcddc7215..3c26b7cc8266 100644 --- a/ios/qa/sc/Makefile +++ b/ios/qa/sc/Makefile @@ -20,7 +20,7 @@ SRCS = filters-test.m CFLAGS = $(SOLARINC) -LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a -Wl,$(OUTDIR)/lib/bootstrap.uno.a -Wl,$(OUTDIR)/lib/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo -lcomphelpgcc3 -lcppunit -ldrawinglayerlo -leditenglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsblo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc +LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a -Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a -Wl,$(OUTDIR)/lib/bootstrap.uno.a -Wl,$(OUTDIR)/lib/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo -lcomphelpgcc3 -lcppunit -ldrawinglayerlo -leditenglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -lgcc3_uno -li18nisolang1gcc3 -li18npaperlo -li18nutilgcc3 -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt -lsaxlo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo -lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -luno_cppuhelpergcc3 -luno_cppu -luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader -lxolo -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc all: $(APPDIR)/$(APP) -- cgit v1.2.3