[Libreoffice-commits] .: 7 commits - basic/Library_sb.mk basic/Module_basic.mk basic/source boost/boost_1_44_0-unused-parameters.patch cppunit/warnings.patch ios/qa Makefile README.cross RepositoryFixes.mk sc/source solenv/gbuild

Tor Lillqvist tml at kemper.freedesktop.org
Wed Feb 29 15:27:01 PST 2012


 Makefile                                   |    6 
 README.cross                               |   11 
 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 +++++++++++++++++
 boost/boost_1_44_0-unused-parameters.patch |   39 ++
 cppunit/warnings.patch                     |   11 
 ios/qa/sc/Makefile                         |    2 
 sc/source/core/data/validat.cxx            |    3 
 sc/source/core/tool/compiler.cxx           |    6 
 sc/source/core/tool/interpr4.cxx           |   12 
 solenv/gbuild/platform/IOS_ARM_GCC.mk      |   15 -
 solenv/gbuild/platform/com_GCC_defs.mk     |    9 
 15 files changed, 742 insertions(+), 20 deletions(-)

New commits:
commit e3b45e857bceea3e9830a26d911164d26dbff56f
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 01:14:13 2012 +0200

    Add more libs
    
    Still doesn't link, dozens of undefines. And of course the whole
    question of how to do static linking to UNO components in an elegant
    fashion with the least intrusive ugly changes to source code has not
    been resolved yet.

diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index 1580ebf..7280215 100644
--- a/ios/qa/sc/Makefile
+++ b/ios/qa/sc/Makefile
@@ -19,7 +19,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/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo -lcomphelpgcc3 -leditenglo -lfwelo -lfwilo -lfwklo -li18nisolang1gcc3 -li18npaperlo -licuuc -ljpeg -llnglo -lsalcpprt -lsfxlo -lsvllo -lsvtlo -lutllo -lvcllo -lsaxlo -lsclo -lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -lxolo -lcppunit -lunotest -luno_cppuhelpergcc3 -luno_cppu -luno_salhelpergcc3 -luno_sal -lsal_textenc $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -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 -li18nisolang1gcc3 -li18npaperlo -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
 
 all: $(APPDIR)/$(APP)
 
commit 7a0b721462182c3a4029c586f90d13eda674eac9
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 01:12:58 2012 +0200

    Filter out options that Clang doesn't have

diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 5c8dde6..03bae7b 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -64,11 +64,15 @@ gb_CXXFLAGS := \
 	-Wno-ctor-dtor-privacy \
 	-Wno-non-virtual-dtor \
 	-fno-strict-aliasing \
-	-fsigned-char \
-	-malign-natural \
-	#-Wshadow \ break in compiler headers already
-	#-fsigned-char \ might be removed?
-	#-malign-natural \ might be removed?
+	-fsigned-char
+
+# No idea if -malign-natural is needed, but macosx.mk uses it...
+# Why it isn't used in gb_CFLAGS I have no idea.
+# Anyway, Clang doesn't have this option.
+ifeq (,$(findstring /clang,$(CXX)))
+gb_CXXFLAGS += \
+	-malign-natural
+endif
 
 # these are to get gcc to switch to Objective-C++ or Objective-C mode
 gb_OBJC_OBJCXX_COMMON_FLAGS := -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300
@@ -203,6 +207,7 @@ gb_Library__FRAMEWORKS := \
     Foundation \
     CoreFoundation \
     CoreGraphics \
+	CoreText \
 
 gb_Library_PLAINLIBS_NONE += \
     objc \
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index fb032ad..b6aff7f 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -118,8 +118,13 @@ endif
 
 gb_LinkTarget_EXCEPTIONFLAGS := \
 	-DEXCEPTIONS_ON \
-	-fexceptions \
-	-fno-enforce-eh-specs \
+	-fexceptions
+
+# Clang doesn't have this option
+ifeq (,$(findstring /clang,$(CXX)))
+gb_LinkTarget_EXCEPTIONFLAGS += \
+	-fno-enforce-eh-specs
+endif
 
 gb_LinkTarget_NOEXCEPTIONFLAGS := \
 	-DEXCEPTIONS_OFF \
commit fead7eb86f0e7e095f873f20bd6812a5bded0e74
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 01:11:48 2012 +0200

    Some initial DISABLE_SCRIPTING ifdefs

diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index a759385..dbb3f07 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -292,6 +292,7 @@ sal_Bool ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
     //  ist das Sbx-Objekt evtl. nicht angelegt (?)
 //  pDocSh->GetSbxObject();
 
+#ifndef DISABLE_SCRIPTING
     //  keine Sicherheitsabfrage mehr vorneweg (nur CheckMacroWarn), das passiert im CallBasic
 
     //  Funktion ueber den einfachen Namen suchen,
@@ -367,7 +368,7 @@ sal_Bool ScValidationData::DoMacro( const ScAddress& rPos, const String& rInput,
             bRet = sal_True;
         bDone = sal_True;
     }
-
+#endif
     if ( !bDone && !pCell )         // Makro nicht gefunden (nur bei Eingabe)
     {
         //! andere Fehlermeldung, wenn gefunden, aber nicht bAllowed ??
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index a1c1ecf..454fab9 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2878,6 +2878,11 @@ bool ScCompiler::IsReference( const String& rName )
 
 bool ScCompiler::IsMacro( const String& rName )
 {
+#ifdef DISABLE_SCRIPTING
+    (void) rName;
+
+    return false;
+#else
     String aName( rName);
     StarBASIC* pObj = 0;
     SfxObjectShell* pDocSh = pDoc->GetDocumentShell();
@@ -2913,6 +2918,7 @@ bool ScCompiler::IsMacro( const String& rName )
     aToken.eOp = ocMacro;
     pRawToken = aToken.Clone();
     return true;
+#endif
 }
 
 bool ScCompiler::IsNamedRange( const String& rUpperName )
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 9e047ac..56af5a1 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3045,6 +3045,8 @@ void ScInterpreter::ScMissing()
     PushTempToken( new FormulaMissingToken );
 }
 
+#ifndef DISABLE_SCRIPTING
+
 uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCellRange, ScDocument* pDok )
 {
     uno::Reference< sheet::XSheetCellRange > xSheetRange( xCellRange, uno::UNO_QUERY_THROW );
@@ -3101,11 +3103,17 @@ lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPar )
     return bOk;
 }
 
+#endif
+
 void ScInterpreter::ScMacro()
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScMacro" );
     SbxBase::ResetError();
 
+#ifdef DISABLE_SCRIPTING
+    PushNoValue();      // ohne DocShell kein CallBasic
+    return;
+#else
     sal_uInt8 nParamCount = GetByte();
     String aMacro( pCur->GetExternal() );
 
@@ -3348,8 +3356,10 @@ void ScInterpreter::ScMacro()
 
     if (bVolatileMacro && meVolatileType == NOT_VOLATILE)
         meVolatileType = VOLATILE_MACRO;
+#endif
 }
 
+#ifndef DISABLE_SCRIPTING
 
 bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
 {
@@ -3405,6 +3415,8 @@ bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
     return bOk;
 }
 
+#endif
+
 namespace {
 
 class FindByPointer : ::std::unary_function<ScInterpreterTableOpParams, bool>
commit 6d33801b4498f5c13d2dc75588f88c22a11f455b
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 01:03:52 2012 +0200

    Build libsb with a few dummy classes also for --disable-scripting
    
    Work in progress, the dummy class implementations surely still
    incomplete and/or might contain methods not actually needed. More
    dummy class implementations needed, hopefully not too many
    though. Will add also a few ifdefs for DISABLE_SCRIPTING in some key
    places in sc and elsewhere to cut down on the need.

diff --git a/Makefile b/Makefile
index 4bdd183..82cb710 100644
--- a/Makefile
+++ b/Makefile
@@ -383,12 +383,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..0629c39 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 \
@@ -138,6 +140,21 @@ $(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 bbd9b61..af235db 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,10 @@ $(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
new file mode 100644
index 0000000..c6f57fb
--- /dev/null
+++ b/basic/source/basmgr/basmgr-dummy.cxx
@@ -0,0 +1,389 @@
+/* -*- 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
new file mode 100644
index 0000000..f83d9db
--- /dev/null
+++ b/basic/source/classes/sbxmod-dummy.cxx
@@ -0,0 +1,236 @@
+/* -*- 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: */
commit c57f1a0dfd504f1d7c2c285b89fdc173918941d7
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 00:40:49 2012 +0200

    Modify iOS device example to use Clang

diff --git a/README.cross b/README.cross
index e2b9f21..c610eda 100644
--- a/README.cross
+++ b/README.cross
@@ -271,9 +271,9 @@ thought yet.
 The Apple tool-chain for iOS cross-building is available only for
 Mac OS X.
 
-Here is an autogen.lastrun for iOS (device):
-CXX=ccache /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
-CC=ccache /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
+Here is an autogen.lastrun for iOS (device) using Xcode 4.3 and clang:
+CXX=ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
+CC=ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
 CC_FOR_BUILD=ccache /Xcode3/usr/bin/gcc-4.0 -mmacosx-version-min=10.4
 CXX_FOR_BUILD=ccache /Xcode3/usr/bin/g++-4.0 -mmacosx-version-min=10.4
 --with-distro=LibreOfficeiOS
@@ -283,7 +283,7 @@ CXX_FOR_BUILD=ccache /Xcode3/usr/bin/g++-4.0 -mmacosx-version-min=10.4
 --without-helppack-integration
 --without-myspell-dicts
 
-And here for the iOS simulator, using Xcode 4.2:
+And here for the iOS simulator, using Xcode 4.2 and gcc:
 CXX=ccache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
 CC=ccache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
 CC_FOR_BUILD=ccache /Xcode3/usr/bin/gcc-4.0 -mmacosx-version-min=10.4
@@ -303,8 +303,7 @@ or g++ won't find its headers like <bits/c++config.h>
 The --with-system-nss doesn't mean that any Mozilla NSS would be used,
 it's just a trick to bypass some tests in the configure script.
 
-For the iOS simulator, using Xcode 4.3:
-
+For the iOS simulator, using Xcode 4.3 and gcc (should switch to clang here, too):
 CXX=ccache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
 CC=ccache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
 CC_FOR_BUILD=ccache /Xcode3/usr/bin/gcc-4.0 -mmacosx-version-min=10.4
commit 084a54e87b25d33815cecc837504b707ce3ebc52
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 00:26:22 2012 +0200

    WaE: unused parameter

diff --git a/boost/boost_1_44_0-unused-parameters.patch b/boost/boost_1_44_0-unused-parameters.patch
index b50285a..631e3e2 100644
--- a/boost/boost_1_44_0-unused-parameters.patch
+++ b/boost/boost_1_44_0-unused-parameters.patch
@@ -405,6 +405,21 @@
       {
         assign_value(expr, is_reference_predicate());
       }
+@@ -846,12 +846,12 @@
+ 
+ template<class T>
+ inline
+-bool operator == ( none_t x, optional<T> const& y )
++bool operator == ( __attribute__ ((unused)) none_t x, optional<T> const& y )
+ { return equal_pointees(optional<T>() ,y); }
+ 
+ template<class T>
+ inline
+-bool operator < ( none_t x, optional<T> const& y )
++bool operator < ( __attribute__ ((unused)) none_t x, optional<T> const& y )
+ { return less_pointees(optional<T>() ,y); }
+ 
+ template<class T>
 --- misc/boost_1_44_0/boost/spirit/home/classic/actor/ref_const_ref_actor.hpp	2008-06-22 17:05:38.000000000 +0200
 +++ misc/build/boost_1_44_0/boost/spirit/home/classic/actor/ref_const_ref_actor.hpp	2012-01-20 12:44:07.124316347 +0100
 @@ -63,8 +63,8 @@
@@ -867,3 +882,27 @@
      typedef boost::date_time::all_date_names_put<greg_facet_config, wchar_t> facet_def;
      return std::locale(loc, new facet_def(w_short_month_names,
                                            w_long_month_names,
+--- misc/boost_1_44_0/boost/ptr_container/detail/default_deleter.hpp
++++ misc/build/boost_1_44_0/boost/ptr_container/detail/default_deleter.hpp
+@@ -61,7 +61,7 @@
+ { 
+     default_deleter() { }
+     template<typename TT>
+-    default_deleter(default_deleter<TT> tt) { }
++    default_deleter(__attribute__ ((unused)) default_deleter<TT> tt) { }
+ };
+ 
+ } } } // End namespaces ptr_container_detail, move_ptrs, boost.
+--- misc/boost_1_44_0/boost/ptr_container/ptr_sequence_adapter.hpp
++++ misc/build/boost_1_44_0/boost/ptr_container/ptr_sequence_adapter.hpp
+@@ -664,8 +664,8 @@
+             
+         }
+ 
+-        void range_check_impl( iterator first, iterator last, 
+-                               std::bidirectional_iterator_tag )
++        void range_check_impl( __attribute__ ((unused)) iterator first, __attribute__ ((unused)) iterator last, 
++                               std::bidirectional_iterator_tag )
+         { /* do nothing */ }
+ 
+         void range_check_impl( iterator first, iterator last,
commit c1dc38282b4220db7a31f70e8272aaa170fd4c76
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Mar 1 00:13:54 2012 +0200

    WaE: unused parameter

diff --git a/cppunit/warnings.patch b/cppunit/warnings.patch
index 39e804a..56facb2 100644
--- a/cppunit/warnings.patch
+++ b/cppunit/warnings.patch
@@ -20,3 +20,14 @@
    {                                                   \
      return 0;                                         \
    }                                                   \
+--- misc/cppunit-1.12.1/include/cppunit/extensions/ExceptionTestCaseDecorator.h
++++ misc/build/cppunit-1.12.1/include/cppunit/extensions/ExceptionTestCaseDecorator.h
+@@ -92,7 +92,7 @@
+    *
+    * Should be overriden to check the exception.
+    */
+-  virtual void checkException( ExpectedExceptionType &e )
++  virtual void checkException( ExpectedExceptionType & )
+   {
+   }
+ };


More information about the Libreoffice-commits mailing list