1. mst
  2. ooo340

Commits

Andreas Bregas  committed 38e1338

#i117595# #i31001# #i54049# #i91121# #i107277# #i74147# Migrate to explicit symbol export + Curreny rework

  • Participants
  • Parent commits a22158b
  • Branches ab78

Comments (0)

Files changed (51)

File automation/source/testtool/objtest.cxx

View file
  • Ignore whitespace
 }
 
 
+IMPL_GEN_RES_STR;
+
 void TestToolObj::SendViaSocket()
 {
 	if ( !pCommunicationManager )

File automation/util/makefile.mk

View file
  • Ignore whitespace
 APP1DEPN+=$(SHL2IMPLIBN) $(SHL3IMPLIBN)
 .ENDIF
 APP1STDLIBS= \
-		$(APP3RDLIB) \
-		$(SAMPLE3RDLIB)
+		$(SBAPPLIB)
 
 APP1STDLIBS+= \
 			$(CPPUHELPERLIB) \

File basic/inc/basic/basicdllapi.hxx

View file
  • Ignore whitespace
+/*************************************************************************
+*
+* 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.
+*
+************************************************************************/
+
+#ifndef INCLUDED_BASIC_BASICDLLAPI_HXX
+#define INCLUDED_BASIC_BASICDLLAPI_HXX
+
+#include "sal/config.h"
+
+#include "sal/types.h"
+
+#if defined BASIC_DLLIMPLEMENTATION
+#define BASIC_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define BASIC_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+#endif

File basic/inc/basic/basicmanagerrepository.hxx

View file
  • Ignore whitespace
 #ifndef BASICMANAGERREPOSITORY_HXX
 #define BASICMANAGERREPOSITORY_HXX
 
+#include <basic/basicdllapi.hxx>
+
 /** === begin UNO includes === **/
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/embed/XStorage.hpp>
 	//====================================================================
 	//= BasicManagerRepository
 	//====================================================================
-	class BasicManagerRepository
+	class BASIC_DLLPUBLIC BasicManagerRepository
 	{
     public:
         /** returns the BasicManager belonging to the given document

File basic/inc/basic/basicrt.hxx

View file
  • Ignore whitespace
 class SbiRuntime;
 class SbErrorStackEntry;
 
-class BasicRuntime
+class BASIC_DLLPUBLIC BasicRuntime
 {
 	SbiRuntime* pRun;
 public:
 	BasicRuntime GetNextRuntime();
 };
 
-class BasicErrorStackEntry
+class BASIC_DLLPUBLIC BasicErrorStackEntry
 {
 	SbErrorStackEntry *pEntry;
 public:
 	xub_StrLen GetCol2();
 };
 
-class BasicRuntimeAccess
+class BASIC_DLLPUBLIC BasicRuntimeAccess
 {
 public:
 	static BasicRuntime GetRuntime();

File basic/inc/basic/basmgr.hxx

View file
  • Ignore whitespace
 #ifndef _BASMGR_HXX
 #define _BASMGR_HXX
 
+#include <basic/basicdllapi.hxx>
 #include <tools/string.hxx>
 #include <svl/brdcst.hxx>
 #include <basic/sbstar.hxx>
 
 
 // Basic XML Import/Export
-com::sun::star::uno::Reference< com::sun::star::script::XStarBasicAccess >
+BASIC_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::script::XStarBasicAccess >
 	getStarBasicAccess( BasicManager* pMgr );
 
 
 
 #define LIB_NOTFOUND	0xFFFF
 
-class BasicManager : public SfxBroadcaster
+class BASIC_DLLPUBLIC BasicManager : public SfxBroadcaster
 {
     friend class LibraryContainer_Impl;
     friend class StarBasicAccess_Impl;

File basic/inc/basic/basrdll.hxx

View file
  • Ignore whitespace
 
 class ResMgr;
 
+#include <basic/basicdllapi.hxx>
 #include <vcl/accel.hxx>
 
-class BasicDLL
+class BASIC_DLLPUBLIC BasicDLL
 {
 private:
 	ResMgr*		pSttResMgr;

File basic/inc/basic/modsizeexceeded.hxx

View file
  • Ignore whitespace
 #ifndef _BASIC_MODSIZEEXCEEDED_HXX
 #define _BASIC_MODSIZEEXCEEDED_HXX
 
+#include <basic/basicdllapi.hxx>
 #include <com/sun/star/task/XInteractionHandler.hpp>
 #include <cppuhelper/implbase1.hxx>
 
-class ModuleSizeExceeded : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
+class BASIC_DLLPUBLIC ModuleSizeExceeded : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
 {
     // C++ interface
     public:

File basic/inc/basic/mybasic.hxx

View file
  • Ignore whitespace
 #define SBXID_MYBASIC	0x594D		// MyBasic: MY
 #define	SBXCR_TEST		0x54534554	// TEST
 
-class MyBasic : public StarBASIC
+class BASIC_DLLPUBLIC MyBasic : public StarBASIC
 {
     SbError nError;
 	virtual sal_Bool ErrorHdl();

File basic/inc/basic/process.hxx

View file
  • Ignore whitespace
 typedef std::map< String, String > Environment;
 typedef Environment::value_type EnvironmentVariable;
 
-class Process
+class BASIC_DLLPUBLIC Process
 {
 	// Internal members and methods
 	vos::OArgumentList *pArgumentList;

File basic/inc/basic/sbdef.hxx

View file
  • Ignore whitespace
 #ifndef _SB_SBDEF_HXX
 #define _SB_SBDEF_HXX
 
+#include <basic/basicdllapi.hxx>
 #include <basic/sbxdef.hxx>
 #include <svl/svarray.hxx>
 
     SbTextType eType;        // Type of the portion
 };
 
-SV_DECL_VARARR(SbTextPortions, SbTextPortion,16,16)
+SV_DECL_VARARR_VISIBILITY(SbTextPortions, SbTextPortion,16,16,BASIC_DLLPUBLIC)
 #else
 class SbTextPortions;
 #endif
 
 // Returns type name for Basic type, array flag is ignored
 // implementation: basic/source/runtime/methods.cxx
-String getBasicTypeName( SbxDataType eType );
+BASIC_DLLPUBLIC String getBasicTypeName( SbxDataType eType );
 
 // Returns type name for Basic objects, especially
 // important for SbUnoObj instances
 // implementation: basic/source/classes/sbunoobj.cxx
 class SbxObject;
-String getBasicObjectTypeName( SbxObject* pObj );
+BASIC_DLLPUBLIC String getBasicObjectTypeName( SbxObject* pObj );
 
 // Allows Basic IDE to set watch mode to suppress errors
 // implementation: basic/source/runtime/runtime.cxx
-void setBasicWatchMode( bool bOn );
+BASIC_DLLPUBLIC void setBasicWatchMode( bool bOn );
 
 // Debug Flags:
 #define SbDEBUG_BREAK       0x0001          // Break-Callback

File basic/inc/basic/sbmeth.hxx

View file
  • Ignore whitespace
 #ifndef _SB_SBMETH_HXX
 #define _SB_SBMETH_HXX
 
+#include <basic/basicdllapi.hxx>
+
 #include <tools/errcode.hxx>
 #include <basic/sbxmeth.hxx>
 #include <basic/sbdef.hxx>
 class SbModule;
 class SbMethodImpl;
 
-class SbMethod : public SbxMethod
+class BASIC_DLLPUBLIC SbMethod : public SbxMethod
 {
 	friend class SbiRuntime;
 	friend class SbiFactory;
 	sal_uInt32	  GetId() const				 { return nStart;	   }
 	sal_uInt16    GetDebugFlags()			 { return nDebugFlags; }
 	void 	  SetDebugFlags( sal_uInt16 n )  { nDebugFlags = n;    }
-	void 	  GetLineRange( sal_uInt16&, sal_uInt16& );
+	void GetLineRange( sal_uInt16&, sal_uInt16& );
 
 	// Schnittstelle zum Ausfuehren einer Methode aus den Applikationen
 	virtual ErrCode Call( SbxValue* pRet = NULL );

File basic/inc/basic/sbmod.hxx

View file
  • Ignore whitespace
 #ifndef _SB_SBMOD_HXX
 #define _SB_SBMOD_HXX
 
+#include <basic/basicdllapi.hxx>
+
 #include <com/sun/star/script/XInvocation.hpp>
 #include <basic/sbdef.hxx>
 #include <basic/sbxobj.hxx>
 struct SbClassData;
 class SbModuleImpl;
 
-class SbModule : public SbxObject
+class BASIC_DLLPUBLIC SbModule : public SbxObject
 {
 	friend class	TestToolObj;	// allows module initialisation at runtime
 	friend class	SbiCodeGen;
 	SbProcedureProperty* GetProcedureProperty( const String&, SbxDataType );
 	SbIfaceMapperMethod* GetIfaceMapperMethod( const String&, SbMethod* );
 	void			EndDefinitions( sal_Bool=sal_False );
-	sal_uInt16 			Run( SbMethod* );
-	void			RunInit();
+	sal_uInt16 		Run( SbMethod* );
+	void RunInit();
 	void 			ClearPrivateVars();
 	void 			ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic );
 	void			GlobalRunInit( sal_Bool bBasicStart );	// for all modules
 public:
 	SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2);
 	TYPEINFO();
-					SbModule( const String&, sal_Bool bCompat = sal_False );
+	SbModule( const String&, sal_Bool bCompat = sal_False );
 	virtual void	SetParent( SbxObject* );
 	virtual void 	Clear();
 
     const ::rtl::OUString& 	GetSource32() const;
 	const String&	GetComment() const            { return aComment; }
 	virtual void	SetSource( const String& r );
-	void	        SetSource32( const ::rtl::OUString& r );
-	void			SetComment( const String& r );
+	void SetSource32( const ::rtl::OUString& r );
+	void SetComment( const String& r );
 
 	virtual sal_Bool	Compile();
 	sal_Bool 			Disassemble( String& rText );
 class SbClassModuleImpl;
 
 // Object class for instances of class modules
-class SbClassModuleObject : public SbModule
+class BASIC_DLLPUBLIC SbClassModuleObject : public SbModule
 {
 	SbClassModuleImpl* mpSbClassModuleImpl;
 

File basic/inc/basic/sbstar.hxx

View file
  • Ignore whitespace
 
 class StarBASICImpl;
 
-class StarBASIC : public SbxObject
+class BASIC_DLLPUBLIC StarBASIC : public SbxObject
 {
 	friend class SbiScanner;
 	friend class SbiExpression; // Access to RTL

File basic/inc/basic/sbuno.hxx

View file
  • Ignore whitespace
 #ifndef _SB_SBUNO_HXX
 #define _SB_SBUNO_HXX
 
+#include <basic/basicdllapi.hxx>
 #include <basic/sbxobj.hxx>
 
 namespace com { namespace sun { namespace star { namespace uno { class Any; }}}}
 
 // Returns a SbxObject that wrapps an Uno Interface
 // Implementation in basic/source/classes/sbunoobj.cxx
-SbxObjectRef GetSbUnoObject( const String& aName, const com::sun::star::uno::Any& aUnoObj_ );
+BASIC_DLLPUBLIC	SbxObjectRef GetSbUnoObject( const String& aName, const com::sun::star::uno::Any& aUnoObj_ );
 
 // Force creation of all properties for debugging
-void createAllObjectProperties( SbxObject* pObj );
+BASIC_DLLPUBLIC	void createAllObjectProperties( SbxObject* pObj );
 
-::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
+BASIC_DLLPUBLIC	::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
 
-void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue );
+BASIC_DLLPUBLIC	void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue );
 
 #endif
 

File basic/inc/basic/sbx.hxx

View file
  • Ignore whitespace
 class SbxArray;
 class SbxDimArray;
 class SbxFactory;
-struct SbxINT64;
-struct SbxUINT64;
 
 class SfxBroadcaster;
 class SvDispatch;
 #ifndef __SBX_SBXINFO
 #define __SBX_SBXINFO
 
-class SbxInfo : public SvRefBase
+class BASIC_DLLPUBLIC SbxInfo : public SvRefBase
 {
 	friend class SbxVariable;
 	friend class SbMethod;
 #ifndef __SBX_SBXHINT_HXX
 #define __SBX_SBXHINT_HXX
 
-class SbxHint : public SfxSimpleHint
+class BASIC_DLLPUBLIC SbxHint : public SfxSimpleHint
 {
 	SbxVariable* pVar;
 public:
 
 class SbxArrayImpl;
 
-class SbxArray : public SbxBase
+class BASIC_DLLPUBLIC SbxArray : public SbxBase
 {
 // #100883 Method to set method directly to parameter array
     friend class SbMethod;
 
 class SbxDimArrayImpl;
 
-class SbxDimArray : public SbxArray
+class BASIC_DLLPUBLIC SbxDimArray : public SbxArray
 {
 	SbxDimArrayImpl* mpSbxDimArrayImpl;   // Impl data
 
 #ifndef __SBX_SBXCOLLECTION_HXX
 #define __SBX_SBXCOLLECTION_HXX
 
-class SbxCollection : public SbxObject
+class BASIC_DLLPUBLIC SbxCollection : public SbxObject
 {
 	void Initialize();
 protected:

File basic/inc/basic/sbxcore.hxx

View file
  • Ignore whitespace
 #ifndef _SBXCORE_HXX
 #define _SBXCORE_HXX
 
+#include <basic/basicdllapi.hxx>
+
 #include <tools/rtti.hxx>
 #include <tools/ref.hxx>
 #include <tools/debug.hxx>
 
 class SbxBaseImpl;
 
-class SbxBase : virtual public SvRefBase
+class BASIC_DLLPUBLIC SbxBase : virtual public SvRefBase
 {
 	SbxBaseImpl* mpSbxBaseImpl;	// Impl data
 

File basic/inc/basic/sbxfac.hxx

View file
  • Ignore whitespace
 #ifndef __SBX_SBX_FACTORY_HXX
 #define __SBX_SBX_FACTORY_HXX
 
+#include <basic/basicdllapi.hxx>
+
 #include <basic/sbxdef.hxx>
 
 class SbxBase;
 class String;
 class UniString;
 
-class SbxFactory
+class BASIC_DLLPUBLIC SbxFactory
 {
 	sal_Bool bHandleLast;	// sal_True: Factory is asked at last because of its expensiveness
 public:

File basic/inc/basic/sbxmeth.hxx

View file
  • Ignore whitespace
 
 class SbxMethodImpl;
 
-class SbxMethod : public SbxVariable
+class BASIC_DLLPUBLIC SbxMethod : public SbxVariable
 {
 	SbxMethodImpl* mpSbxMethodImpl;	// Impl data
 

File basic/inc/basic/sbxobj.hxx

View file
  • Ignore whitespace
 
 class SbxObjectImpl;
 
-class SbxObject : public SbxVariable, public SfxListener
+class BASIC_DLLPUBLIC SbxObject : public SbxVariable, public SfxListener
 {
 	SbxObjectImpl* mpSbxObjectImpl;	// Impl data
 

File basic/inc/basic/sbxprop.hxx

View file
  • Ignore whitespace
 
 class SbxPropertyImpl;
 
-class SbxProperty : public SbxVariable
+class BASIC_DLLPUBLIC SbxProperty : public SbxVariable
 {
 	SbxPropertyImpl* mpSbxPropertyImpl;	// Impl data
 

File basic/inc/basic/sbxvar.hxx

View file
  • Ignore whitespace
 #ifndef __SBX_64
 #define __SBX_64
 
-struct SbxINT64
-{
-	sal_Int32 nHigh; sal_uInt32 nLow;
-
-#if FALSE
-	SbxINT64()           : nHigh( 0 ), nLow( 0 ) {}
-	SbxINT64( sal_uInt8  n ) : nHigh( 0 ), nLow( n ) {}
-	SbxINT64( sal_uInt16 n ) : nHigh( 0 ), nLow( n ) {}
-	SbxINT64( sal_uInt32 n ) : nHigh( 0 ), nLow( n ) {}
-	SbxINT64( unsigned int n ) : nHigh( 0 ), nLow( n ) {}
-	SbxINT64( sal_Int8   n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
-	SbxINT64( sal_Int16  n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
-	SbxINT64( sal_Int32  n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
-	SbxINT64( int    n ) : nHigh( n < 0 ? -1 : 0 ), nLow( n ) {}
-	SbxINT64( SbxINT64 &r ) : nHigh( r.nHigh ), nLow( r.nLow ) {}
-
-	SbxINT64( BigInt &r );
-	SbxINT64( double n );
-#endif
-	void CHS()
-	{
-		nLow  ^= (sal_uInt32)-1;
-		nHigh ^= -1;
-		nLow++;
-		if( !nLow )
-			nHigh++;
-	}
-
-	// blc/os2i do not like operator =
-	void Set(double n)
-	{
-		if( n >= 0 )
-		{
-			nHigh = (sal_Int32)(n / (double)4294967296.0);
-			nLow  = (sal_uInt32)(n - ((double)nHigh * (double)4294967296.0) + 0.5);
-		}
-		else {
-			nHigh = (sal_Int32)(-n / (double)4294967296.0);
-			nLow  = (sal_uInt32)(-n - ((double)nHigh * (double)4294967296.0) + 0.5);
-			CHS();
-		}
-	}
-	void Set(sal_Int32 n) { nHigh = n < 0 ? -1 : 0; nLow = n; }
-
-	void SetMax()  { nHigh = 0x7FFFFFFF; nLow = 0xFFFFFFFF; }
-	void SetMin()  { nHigh = 0x80000000; nLow = 0x00000000; }
-	void SetNull() { nHigh = 0x00000000; nLow = 0x00000000; }
-
-	int operator ! () const { return !nHigh && !nLow; }
-
-	SbxINT64 &operator -= ( const SbxINT64 &r );
-	SbxINT64 &operator += ( const SbxINT64 &r );
-	SbxINT64 &operator /= ( const SbxINT64 &r );
-	SbxINT64 &operator %= ( const SbxINT64 &r );
-	SbxINT64 &operator *= ( const SbxINT64 &r );
-	SbxINT64 &operator &= ( const SbxINT64 &r );
-	SbxINT64 &operator |= ( const SbxINT64 &r );
-	SbxINT64 &operator ^= ( const SbxINT64 &r );
-
-	friend SbxINT64 operator - ( const SbxINT64 &l, const SbxINT64 &r );
-	friend SbxINT64 operator + ( const SbxINT64 &l, const SbxINT64 &r );
-	friend SbxINT64 operator / ( const SbxINT64 &l, const SbxINT64 &r );
-	friend SbxINT64 operator % ( const SbxINT64 &l, const SbxINT64 &r );
-	friend SbxINT64 operator * ( const SbxINT64 &l, const SbxINT64 &r );
-	friend SbxINT64 operator & ( const SbxINT64 &l, const SbxINT64 &r );
-	friend SbxINT64 operator | ( const SbxINT64 &l, const SbxINT64 &r );
-	friend SbxINT64 operator ^ ( const SbxINT64 &l, const SbxINT64 &r );
-
-	friend SbxINT64 operator - ( const SbxINT64 &r );
-	friend SbxINT64 operator ~ ( const SbxINT64 &r );
-
-	static double GetMin() { return ((double)0x7FFFFFFF*(double)4294967296.0
-									 + (double)0xFFFFFFFF)
-									/ CURRENCY_FACTOR; }
-	static double GetMax() { return ((double)0x80000000*(double)4294967296.0
-									 + (double)0xFFFFFFFF)
-									/ CURRENCY_FACTOR; }
-};
-
-struct SbxUINT64
-{
-	sal_uInt32 nHigh; sal_uInt32 nLow;
-	void Set(double n)
-	{
-		nHigh = (sal_uInt32)(n / (double)4294967296.0);
-		nLow  = (sal_uInt32)(n - ((double)nHigh * (double)4294967296.0));
-	}
-
-	void Set(sal_uInt32 n) { nHigh = 0; nLow = n; }
-
-	void SetMax()  { nHigh = 0xFFFFFFFF; nLow = 0xFFFFFFFF; }
-	void SetMin()  { nHigh = 0x00000000; nLow = 0x00000000; }
-	void SetNull() { nHigh = 0x00000000; nLow = 0x00000000; }
-
-	int operator ! () const { return !nHigh && !nLow; }
-
-	SbxUINT64 &operator -= ( const SbxUINT64 &r );
-	SbxUINT64 &operator += ( const SbxUINT64 &r );
-	SbxUINT64 &operator /= ( const SbxUINT64 &r );
-	SbxUINT64 &operator %= ( const SbxUINT64 &r );
-	SbxUINT64 &operator *= ( const SbxUINT64 &r );
-	SbxUINT64 &operator &= ( const SbxUINT64 &r );
-	SbxUINT64 &operator |= ( const SbxUINT64 &r );
-	SbxUINT64 &operator ^= ( const SbxUINT64 &r );
-
-	friend SbxUINT64 operator - ( const SbxUINT64 &l, const SbxUINT64 &r );
-	friend SbxUINT64 operator + ( const SbxUINT64 &l, const SbxUINT64 &r );
-	friend SbxUINT64 operator / ( const SbxUINT64 &l, const SbxUINT64 &r );
-	friend SbxUINT64 operator % ( const SbxUINT64 &l, const SbxUINT64 &r );
-	friend SbxUINT64 operator * ( const SbxUINT64 &l, const SbxUINT64 &r );
-	friend SbxUINT64 operator & ( const SbxUINT64 &l, const SbxUINT64 &r );
-	friend SbxUINT64 operator | ( const SbxUINT64 &l, const SbxUINT64 &r );
-	friend SbxUINT64 operator ^ ( const SbxUINT64 &l, const SbxUINT64 &r );
-
-	friend SbxUINT64 operator ~ ( const SbxUINT64 &r );
-};
+typedef sal_Int64	_SbxINT64;
+typedef sal_uInt64	_SbxUINT64;
 
 #endif
 
 		sal_uInt32          nULong;
 		float           nSingle;
 		double          nDouble;
-		SbxINT64        nLong64;
-		SbxUINT64       nULong64;
+		_SbxINT64       nLong64;
+		_SbxUINT64      nULong64;
 		sal_Int64       nInt64;
 		sal_uInt64      uInt64;
 		int             nInt;
 		sal_uInt32*	        pULong;
 		float*	        pSingle;
 		double*	        pDouble;
-		SbxINT64*       pLong64;
-		SbxUINT64*      pULong64;
+		_SbxINT64*      pLong64;
+		_SbxUINT64*     pULong64;
 		sal_Int64*      pnInt64;
 		sal_uInt64*     puInt64;
 		int*	        pInt;
 
 class SbxValueImpl;
 
-class SbxValue : public SbxBase
+class BASIC_DLLPUBLIC SbxValue : public SbxBase
 {
 	SbxValueImpl* mpSbxValueImplImpl;	// Impl data
 
 
     inline SbxValues * data() { return &aData; }
 
-	SbxINT64 GetCurrency() const;
-	SbxINT64 GetLong64() const;
-	SbxUINT64 GetULong64() const;
+	_SbxINT64 GetCurrency() const;
+	_SbxINT64 GetLong64() const;
+	_SbxUINT64 GetULong64() const;
 	sal_Int64  GetInt64() const;
 	sal_uInt64 GetUInt64() const;
 	sal_Int16  GetInteger() const;
 	sal_uInt32 GetULong() const;
 	int	   GetInt() const;
 
-	sal_Bool PutCurrency( const SbxINT64& );
-	sal_Bool PutLong64( const SbxINT64& );
-	sal_Bool PutULong64( const SbxUINT64& );
+	sal_Bool PutCurrency( const _SbxINT64& );
+	sal_Bool PutLong64( const _SbxINT64& );
+	sal_Bool PutULong64( const _SbxUINT64& );
 	sal_Bool PutInt64( sal_Int64 );
 	sal_Bool PutUInt64( sal_uInt64 );
 	sal_Bool PutInteger( sal_Int16 );
 class SbxVariableImpl;
 class StarBASIC;
 
-class SbxVariable : public SbxValue
+class BASIC_DLLPUBLIC SbxVariable : public SbxValue
 {
     friend class SbMethod;
 
 	virtual SbxInfo* GetInfo();
 	void SetInfo( SbxInfo* p );
 	void SetParameters( SbxArray* p );
-	SbxArray* GetParameters() const		{ return mpPar; }
+	inline SbxArray* GetParameters() const		{ return mpPar; }
 
 	// Sfx-Broadcasting-Support:
 	// Due to data reduction and better DLL-hierarchie currently via casting

File basic/inc/basic/testtool.hxx

View file
  • Ignore whitespace
 #ifndef _BASIC_TESTTOOL_HXX_
 #define _BASIC_TESTTOOL_HXX_
 
+#include <basic/basicdllapi.hxx>
 #include <svl/smplhint.hxx>
 #include <tools/string.hxx>
 
 
 // #94145# Due to a tab in TT_SIGNATURE_FOR_UNICODE_TEXTFILES which is changed to blanks by some editors
 // this routine became necessary
-sal_Bool IsTTSignatureForUnicodeTextfile( String aLine );
+BASIC_DLLPUBLIC sal_Bool IsTTSignatureForUnicodeTextfile( String aLine );
 
 //#include "testapp.hxx"
 #define ADD_ERROR_QUIET(nNr, aStr)										\
 #define TT_EXECUTION_SHOW_ACTION	0x03
 #define TT_EXECUTION_HIDE_ACTION	0x04
 
-class TTExecutionStatusHint : public SfxSimpleHint
+class BASIC_DLLPUBLIC TTExecutionStatusHint : public SfxSimpleHint
 {
 private:
 	sal_uInt16 mnType;

File basic/inc/basic/ttstrhlp.hxx

View file
  • Ignore whitespace
 #ifndef _BASIC_TTSTRHLP_HXX
 #define _BASIC_TTSTRHLP_HXX
 
+#include <basic/basicdllapi.hxx>
 #include <tools/string.hxx>
 
 #define CByteString( constAsciiStr ) ByteString( RTL_CONSTASCII_STRINGPARAM ( constAsciiStr ) )

File basic/inc/basic/vbahelper.hxx

View file
  • Ignore whitespace
 #ifndef BASIC_VBAHELPR_HXX
 #define BASIC_VBAHELPR_HXX
 
+#include <basic/basicdllapi.hxx>
 #include <com/sun/star/frame/XModel.hpp>
 
 namespace basic {
     @param bLockControllers
         Passing true will lock all controllers, passing false will unlock them.
  */
-void lockControllersOfAllDocuments(
+BASIC_DLLPUBLIC void lockControllersOfAllDocuments(
     const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel,
     sal_Bool bLockControllers );
 
         Passing true will enable all container windows of all controllers,
         passing false will disable them.
  */
-void enableContainerWindowsOfAllDocuments(
+BASIC_DLLPUBLIC void enableContainerWindowsOfAllDocuments(
     const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel,
     sal_Bool bEnableWindows );
 

File basic/inc/sb.hxx

View file
  • Ignore whitespace
 #define _SB_HXX
 
 #ifndef _SBERRORS_HXX
- #include <basic/sberrors.hxx>
+#include <basic/sberrors.hxx>
 #endif
 
 

File basic/prj/build.lst

View file
  • Ignore whitespace
 sb	basic	:    L10N:l10n offuh oovbaapi svtools xmlscript framework salhelper LIBXSLT:libxslt NULL
 sb	basic									usr1	-	all	sb_mkout NULL
 sb	basic\inc								nmake	-	all	sb_inc NULL
-sb	basic\source\app						nmake	-	all	sb_app sb_class sb_inc NULL
+sb	basic\source\app						nmake	-	all	sb_app sb_rt sb_class sb_samp sb_inc NULL
 sb	basic\source\basmgr						nmake	-	all	sb_mgr sb_inc NULL
 sb	basic\source\classes					nmake	-	all	sb_class sb_inc NULL
 sb	basic\source\comp						nmake	-	all	sb_comp sb_inc NULL

File basic/prj/d.lst

View file
  • Ignore whitespace
 ..\%__SRC%\misc\sb?????.map %_DEST%\bin%_EXT%\sb?????.map
 ..\%__SRC%\bin\stt*.res %_DEST%\bin%_EXT%\stt*.res
 ..\%__SRC%\bin\sb*.res %_DEST%\bin%_EXT%\sb*.res
-..\%__SRC%\lib\app.lib %_DEST%\lib%_EXT%\app.lib
-..\%__SRC%\lib\libapp.a %_DEST%\lib%_EXT%\libapp.a
-..\%__SRC%\lib\sample.lib %_DEST%\lib%_EXT%\sample.lib
-..\%__SRC%\lib\libsample.a %_DEST%\lib%_EXT%\libsample.a
+..\%__SRC%\lib\sbapp.lib %_DEST%\lib%_EXT%\sbapp.lib
 
 mkdir: %_DEST%\inc%_EXT%\basic
 ..\inc\basic\*.hxx %_DEST%\inc%_EXT%\basic\*.hxx
 ..\inc\basic\*.h %_DEST%\inc%_EXT%\basic\*.h
 
 ..\inc\modsizeexceeded.hxx %_DEST%\inc%_EXT%\basic\modsizeexceeded.hxx
+..\inc\basic\basicdllapi.hxx %_DEST%\inc%_EXT%\basic\basicdllapi.hxx
+
 ..\%__SRC%\misc\sb.component %_DEST%\xml%_EXT%\sb.component
 

File basic/source/app/makefile.mk

View file
  • Ignore whitespace
 # --- Settings ------------------------------------------------------------
 
 .INCLUDE :  settings.mk
-
+.INCLUDE :  $(PRJ)$/util$/makefile.pmk
+  
 # --- Common ------------------------------------------------------------
 
 OBJFILES = \
 LIB1TARGET=$(LB)$/app.lib
 LIB1ARCHIV=$(LB)$/libapp.a
 LIB1OBJFILES = \
-		$(OBJ)$/basicrt.obj	\
+        $(OBJ)$/ttbasic.obj	\
+        $(OBJ)$/basicrt.obj	\
         $(OBJ)$/processw.obj     \
         $(OBJ)$/process.obj      \
         $(OBJ)$/brkpnts.obj      \
 		$(OBJ)$/textedit.obj     \
 		$(OBJ)$/msgedit.obj      \
 		$(OBJ)$/dialogs.obj      \
-		$(OBJ)$/sbintern.obj
-
+		$(OBJ)$/object.obj       \
+		$(OBJ)$/collelem.obj
+		
 # --- Targets ------------------------------------------------------------
 
 .INCLUDE :  target.mk

File basic/source/basmgr/makefile.mk

View file
  • Ignore whitespace
 # --- Settings -----------------------------------------------------------
 
 .INCLUDE :  settings.mk
-
+.INCLUDE :  $(PRJ)$/util$/makefile.pmk
+ 
 
 # --- Allgemein -----------------------------------------------------------
 

File basic/source/classes/makefile.mk

View file
  • Ignore whitespace
 ENABLE_EXCEPTIONS=TRUE
 
 .INCLUDE :  settings.mk
-
+.INCLUDE :  $(PRJ)$/util$/makefile.pmk
+ 
 ALLTAR .SEQUENTIAL : \
         $(MISC)$/$(TARGET).don \
         $(MISC)$/$(TARGET).slo

File basic/source/classes/sbunoobj.cxx

View file
  • Ignore whitespace
 								if( (aValue >>= aCurrency) )
 								{
 									sal_Int64 nValue64 = aCurrency.Value;
-									SbxINT64 aInt64;
-									aInt64.nHigh =
-                                        sal::static_int_cast< sal_Int32 >(
-                                            nValue64 >> 32);
-									aInt64.nLow = (sal_uInt32)( nValue64 & 0xffffffff );
-									pVar->PutCurrency( aInt64 );
+									pVar->PutCurrency( nValue64 ); 
 									break;
 								}
 							}
 						}
 						else if( rType == ::getCppuType( (oleautomation::Currency*)0 ) )
 						{
-							SbxINT64 aInt64 = pVar->GetCurrency();
+							_SbxINT64 aInt64 = pVar->GetCurrency();
 							oleautomation::Currency aCurrency;
-							sal_Int64& rnValue64 = aCurrency.Value;
-							rnValue64 = aInt64.nHigh;
-							rnValue64 <<= 32;
-							rnValue64 |= aInt64.nLow;
+							aCurrency.Value = aInt64;
 							aRetVal <<= aCurrency;
 							break;
 						}

File basic/source/comp/makefile.mk

View file
  • Ignore whitespace
 # --- Settings ------------------------------------------------------------
 
 .INCLUDE :  settings.mk
+.INCLUDE :  $(PRJ)$/util$/makefile.pmk
 
 SLOFILES= \
     $(SLO)$/buffer.obj      \

File basic/source/runtime/makefile.mk

View file
  • Ignore whitespace
 # --- Settings -----------------------------------------------------------
 
 .INCLUDE :  settings.mk
+.INCLUDE :  $(PRJ)$/util$/makefile.pmk
 
 
 # --- Allgemein -----------------------------------------------------------
 	$(SLO)$/ddectrl.obj	\
 	$(SLO)$/dllmgr.obj
 
+OBJFILES=	\
+	$(OBJ)$/basrdll.obj
+ 
 .IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI"
 SLOFILES+=	$(SLO)$/wnt.obj
 .ELIF "$(GUI)$(COM)$(CPU)" == "WNTGCCI"

File basic/source/runtime/methods.cxx

View file
  • Ignore whitespace
 	{
 		String aStr;
 		SbxVariableRef pArg = rPar.Get( 1 );
-		pArg->Format( aStr );
+		if( pArg->GetType() == SbxCURRENCY )
+			aStr = pArg->GetString();
+		else
+			pArg->Format( aStr );
 
 		// Numbers start with a space
 		if( pArg->IsNumericRTL() )

File basic/source/runtime/methods1.cxx

View file
  • Ignore whitespace
     (void)pBasic;
     (void)bWrite;
 
-	SbxINT64 nCur;
+	_SbxINT64 nCur;
 	if ( rPar.Count() == 2 )
 	{
 		SbxVariable *pSbxVariable = rPar.Get(1);

File basic/source/sample/makefile.mk

View file
  • Ignore whitespace
 # --- Settings ------------------------------------------------------------
 
 .INCLUDE :  settings.mk
-
+.INCLUDE :  $(PRJ)$/util$/makefile.pmk 
+ 
 # --- Allgemein ------------------------------------------------------------
 
 CXXFILES = \

File basic/source/sbx/makefile.mk

View file
  • Ignore whitespace
 # --- Settings -----------------------------------------------------------
 
 .INCLUDE :  settings.mk
+.INCLUDE :  $(PRJ)$/util$/makefile.pmk 
 
 
 # --- Allgemein -----------------------------------------------------------
 	$(SLO)$/sbxbase.obj	\
 	$(SLO)$/sbxres.obj  	\
 	$(SLO)$/sbxvalue.obj	\
-	$(SLO)$/sbxvals.obj	\
 	$(SLO)$/sbxvar.obj  	\
 	$(SLO)$/sbxarray.obj	\
 	$(SLO)$/sbxobj.obj	\

File basic/source/sbx/sbxbool.cxx

View file
  • Ignore whitespace
 		case SbxSALUINT64:
 			p->uInt64 = n; break;
 		case SbxULONG64:
-			p->nULong64.Set( (sal_uInt32)n ); break;
+			p->nULong64 = (sal_uInt32)n; break;
 		case SbxLONG64:
 		case SbxCURRENCY:
-			p->nLong64.Set( (sal_Int32)n ); break;
+			p->nLong64 = n; break; 
 		case SbxDECIMAL:
 		case SbxBYREF | SbxDECIMAL:
 			ImpCreateDecimal( p )->setInt( (sal_Int16)n );
 		case SbxBYREF | SbxSALUINT64:
 			*p->puInt64 = n; break;
 		case SbxBYREF | SbxULONG64:
-			p->pULong64->Set( (sal_uInt32)n ); break;
+			*(p->pULong64) = (sal_uInt32)n; break;
 		case SbxBYREF | SbxLONG64:
 		case SbxBYREF | SbxCURRENCY:
-			p->pLong64->Set( (sal_Int32)n ); break;
+			*(p->pLong64) = n; break;
 
 		default:
 			SbxBase::SetError( SbxERR_CONVERSION );

File basic/source/sbx/sbxconv.hxx

View file
  • Ignore whitespace
 #if FALSE
 // SBX64.CXX
 
-SbxINT64  ImpGetINT64( const SbxValues* );
-void      ImpPutINT64( SbxValues*, const SbxINT64& );
+_SbxINT64 ImpGetINT64( const SbxValues* );
+void      ImpPutINT64( SbxValues*, const _SbxINT64& );
 SbxUINT64 ImpGetUINT64( const SbxValues* );
 void      ImpPutUINT64( SbxValues*, const SbxUINT64& );
 #endif
 
 // SBXCURR.CXX
 
-SbxUINT64 ImpDoubleToUINT64( double );
-double 	  ImpUINT64ToDouble( const SbxUINT64& );
-SbxINT64  ImpDoubleToINT64( double );
-double 	  ImpINT64ToDouble( const SbxINT64& );
+_SbxUINT64 ImpDoubleToUINT64( double );
+double 	  ImpUINT64ToDouble( const _SbxUINT64& );
+_SbxINT64 ImpDoubleToINT64( double );
+double 	  ImpINT64ToDouble( const _SbxINT64& );
 
 #if TRUE
 sal_Int32	  ImpGetCurrLong( const SbxValues* );
 double 	  ImpCurrLongToDouble( sal_Int32 );
 #endif
 
-SbxINT64  ImpGetCurrency( const SbxValues* );
-void      ImpPutCurrency( SbxValues*, const SbxINT64& );
+_SbxINT64 ImpGetCurrency( const SbxValues* );
+void      ImpPutCurrency( SbxValues*, const _SbxINT64& );
 inline
-SbxINT64  ImpDoubleToCurrency( double d )
-		  { return ImpDoubleToINT64( d * CURRENCY_FACTOR ); }
+_SbxINT64 ImpDoubleToCurrency( double d )
+{
+	d *= CURRENCY_FACTOR;
+	d += (d > 0.0) ? 0.5 : -0.5;
+	return (sal_Int64)d;
+}
 inline
-double 	  ImpCurrencyToDouble( const SbxINT64 &r )
+double 	  ImpCurrencyToDouble( const _SbxINT64 &r )
 		  { return ImpINT64ToDouble( r ) / CURRENCY_FACTOR; }
 
 

File basic/source/sbx/sbxcurr.cxx

View file
  • Ignore whitespace
 #include <basic/sbx.hxx>
 #include <tools/errcode.hxx>
 
-#define _TLBIGINT_INT64
 #include <tools/bigint.hxx>
 
 #include <basic/sbxvar.hxx>
 #include "sbxconv.hxx"
+#include "runtime.hxx"
 
-static ::rtl::OUString   ImpCurrencyToString( const SbxINT64& );
-static SbxINT64 ImpStringToCurrency( const ::rtl::OUString& );
+static ::rtl::OUString   ImpCurrencyToString( const _SbxINT64& );
+static _SbxINT64 ImpStringToCurrency( const ::rtl::OUString& );
 
-SbxINT64 ImpGetCurrency( const SbxValues* p )
+_SbxINT64 ImpGetCurrency( const SbxValues* p )
 {
 	SbxValues aTmp;
-	SbxINT64 nRes;
+	_SbxINT64 nRes;
 start:
 	switch( +p->eType )
 	{
 		case SbxNULL:
 			SbxBase::SetError( SbxERR_CONVERSION );
 		case SbxEMPTY:
-			nRes.SetNull(); break;
+			nRes = 0; break;
 		case SbxCHAR:
 			nRes = ImpDoubleToCurrency( (double)p->nChar ); break;
 		case SbxBYTE:
 		case SbxSINGLE:
 			if( p->nSingle > SbxMAXCURR )
 			{
-				SbxBase::SetError( SbxERR_OVERFLOW ); nRes.SetMax();
+				SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SAL_MAX_INT64;
 			}
 			else if( p->nSingle < SbxMINCURR )
 			{
-				SbxBase::SetError( SbxERR_OVERFLOW ); nRes.SetMin();
+				SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SAL_MIN_INT64;
 			}
 			else
 				nRes = ImpDoubleToCurrency( (double)p->nSingle );
 		case SbxDOUBLE:
 			if( p->nDouble > SbxMAXCURR )
 			{
-				SbxBase::SetError( SbxERR_OVERFLOW ); nRes.SetMax();
+				SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SAL_MAX_INT64;
 			}
 			else if( p->nDouble < SbxMINCURR )
 			{
-				SbxBase::SetError( SbxERR_OVERFLOW ); nRes.SetMin();
+				SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SAL_MIN_INT64;
 			}
 			else
 				nRes = ImpDoubleToCurrency( p->nDouble );
 				p->pDecimal->getDouble( d );
 			if( d > SbxMAXCURR )
 			{
-				SbxBase::SetError( SbxERR_OVERFLOW ); nRes.SetMax();
+				SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SAL_MAX_INT64;
 			}
 			else if( d < SbxMINCURR )
 			{
-				SbxBase::SetError( SbxERR_OVERFLOW ); nRes.SetMin();
+				SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SAL_MIN_INT64;
 			}
 			else
 				nRes = ImpDoubleToCurrency( d );
 		case SbxSTRING:
 		case SbxLPSTR:
 			if( !p->pOUString )
-				nRes.SetNull();
+				nRes = 0;
 			else
 				nRes = ImpStringToCurrency( *p->pOUString );
 			break;
 				nRes = pVal->GetCurrency();
 			else
 			{
-				SbxBase::SetError( SbxERR_NO_OBJECT ); nRes.SetNull();
+				SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
 			}
 			break;
 		}
 			p = &aTmp; goto start;
 
 		default:
-			SbxBase::SetError( SbxERR_CONVERSION ); nRes.SetNull();
+			SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
 	}
 	return nRes;
 }
 
-void ImpPutCurrency( SbxValues* p, const SbxINT64 &r )
+void ImpPutCurrency( SbxValues* p, const _SbxINT64 &r )
 {
 	double dVal = ImpCurrencyToDouble( r );
 	SbxValues aTmp;
 
 // Hilfs-Funktionen zur Wandlung
 
-static ::rtl::OUString ImpCurrencyToString( const SbxINT64 &r )
+// sbxscan.cxx
+void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep );
+
+static ::rtl::OUString ImpCurrencyToString( const _SbxINT64 &r )
 {
-	BigInt a10000 = 10000;
+	sal_Int64 nInt = r;
+	nInt /= 10000;
 
-	//return GetpApp()->GetAppInternational().GetCurr( BigInt( r ), 4 );
-	BigInt aInt( r );
-	aInt.Abs();
-	BigInt aFrac = aInt;
-	aInt  /= a10000;
-	aFrac %= a10000;
-	aFrac += a10000;
+	sal_Int64 nFrac = r;
+	if( nFrac < 0 )
+		nFrac = -nFrac;
+	nFrac %= 10000;
+	nFrac += 10000;
 
-	::rtl::OUString aString;
-	if( r.nHigh < 0 )
-		aString = ::rtl::OUString( (sal_Unicode)'-' );
-	aString += aInt.GetString();
-	aString += ::rtl::OUString( (sal_Unicode)'.' );
-	aString += aFrac.GetString().GetBuffer()+1;
+	::rtl::OUString aFracString = ::rtl::OUString::valueOf( nFrac );
+	int nCopyCount = 4;
+	if( SbiRuntime::isVBAEnabled() )
+	{
+		const sal_Unicode* pStr = aFracString.getStr();
+		while( nCopyCount > 0 && *(pStr + nCopyCount) == (sal_Unicode)'0' )
+			--nCopyCount;
+	}
+
+    sal_Unicode cDecimalSep, cThousandSep;
+    ImpGetIntntlSep( cDecimalSep, cThousandSep );
+
+	::rtl::OUString aString = ::rtl::OUString::valueOf( nInt );
+	if( nCopyCount > 0 )
+	{
+		aString += ::rtl::OUString( cDecimalSep );
+		aString += aFracString.copy( 1, nCopyCount );
+	}
+
 	return aString;
 }
 
-static SbxINT64 ImpStringToCurrency( const ::rtl::OUString &r )
+static _SbxINT64 ImpStringToCurrency( const ::rtl::OUString &r )
 {
 	int nDec = 4;
 	String aStr;
 	if( *p == '-' )
 		aStr += *p++;
 
+    sal_Unicode cDecimalSep, cThousandSep;
+    ImpGetIntntlSep( cDecimalSep, cThousandSep );
+
 	while( *p >= '0' && *p <= '9' ) {
 		aStr += *p++;
-		if( *p == ',' )
+		if( *p == cThousandSep )
 			p++;
 	}
 
-	if( *p == '.' ) {
+	if( *p == cDecimalSep ) {
 		p++;
 		while( nDec && *p >= '0' && *p <= '9' ) {
 			aStr += *p++;
 		nDec--;
 	}
 
-	BigInt aBig( aStr );
-	SbxINT64 nRes;
-	aBig.INT64( &nRes );
+	::rtl::OUString aOUStr( aStr );
+	sal_Int64 nRes = aOUStr.toInt64();
 	return nRes;
 }
 
-double ImpINT64ToDouble( const SbxINT64 &r )
-{ return (double)r.nHigh*(double)4294967296.0 + (double)r.nLow; }
 
-SbxINT64 ImpDoubleToINT64( double d )
+double ImpINT64ToDouble( const _SbxINT64 &r )
+{ return (double)r; }
+
+_SbxINT64 ImpDoubleToINT64( double d )
 {
-	SbxINT64 nRes;
-	nRes.Set( d );
+	_SbxINT64 nRes = (_SbxINT64)d;
 	return nRes;
 }
 
-double ImpUINT64ToDouble( const SbxUINT64 &r )
-{ return (double)r.nHigh*(double)4294967296.0 + (double)r.nLow; }
+double ImpUINT64ToDouble( const _SbxUINT64 &r )
+{ return (double)r; }
 
-SbxUINT64 ImpDoubleToUINT64( double d )
+_SbxUINT64 ImpDoubleToUINT64( double d )
 {
-	SbxUINT64 nRes;
-	nRes.Set( d );
+	_SbxUINT64 nRes = (_SbxUINT64)d;
 	return nRes;
 }
 

File basic/source/sbx/sbxscan.cxx

View file
  • Ignore whitespace
 		case SbxUINT:
 		case SbxNULL:		// #45929 NULL mit durchschummeln
 			nComma = 0;		goto cvt;
+		case SbxCURRENCY:
+			nComma = 4;		goto cvt;
 		case SbxSINGLE:
 			nComma = 6;		goto cvt;
 		case SbxDOUBLE:

File basic/source/sbx/sbxvals.cxx

  • Ignore whitespace
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_basic.hxx"
-
-#define _TLBIGINT_INT64
-#include <tools/bigint.hxx>
-#include <basic/sbx.hxx>
-
-///////////////////////////// BigInt/Currency //////////////////////////////
-
-SbxValues::SbxValues( const BigInt &rBig ) : eType(SbxCURRENCY)
-{
-	rBig.INT64( &nLong64 );
-}
-
-//TODO:  BigInt is TOOLS_DLLPUBLIC, and its four member functions only declared
-// and defined within basic (#define _TLBIGINT_INT64) are a bad hack that causes
-// "warning C4273: 'function' : inconsistent dll linkage" on MSC; this whole
-// mess should be cleaned up properly (e.g., by completely removing Sbx[U]INT64
-// and using sal_[u]Int64 instead):
-#if defined _MSC_VER
-#pragma warning(disable: 4273)
-#endif
-
-sal_Bool BigInt::INT64( SbxINT64 *p ) const
-{
-	if( bIsBig ) {
-		if( nLen > 4 || (nNum[3] & 0x8000) )
-			return sal_False;
-
-		p->nLow  = ((sal_uInt32)nNum[1] << 16) | (sal_uInt32)nNum[0];
-		p->nHigh = ((sal_uInt32)nNum[3] << 16) | (sal_uInt32)nNum[2];
-		if( bIsNeg )
-			p->CHS();
-	}
-	else
-		p->Set( (sal_Int32)nVal );
-
-	return sal_True;
-}
-
-BigInt::BigInt( const SbxINT64 &r )
-{
-	BigInt a10000 = 0x10000;
-
-	*this = r.nHigh;
-	if( r.nHigh )
-		*this *= a10000;
-	*this += (sal_uInt16)(r.nLow >> 16);
-	*this *= a10000;
-	*this += (sal_uInt16)r.nLow;
-}
-
-sal_Bool BigInt::UINT64( SbxUINT64 *p ) const
-{
-	if( bIsBig ) {
-		if( bIsNeg || nLen > 4 )
-			return sal_False;
-
-		p->nLow  = ((sal_uInt32)nNum[1] << 16) | (sal_uInt32)nNum[0];
-		p->nHigh = ((sal_uInt32)nNum[3] << 16) | (sal_uInt32)nNum[2];
-	}
-	else {
-		if( nVal < 0 )
-			return sal_False;
-
-		p->Set( (sal_uInt32)nVal );
-	}
-
-	return sal_True;
-}
-
-BigInt::BigInt( const SbxUINT64 &r )
-{
-	BigInt a10000 = 0x10000;
-
-	*this = BigInt(r.nHigh);
-	if( r.nHigh )
-		*this *= a10000;
-	*this += (sal_uInt16)(r.nLow >> 16);
-	*this *= a10000;
-	*this += (sal_uInt16)r.nLow;
-}

File basic/source/sbx/sbxvalue.cxx

View file
  • Ignore whitespace
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_basic.hxx"
 
-#define _TLBIGINT_INT64
 #include <tools/bigint.hxx>
 #include <tools/stream.hxx>
 
 
 TYPEINIT1(SbxValue,SbxBase)
 
-/////////////////////////// SbxINT64 /////////////////////////////////////
-SbxINT64 &SbxINT64::operator -= ( const SbxINT64 &r )
-{
-	BigInt b( *this );
-	b -= BigInt( r );
-	b.INT64( this );
-	return *this;
-}
-SbxINT64 &SbxINT64::operator += ( const SbxINT64 &r )
-{
-	BigInt b( *this );
-	b += BigInt( r );
-	b.INT64( this );
-	return *this;
-}
-SbxINT64 &SbxINT64::operator *= ( const SbxINT64 &r )
-{
-	BigInt b( *this );
-	b *= BigInt( r );
-	b.INT64( this );
-	return *this;
-}
-SbxINT64 &SbxINT64::operator %= ( const SbxINT64 &r )
-{
-	BigInt b( *this );
-	b %= BigInt( r );
-	b.INT64( this );
-	return *this;
-}
-SbxINT64 &SbxINT64::operator /= ( const SbxINT64 &r )
-{
-	BigInt b( *this );
-	b /= BigInt( r );
-	b.INT64( this );
-	return *this;
-}
-SbxINT64 &SbxINT64::operator &= ( const SbxINT64 &r )
-{
-	nHigh &= r.nHigh;
-	nLow  &= r.nLow;
-	return *this;
-}
-SbxINT64 &SbxINT64::operator |= ( const SbxINT64 &r )
-{
-	nHigh |= r.nHigh;
-	nLow  |= r.nLow;
-	return *this;
-}
-SbxINT64 &SbxINT64::operator ^= ( const SbxINT64 &r )
-{
-	nHigh ^= r.nHigh;
-	nLow  ^= r.nLow;
-	return *this;
-}
 
-SbxINT64 operator - ( const SbxINT64 &l, const SbxINT64 &r )
-{
-	SbxINT64 a(l);
-	a -= r;
-	return a;
-}
-SbxINT64 operator + ( const SbxINT64 &l, const SbxINT64 &r )
-{
-	SbxINT64 a(l);
-	a += r;
-	return a;
-}
-SbxINT64 operator / ( const SbxINT64 &l, const SbxINT64 &r )
-{
-	SbxINT64 a(l);
-	a /= r;
-	return a;
-}
-SbxINT64 operator % ( const SbxINT64 &l, const SbxINT64 &r )
-{
-	SbxINT64 a(l);
-	a %= r;
-	return a;
-}
-SbxINT64 operator * ( const SbxINT64 &l, const SbxINT64 &r )
-{
-	SbxINT64 a(l);
-	a *= r;
-	return a;
-}
-SbxINT64 operator & ( const SbxINT64 &l, const SbxINT64 &r )
-{
-	SbxINT64 a;
-	a.nHigh = r.nHigh & l.nHigh;
-	a.nLow  = r.nLow  & l.nLow;
-	return a;
-}
-SbxINT64 operator | ( const SbxINT64 &l, const SbxINT64 &r )
-{
-	SbxINT64 a;
-	a.nHigh = r.nHigh | l.nHigh;
-	a.nLow  = r.nLow  | l.nLow;
-	return a;
-}
-SbxINT64 operator ^ ( const SbxINT64 &r, const SbxINT64 &l )
-{
-	SbxINT64 a;
-	a.nHigh = r.nHigh ^ l.nHigh;
-	a.nLow  = r.nLow  ^ l.nLow;
-	return a;
-}
-
-SbxINT64 operator - ( const SbxINT64 &r )
-{
-	SbxINT64 a( r );
-	a.CHS();
-	return a;
-}
-SbxINT64 operator ~ ( const SbxINT64 &r )
-{
-	SbxINT64 a;
-	a.nHigh = ~r.nHigh;
-	a.nLow  = ~r.nLow;
-	return a;
-}
-
-SbxUINT64 &SbxUINT64::operator %= ( const SbxUINT64 &r )
-{
-	BigInt b( *this );
-	b %= BigInt( r );
-	b.UINT64( this );
-	return *this;
-}
-SbxUINT64 &SbxUINT64::operator /= ( const SbxUINT64 &r )
-{
-	BigInt b( *this );
-	b /= BigInt( r );
-	b.UINT64( this );
-	return *this;
-}
 /////////////////////////// Fehlerbehandlung /////////////////////////////
 
 #ifdef _USED
 	switch( t & 0x0FFF )
 	{
 		case SbxINTEGER:	n |= SbxBYREF; aData.pInteger = (sal_Int16*) p; break;
-		case SbxULONG64:	n |= SbxBYREF; aData.pULong64 = (SbxUINT64*) p; break;
+		case SbxULONG64:	n |= SbxBYREF; aData.pULong64 = (_SbxUINT64*) p; break;
 		case SbxLONG64:
-		case SbxCURRENCY:	n |= SbxBYREF; aData.pLong64 = (SbxINT64*) p; break;
+		case SbxCURRENCY:	n |= SbxBYREF; aData.pLong64 = (_SbxINT64*) p; break; 
 		case SbxLONG:		n |= SbxBYREF; aData.pLong = (sal_Int32*) p; break;
 		case SbxSINGLE:		n |= SbxBYREF; aData.pSingle = (float*) p; break;
 		case SbxDATE:
 
 GET( GetByte,     SbxBYTE,       sal_uInt8,             nByte )
 GET( GetChar,     SbxCHAR,       xub_Unicode,           nChar )
-GET( GetCurrency, SbxCURRENCY,   SbxINT64,         nLong64 )
+GET( GetCurrency, SbxCURRENCY,   _SbxINT64,        nLong64 )
 GET( GetDate,     SbxDATE,       double,           nDouble )
 GET( GetData,     SbxDATAOBJECT, void*,            pData )
 GET( GetDouble,   SbxDOUBLE,     double,           nDouble )
 GET( GetInt,      SbxINT,        int,              nInt )
 GET( GetInteger,  SbxINTEGER,    sal_Int16,            nInteger )
 GET( GetLong,     SbxLONG,       sal_Int32,            nLong )
-GET( GetLong64,   SbxLONG64,     SbxINT64,         nLong64 )
+GET( GetLong64,   SbxLONG64,     _SbxINT64,         nLong64 )
 GET( GetObject,   SbxOBJECT,     SbxBase*,         pObj )
 GET( GetSingle,   SbxSINGLE,     float,            nSingle )
 GET( GetULong,    SbxULONG,      sal_uInt32,           nULong )
-GET( GetULong64,  SbxULONG64,    SbxUINT64,        nULong64 )
+GET( GetULong64,  SbxULONG64,    _SbxUINT64,        nULong64 )
 GET( GetUShort,   SbxUSHORT,     sal_uInt16,           nUShort )
 GET( GetInt64,    SbxSALINT64,   sal_Int64,        nInt64 )
 GET( GetUInt64,   SbxSALUINT64,  sal_uInt64,       uInt64 )
 
 PUT( PutByte,     SbxBYTE,       sal_uInt8,             nByte )
 PUT( PutChar,     SbxCHAR,       xub_Unicode,      nChar )
-PUT( PutCurrency, SbxCURRENCY,   const SbxINT64&,  nLong64 )
+PUT( PutCurrency, SbxCURRENCY,   const _SbxINT64&, nLong64 )
 PUT( PutDate,     SbxDATE,       double,           nDouble )
 PUT( PutData,     SbxDATAOBJECT, void*,            pData )
 PUT( PutDouble,   SbxDOUBLE,     double,           nDouble )
 PUT( PutInt,      SbxINT,        int,              nInt )
 PUT( PutInteger,  SbxINTEGER,    sal_Int16,            nInteger )
 PUT( PutLong,     SbxLONG,       sal_Int32,            nLong )
-PUT( PutLong64,   SbxLONG64,     const SbxINT64&,  nLong64 )
+PUT( PutLong64,   SbxLONG64,     const _SbxINT64&,  nLong64 )
 PUT( PutObject,   SbxOBJECT,     SbxBase*,         pObj )
 PUT( PutSingle,   SbxSINGLE,     float,            nSingle )
 PUT( PutULong,    SbxULONG,      sal_uInt32,           nULong )
-PUT( PutULong64,  SbxULONG64,    const SbxUINT64&, nULong64 )
+PUT( PutULong64,  SbxULONG64,    const _SbxUINT64&, nULong64 )
 PUT( PutUShort,   SbxUSHORT,     sal_uInt16,           nUShort )
 PUT( PutInt64,    SbxSALINT64,   sal_Int64,        nInt64 )
 PUT( PutUInt64,   SbxSALUINT64,  sal_uInt64,       uInt64 )
 }
 ////////////////////////////////// Rechnen /////////////////////////////////
 
+static void implInt64ToBigInt( sal_Int64 n64, BigInt& rOut )
+{
+	if( (n64 < 0 && n64 >= SAL_MIN_INT32) ||
+		(n64 > 0 && n64 <= SAL_MAX_INT32) )
+	{
+		rOut = BigInt( (long)n64 );
+	}
+	else
+	{
+		::rtl::OUString aNumStr = ::rtl::OUString::valueOf( n64 );
+		rOut = BigInt( aNumStr );
+	}
+}
+
+static sal_Int64 implBigIntToint64( const BigInt& rBI )
+{
+	sal_Int64 nRet = 0;
+	if( rBI.IsLong() )
+	{
+		nRet = (long)rBI;
+	}
+	else
+	{
+	    ::rtl::OUString aOUStr = rBI.GetString();
+		nRet = aOUStr.toInt64();
+	}
+
+	return nRet;
+}
+
 sal_Bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
 {
 	bool bVBAInterop =  SbiRuntime::isVBAEnabled(); 
 		}
 		else if( ( eOp >= SbxIDIV && eOp <= SbxNOT ) || eOp == SbxMOD )
 		{
-			if( GetType() == eOpType )
+			if( eOpType == SbxCURRENCY || GetType() == SbxCURRENCY )
+				aL.eType = aR.eType = SbxCURRENCY;
+
+			else if( GetType() == eOpType )
 			{
 				if( GetType() == SbxULONG64
 					|| GetType() == SbxLONG64
-					|| GetType() == SbxCURRENCY
 					|| GetType() == SbxULONG )
 					aL.eType = aR.eType = GetType();
 //				else if( GetType() == SbxDouble || GetType() == SbxSingle )
 				else
 					aL.eType = aR.eType = SbxLONG;
 			}
-			else if( GetType() == SbxCURRENCY || eOpType == SbxCURRENCY
-					 || GetType() == SbxULONG64 || eOpType == SbxULONG64
+			else if( GetType() == SbxULONG64 || eOpType == SbxULONG64
 					 || GetType() == SbxLONG64 || eOpType == SbxLONG64 )
 				aL.eType = aR.eType = SbxLONG64;
 //			else if( GetType() == SbxDouble || rOP.GetType() == SbxDouble
 			if( rOp.Get( aR ) )
 			{
 				static BigInt n10K( 10000 );
+				static BigInt n5K( 5000 );
 
 				if( rOp.GetType() == SbxEMPTY )
 					goto Lbl_OpIsEmpty;
 				{
 					case SbxMUL:
 					{
-						// #i20704 Implement directly
-						BigInt b1( aL.nLong64 );
-						BigInt b2( aR.nLong64 );
+						BigInt b1;
+						implInt64ToBigInt( aL.nLong64, b1 );
+						BigInt b2;
+						implInt64ToBigInt( aR.nLong64, b2 );
 						b1 *= b2;
+						b1 += n5K;
 						b1 /= n10K;
 						double d = double( b1 ) / 10000.0;
 						if( d > SbxMAXCURR || d < SbxMINCURR )
 							SetError( SbxERR_OVERFLOW );
 						else
-							b1.INT64( &aL.nLong64 );
+							aL.nLong64 = implBigIntToint64( b1 );
 						break;
 					}
 					case SbxDIV:
 						}
 						else 
 						{
-							// #i20704 Implement directly
-							BigInt b1( aL.nLong64 );
-							BigInt b2( aR.nLong64 );
+							BigInt b1;
+							implInt64ToBigInt( aL.nLong64, b1 );
+							BigInt b2;
+							implInt64ToBigInt( aR.nLong64, b2 );
 							b1 *= n10K;
+							b1 += n5K;
 							b1 /= b2;
 							double d = double( b1 ) / 10000.0;
 							if( d > SbxMAXCURR || d < SbxMINCURR )
 								SetError( SbxERR_OVERFLOW );
 							else
-								b1.INT64( &aL.nLong64 );
+								aL.nLong64 = implBigIntToint64( b1 );
 						}
 						break;
 					case SbxPLUS:
 		}
 		case SbxULONG64:
 		{
-			r >> aData.nULong64.nHigh >> aData.nULong64.nLow;
+			sal_uInt32 nHigh;
+			sal_uInt32 nLow;
+			r >> nHigh >> nLow;
+			aData.nULong64 = ((sal_Int64)nHigh) << 32;
+			aData.nULong64 |= nLow;
 			break;
 		}
 		case SbxLONG64:
 		case SbxCURRENCY:
 		{
-			r >> aData.nLong64.nHigh >> aData.nLong64.nLow;
+			sal_Int32 nHigh;
+			sal_uInt32 nLow;
+			r >> nHigh >> nLow;
+			aData.nLong64 = ((sal_Int64)nHigh) << 32;
+			aData.nLong64 |= (sal_Int64)nLow;
 			break;
 		}
 		case SbxSTRING:
 			break;
 		case SbxULONG64:
 		{
-			r << aData.nULong64.nHigh << aData.nULong64.nLow;
+			sal_uInt32 nHigh = aData.nULong64 >> 32;
+			sal_uInt32 nLow = aData.nULong64 & 0xffffffff;
+			r << nHigh << nLow;
 			break;
 		}
 		case SbxLONG64:
 		case SbxCURRENCY:
 		{
-			r << aData.nLong64.nHigh << aData.nLong64.nLow;
+			sal_Int32 nHigh = (sal_Int32)(aData.nLong64 >> 32);
+			sal_uInt32 nLow = (sal_Int32)(aData.nLong64 & 0xffffffff);
+			r << nHigh << nLow;
 			break;
 		}
 		case SbxSTRING:

File basic/source/uno/makefile.mk

View file
  • Ignore whitespace
 # --- Settings ------------------------------------------------------------
 
 .INCLUDE :  settings.mk
+.INCLUDE :  $(PRJ)$/util$/makefile.pmk
 
 SLOFILES= \
 	$(SLO)$/namecont.obj \

File basic/util/makefile.mk

View file
  • Ignore whitespace
 
 SHL1TARGET= sb$(DLLPOSTFIX)
 SHL1IMPLIB= basic
+SHL1USE_EXPORTS=name
 
 SHL1STDLIBS= \
 			$(CPPULIB) \
 .ENDIF
 .ENDIF
 
-SHL1DEF=	$(MISC)$/$(SHL1TARGET).def
 SHL1LIBS=	$(SLB)$/sb.lib
-
 DEF1NAME	=$(SHL1TARGET)
-DEF1DEPN	=	\
-	$(MISC)$/$(SHL1TARGET).flt
-
-DEFLIB1NAME	=sb
-DEF1DES		=StarBasic
 
 
 RES1TARGET=$(PRJNAME)
 		$(SRS)$/sbx.srs
 
 # --- TESTTOOL IDE ------------------------------------------------------
+
+SHL2TARGET= sbapp$(DLLPOSTFIX)
+SHL2IMPLIB= sbapp
+SHL2USE_EXPORTS=name
+
+SHL2STDLIBS= \
+			$(CPPULIB) \
+			$(CPPUHELPERLIB) \
+			$(TOOLSLIB) \
+			$(SVTOOLLIB) \
+			$(SVLLIB)	\
+			$(VCLLIB) \