summaryrefslogtreecommitdiff
path: root/basic/inc
diff options
context:
space:
mode:
Diffstat (limited to 'basic/inc')
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/basicmanagerrepository.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/basicrt.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/basmgr.hxx9
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/basrdll.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/dispdefs.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/modsizeexceeded.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/mybasic.hxx23
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/process.hxx14
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbdef.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sberrors.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbmeth.hxx8
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbmod.hxx6
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbobjmod.hxx8
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbprop.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbstar.hxx4
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbstdobj.hxx5
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbuno.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbx.hxx20
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxbase.hxx6
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxcore.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxdef.hxx437
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxfac.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxform.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxmeth.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxmstrm.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxobj.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxprop.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/sbxvar.hxx245
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/svtmsg.hrc0
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/testtool.hrc0
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/testtool.hxx4
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/ttglobal.hrc0
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/ttmsg.hrc0
-rwxr-xr-x[-rw-r--r--]basic/inc/basic/ttstrhlp.hxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/basrid.hxx3
-rwxr-xr-x[-rw-r--r--]basic/inc/makefile.mk0
-rwxr-xr-x[-rw-r--r--]basic/inc/pch/precompiled_basic.cxx2
-rwxr-xr-x[-rw-r--r--]basic/inc/pch/precompiled_basic.hxx10
-rwxr-xr-x[-rw-r--r--]basic/inc/sb.hrc0
-rwxr-xr-x[-rw-r--r--]basic/inc/sb.hxx3
40 files changed, 376 insertions, 475 deletions
diff --git a/basic/inc/basic/basicmanagerrepository.hxx b/basic/inc/basic/basicmanagerrepository.hxx
index c4ff6d515026..e486c3880f41 100644..100755
--- a/basic/inc/basic/basicmanagerrepository.hxx
+++ b/basic/inc/basic/basicmanagerrepository.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -144,3 +145,4 @@ namespace basic
#endif // BASICMANAGERREPOSITORY_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/basicrt.hxx b/basic/inc/basic/basicrt.hxx
index 7af0e0fe9db7..2d39eb79ca02 100644..100755
--- a/basic/inc/basic/basicrt.hxx
+++ b/basic/inc/basic/basicrt.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/basmgr.hxx b/basic/inc/basic/basmgr.hxx
index d8cc5498dfd5..51550eab5700 100644..100755
--- a/basic/inc/basic/basmgr.hxx
+++ b/basic/inc/basic/basmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -166,7 +167,7 @@ protected:
BasicLibInfo* FindLibInfo( StarBASIC* pBasic ) const;
void CheckModules( StarBASIC* pBasic, sal_Bool bReference ) const;
void SetFlagToAllLibs( short nFlag, sal_Bool bSet ) const;
- BasicManager(); // Nur zum anpassen von Pfaden bei 'Speichern unter'.
+ BasicManager(); // This is used only to customize the paths for 'Save as'.
~BasicManager();
public:
@@ -211,7 +212,7 @@ public:
sal_Bool LoadLib( sal_uInt16 nLib );
sal_Bool RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage );
- // Modify-Flag wird nur beim Speichern zurueckgesetzt.
+ // Modify-Flag will be reset only during save.
sal_Bool IsModified() const;
sal_Bool IsBasicModified() const;
@@ -236,7 +237,7 @@ public:
takes the names of modules whose size exceeds the legacy limit
*/
bool LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< rtl::OUString >& _out_rModuleNames );
-
+ bool HasExeCode( const String& );
/// determines whether the Basic Manager has a given macro, given by fully qualified name
bool HasMacro( String const& i_fullyQualifiedName ) const;
/// executes a given macro
@@ -266,3 +267,5 @@ private:
void SetAppBasicManager( BasicManager* pBasMgr );
#endif //_BASMGR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/basrdll.hxx b/basic/inc/basic/basrdll.hxx
index 2265bd354ec4..b11607201bb5 100644..100755
--- a/basic/inc/basic/basrdll.hxx
+++ b/basic/inc/basic/basrdll.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57,3 +58,5 @@ public:
#define BASIC_DLL() (*(BasicDLL**)GetAppData( SHL_BASIC ) )
#endif //_BASRDLL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/dispdefs.hxx b/basic/inc/basic/dispdefs.hxx
index 3b86d54d6b39..9feb0edbef98 100644..100755
--- a/basic/inc/basic/dispdefs.hxx
+++ b/basic/inc/basic/dispdefs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,3 +37,4 @@
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/modsizeexceeded.hxx b/basic/inc/basic/modsizeexceeded.hxx
index e2d716259f09..414b7aff72e0 100644..100755
--- a/basic/inc/basic/modsizeexceeded.hxx
+++ b/basic/inc/basic/modsizeexceeded.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,4 @@ class ModuleSizeExceeded : public ::cppu::WeakImplHelper1< ::com::sun::star::tas
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/mybasic.hxx b/basic/inc/basic/mybasic.hxx
index 9522dbe7b997..3a2ab068d4c4 100644..100755
--- a/basic/inc/basic/mybasic.hxx
+++ b/basic/inc/basic/mybasic.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,11 +30,16 @@
#define _MYBASIC_HXX
#include <basic/sbstar.hxx>
+#include <vector>
class BasicApp;
class AppBasEd;
class ErrorEntry;
+#define SBXID_MYBASIC 0x594D // MyBasic: MY
+#define SBXCR_TEST 0x54534554 // TEST
+
+//-----------------------------------------------------------------------------
class BasicError {
AppBasEd* pWin;
sal_uInt16 nLine, nCol1, nCol2;
@@ -43,11 +49,7 @@ public:
void Show();
};
-DECLARE_LIST( ErrorList, BasicError* )
-
-#define SBXID_MYBASIC 0x594D // MyBasic: MY
-#define SBXCR_TEST 0x54534554 // TEST
-
+//-----------------------------------------------------------------------------
class MyBasic : public StarBASIC
{
SbError nError;
@@ -55,6 +57,8 @@ class MyBasic : public StarBASIC
virtual sal_uInt16 BreakHdl();
protected:
+ ::std::vector< BasicError* > aErrors;
+ size_t CurrentError;
Link GenLogHdl();
Link GenWinInfoHdl();
Link GenModuleWinExistsHdl();
@@ -67,14 +71,17 @@ protected:
public:
SBX_DECL_PERSIST_NODATA(SBXCR_TEST,SBXID_MYBASIC,1);
TYPEINFO();
- ErrorList aErrors;
MyBasic();
virtual ~MyBasic();
virtual sal_Bool Compile( SbModule* );
void Reset();
SbError GetErrors() { return nError; }
+ size_t GetCurrentError() { return CurrentError; }
+ BasicError* FirstError();
+ BasicError* NextError();
+ BasicError* PrevError();
- // Do not use #ifdefs here because this header file is both used for testtool and basic
+ // Do not use #ifdefs here because this header file is both used for testtool and basic
SbxObject *pTestObject; // for Testool; otherwise NULL
virtual void LoadIniFile();
@@ -92,3 +99,5 @@ public:
SV_DECL_IMPL_REF(MyBasic)
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/process.hxx b/basic/inc/basic/process.hxx
index e683bf527173..b88391b412ca 100644..100755
--- a/basic/inc/basic/process.hxx
+++ b/basic/inc/basic/process.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,7 @@
#define _PROCESS_HXX
#include <tools/string.hxx>
-#include <vos/process.hxx>
+#include <osl/process.h>
#include <map>
@@ -39,9 +40,12 @@ typedef Environment::value_type EnvironmentVariable;
class Process
{
// Internal members and methods
- vos::OArgumentList *pArgumentList;
- vos::OEnvironment *pEnvList;
- vos::OProcess *pProcess;
+ sal_uInt32 m_nArgumentCount;
+ rtl_uString **m_pArgumentList;
+ sal_uInt32 m_nEnvCount;
+ rtl_uString **m_pEnvList;
+ rtl::OUString m_aProcessName;
+ oslProcess m_pProcess;
sal_Bool ImplIsRunning();
long ImplGetExitCode();
sal_Bool bWasGPF;
@@ -61,3 +65,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbdef.hxx b/basic/inc/basic/sbdef.hxx
index 70512584f9b7..1b0b6a3f65b4 100644..100755
--- a/basic/inc/basic/sbdef.hxx
+++ b/basic/inc/basic/sbdef.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,5 @@ enum PropertyMode
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sberrors.hxx b/basic/inc/basic/sberrors.hxx
index 4eeb28d43e32..f2e40ac2e05c 100644..100755
--- a/basic/inc/basic/sberrors.hxx
+++ b/basic/inc/basic/sberrors.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -560,3 +561,5 @@ typedef sal_uIntPtr SbError;
// OLE messages from 31000-31999
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbmeth.hxx b/basic/inc/basic/sbmeth.hxx
index fea6644db270..4c8deafef29c 100644..100755
--- a/basic/inc/basic/sbmeth.hxx
+++ b/basic/inc/basic/sbmeth.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,6 +47,7 @@ class SbMethod : public SbxMethod
friend class SbIfaceMapperMethod;
SbMethodImpl* mpSbMethodImpl; // Impl data
+ SbxVariable* mCaller; // caller
SbModule* pMod;
sal_uInt16 nDebugFlags;
sal_uInt16 nLine1, nLine2;
@@ -71,8 +73,8 @@ public:
void SetDebugFlags( sal_uInt16 n ) { nDebugFlags = n; }
void GetLineRange( sal_uInt16&, sal_uInt16& );
- // Schnittstelle zum Ausfuehren einer Methode aus den Applikationen
- virtual ErrCode Call( SbxValue* pRet = NULL );
+ // Interface to execute a method from the applications
+ virtual ErrCode Call( SbxValue* pRet = NULL, SbxVariable* pCaller = NULL );
virtual void Broadcast( sal_uIntPtr nHintId );
};
@@ -99,3 +101,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index a0552cdf3d4b..cba5714b9c36 100644..100755
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,6 +63,8 @@ class SbModule : public SbxObject
SbModuleImpl* mpSbModuleImpl; // Impl data
std::vector< String > mModuleVariableNames;
+ SbModule();
+ SbModule(const SbModule&);
void implClearIfVarDependsOnDeletedBasic( SbxVariable* pVar, StarBASIC* pDeletedBasic );
@@ -139,6 +142,7 @@ public:
sal_Bool LoadBinaryData( SvStream& );
sal_Bool ExceedsLegacyModuleSize();
void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const;
+ bool HasExeCode();
sal_Bool IsVBACompat() const;
void SetVBACompat( sal_Bool bCompat );
sal_Int32 GetModuleType() { return mnType; }
@@ -192,3 +196,5 @@ SV_DECL_IMPL_REF(SbClassModuleObject);
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx
index f8c515b13108..af602191cdd5 100644..100755
--- a/basic/inc/basic/sbobjmod.hxx
+++ b/basic/inc/basic/sbobjmod.hxx
@@ -1,13 +1,8 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: sbobjmod.hxx,v $
- *
- * $Revision: 1.4 $
- *
- * last change: $Author: $ $Date: 2007/08/27 16:31:39 $
- *
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
@@ -130,3 +125,4 @@ SV_DECL_IMPL_REF(SbObjModule);
#endif
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbprop.hxx b/basic/inc/basic/sbprop.hxx
index 88f6504bff76..730ee6fa0aa7 100644..100755
--- a/basic/inc/basic/sbprop.hxx
+++ b/basic/inc/basic/sbprop.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78,3 +79,5 @@ SV_DECL_IMPL_REF(SbProcedureProperty)
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx
index 5b00fe68a421..73d80a4345b7 100644..100755
--- a/basic/inc/basic/sbstar.hxx
+++ b/basic/inc/basic/sbstar.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
#include <basic/sbx.hxx>
#include <basic/sbxobj.hxx>
-#ifndef _RTL_USTRING_HXX
#include <rtl/ustring.hxx>
-#endif
#include <osl/mutex.hxx>
#include <basic/sbdef.hxx>
@@ -225,3 +224,4 @@ SV_DECL_IMPL_REF(StarBASIC)
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbstdobj.hxx b/basic/inc/basic/sbstdobj.hxx
index b1c061161896..8120e6d25631 100644..100755
--- a/basic/inc/basic/sbstdobj.hxx
+++ b/basic/inc/basic/sbstdobj.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#define _SBSTDOBJ1_HXX
#include <basic/sbxobj.hxx>
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <basic/sbxfac.hxx>
class StarBASIC;
class SbStdFactory;
@@ -143,3 +142,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbuno.hxx b/basic/inc/basic/sbuno.hxx
index d816d424313b..0539246e071b 100644..100755
--- a/basic/inc/basic/sbuno.hxx
+++ b/basic/inc/basic/sbuno.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,6 +39,7 @@ SbxObjectRef GetSbUnoObject( const String& aName, const com::sun::star::uno::Any
// Force creation of all properties for debugging
void createAllObjectProperties( SbxObject* pObj );
+void SetSbUnoObjectDfltPropName( SbxObject* pObj );
::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
@@ -45,3 +47,4 @@ void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbx.hxx b/basic/inc/basic/sbx.hxx
index 7f0681ccce6c..ec2f9a1b3335 100644..100755
--- a/basic/inc/basic/sbx.hxx
+++ b/basic/inc/basic/sbx.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,16 +33,13 @@
#include "svl/svarray.hxx"
#include "svl/smplhint.hxx"
#include "svl/lstner.hxx"
+
#include <basic/sbxdef.hxx>
#include <basic/sbxform.hxx>
-
-#ifndef __SBX_SBXOBJECT_HXX
#include <basic/sbxobj.hxx>
-#endif
#include <basic/sbxprop.hxx>
#include <basic/sbxmeth.hxx>
-class BigInt;
class String;
class UniString;
class SvStream;
@@ -53,8 +51,6 @@ class SbxObject;
class SbxArray;
class SbxDimArray;
class SbxFactory;
-struct SbxINT64;
-struct SbxUINT64;
class SfxBroadcaster;
class SvDispatch;
@@ -79,11 +75,7 @@ struct SbxParamInfo
~SbxParamInfo() {}
};
-//#if 0 // _SOLAR__PRIVATE
SV_DECL_PTRARR_DEL(SbxParams,SbxParamInfo*,4,4)
-//#else
-//typedef SvPtrarr SbxParams;
-//#endif
#endif
@@ -158,9 +150,9 @@ public:
#ifndef __SBX_SBXARRAY
#define __SBX_SBXARRAY
-// SbxArray ist ein eindimensionales, dynamisches Array
-// von SbxVariablen. Put()/Insert() konvertieren die Variablen in den
-// angegebenen Datentyp, falls er nicht SbxVARIANT ist.
+// SbxArray is an unidimensional, dynamic Array
+// The variables convert from SbxVariablen. Put()/Insert() into the
+// declared datatype, if they are not SbxVARIANT.
class SbxVarRefs;
class SbxVariableRef;
@@ -367,3 +359,5 @@ SV_IMPL_REF(SbxDimArray)
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxbase.hxx b/basic/inc/basic/sbxbase.hxx
index 0812b2622828..057b4e0a261b 100644..100755
--- a/basic/inc/basic/sbxbase.hxx
+++ b/basic/inc/basic/sbxbase.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,7 +30,6 @@
#define _SBXBASE_HXX
#include <i18npool/lang.h>
-#include "tools/list.hxx"
#include "svl/svarray.hxx"
#include <basic/sbxdef.hxx>
@@ -38,14 +38,12 @@ class SbxVariable;
class SbxBasicFormater;
SV_DECL_PTRARR_DEL(SbxFacs,SbxFactory*,5,5)
-DECLARE_LIST(SbxVarList_Impl, SbxVariable*)
// AppData-Struktur for SBX:
struct SbxAppData
{
SbxError eSbxError; // Error code
SbxFacs aFacs; // Factories
- SbxVarList_Impl aVars; // for Dump
SbxBasicFormater *pBasicFormater; // Pointer to Format()-Command helper class
LanguageType eBasicFormaterLangType;
@@ -58,3 +56,5 @@ struct SbxAppData
SbxAppData* GetSbxData_Impl();
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxcore.hxx b/basic/inc/basic/sbxcore.hxx
index b4e80a49f168..f16bcde9449d 100644..100755
--- a/basic/inc/basic/sbxcore.hxx
+++ b/basic/inc/basic/sbxcore.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -179,3 +180,5 @@ inline sal_Bool SbxBase::IsVisible() const
{ DBG_CHKTHIS( SbxBase, 0 ); return IsReset( SBX_INVISIBLE ); }
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxdef.hxx b/basic/inc/basic/sbxdef.hxx
index 6dc9fe1d8d66..cc05e3dc1ff3 100644..100755
--- a/basic/inc/basic/sbxdef.hxx
+++ b/basic/inc/basic/sbxdef.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,9 +32,7 @@
#ifndef __RSC
-#ifndef _SOLAR_H
#include <tools/solar.h>
-#endif
#include "tools/errcode.hxx"
#ifndef _SBX_CLASS_TYPE
@@ -55,91 +54,100 @@ enum SbxClassType { // SBX-class-IDs (order is important!)
#define _SBX_DATA_TYPE
enum SbxDataType {
- SbxEMPTY = 0, // * Uninitialized
- SbxNULL = 1, // * Contains no valid data
- SbxINTEGER = 2, // * Integer (sal_Int16)
- SbxLONG = 3, // * Long integer (sal_Int32)
- SbxSINGLE = 4, // * Single-precision floating point number (float)
- SbxDOUBLE = 5, // * Double-precision floating point number (double)
- SbxCURRENCY = 6, // Currency (sal_Int64)
- SbxDATE = 7, // * Date (double)
- SbxSTRING = 8, // * String (StarView)
- SbxOBJECT = 9, // * SbxBase object pointer
- SbxERROR = 10, // * Error (sal_uInt16)
- SbxBOOL = 11, // * Boolean (0 or -1)
- SbxVARIANT = 12, // * Anzeige fuer varianten Datentyp
- SbxDATAOBJECT = 13, // * Common data object w/o ref count
-
- SbxCHAR = 16, // * signed char
- SbxBYTE = 17, // * unsigned char
- SbxUSHORT = 18, // * unsigned short (sal_uInt16)
- SbxULONG = 19, // * unsigned long (sal_uInt32)
- SbxLONG64 = 20, // signed 64-bit int
- SbxULONG64 = 21, // unsigned 64-bit int
- SbxINT = 22, // * signed machine-dependent int
- SbxUINT = 23, // * unsigned machine-dependent int
- SbxVOID = 24, // * no value (= SbxEMPTY)
- SbxHRESULT = 25, // HRESULT
- SbxPOINTER = 26, // generic pointer
- SbxDIMARRAY = 27, // dimensioned array
- SbxCARRAY = 28, // C style array
- SbxUSERDEF = 29, // user defined
- SbxLPSTR = 30, // * null terminated string
- SbxLPWSTR = 31, // wide null terminated string
- SbxCoreSTRING = 32, // AB 10.4.97, fuer GetCoreString(), nur zum Konvertieren
- SbxWSTRING = 33, // AB 4.10.2000 Reimplemented for backwards compatibility (#78919)
- SbxWCHAR = 34, // AB 4.10.2000 Reimplemented for backwards compatibility (#78919)
- SbxSALINT64 = 35, // for UNO hyper
- SbxSALUINT64 = 36, // for UNO unsigned hyper
- SbxDECIMAL = 37, // for UNO/automation Decimal
-
- SbxVECTOR = 0x1000, // simple counted array
- SbxARRAY = 0x2000, // array
- SbxBYREF = 0x4000, // access by reference
-
- SbxSV1 = 128, // first defined data type for StarView
- SbxMEMORYSTREAM, // SvMemoryStream
- SbxSTORAGE, // SvStorage
-
- SbxUSER1 = 256, // first user defined data type
- SbxUSERn = 2047 // last user defined data type
+ SbxEMPTY = 0, // * Uninitialized
+ SbxNULL = 1, // * Contains no valid data
+ SbxINTEGER = 2, // * Integer (sal_Int16)
+ SbxLONG = 3, // * Long integer (sal_Int32)
+ SbxSINGLE = 4, // * Single-precision floating point number (float)
+ SbxDOUBLE = 5, // * Double-precision floating point number (double)
+ SbxCURRENCY = 6, // Currency (sal_Int64)
+ SbxDATE = 7, // * Date (double)
+ SbxSTRING = 8, // * String (StarView)
+ SbxOBJECT = 9, // * SbxBase object pointer
+ SbxERROR = 10, // * Error (sal_uInt16)
+ SbxBOOL = 11, // * Boolean (0 or -1)
+
+ SbxVARIANT = 12, // * Display for variant datatype
+ SbxDATAOBJECT = 13, // * Common data object w/o ref count
+
+ SbxCHAR = 16, // * signed char
+ SbxBYTE = 17, // * unsigned char
+ SbxUSHORT = 18, // * unsigned short (sal_uInt16)
+ SbxULONG = 19, // * unsigned long (sal_uInt32)
+
+//deprecated: // old 64bit types kept for backward compatibility in file I/O
+ SbxLONG64 = 20, // moved to SbxSALINT64 as 64bit int
+ SbxULONG64 = 21, // moved to SbxSALUINT64 as 64bit int
+
+ SbxINT = 22, // * signed machine-dependent int
+ SbxUINT = 23, // * unsigned machine-dependent int
+
+ SbxVOID = 24, // * no value (= SbxEMPTY)
+ SbxHRESULT = 25, // HRESULT
+ SbxPOINTER = 26, // generic pointer
+ SbxDIMARRAY = 27, // dimensioned array
+ SbxCARRAY = 28, // C style array
+ SbxUSERDEF = 29, // user defined
+ SbxLPSTR = 30, // * null terminated string
+
+ SbxLPWSTR = 31, // wide null terminated string
+ SbxCoreSTRING = 32, // from 1997-4-10 for GetCoreString(), only for converting<
+
+ SbxWSTRING = 33, // from 2000-10-4 Reimplemented for backwards compatibility (#78919)
+ SbxWCHAR = 34, // from 2000-10-4 Reimplemented for backwards compatibility (#78919)
+ SbxSALINT64 = 35, // for currency internal, signed 64-bit int and UNO hyper
+ SbxSALUINT64= 36, // for currency internal, unsigned 64-bit int and UNO unsigned hyper
+ SbxDECIMAL = 37, // for UNO/automation Decimal
+
+ SbxVECTOR = 0x1000, // simple counted array
+ SbxARRAY = 0x2000, // array
+ SbxBYREF = 0x4000, // access by reference
+
+ SbxSV1 = 128, // first defined data type for StarView
+ SbxMEMORYSTREAM, // SvMemoryStream
+ SbxSTORAGE, // SvStorage
+
+ SbxUSER1 = 256, // first user defined data type
+ SbxUSERn = 2047 // last user defined data type
};
const sal_uInt32 SBX_TYPE_WITH_EVENTS_FLAG = 0x10000;
const sal_uInt32 SBX_TYPE_DIM_AS_NEW_FLAG = 0x20000;
const sal_uInt32 SBX_FIXED_LEN_STRING_FLAG = 0x10000; // same value as above as no conflict possible
-
#endif
#ifndef _SBX_OPERATOR
#define _SBX_OPERATOR
enum SbxOperator {
- // Arithmetical:
- SbxEXP, // this ^ var
- SbxMUL, // this * var
- SbxDIV, // this / var
- SbxMOD, // this MOD var
- SbxPLUS, // this + var
- SbxMINUS, // this - var
- SbxNEG, // -this (var is ignored)
+ // Arithmetical:
+ SbxEXP, // this ^ var
+ SbxMUL, // this * var
+ SbxDIV, // this / var
+ SbxMOD, // this MOD var (max INT32!)
+ SbxPLUS, // this + var
+ SbxMINUS, // this - var
+ SbxNEG, // -this (var is ignored)
SbxIDIV, // this / var (both operands max. sal_Int32!)
// Boolean operators (max sal_Int32!):
- SbxAND, // this & var
- SbxOR, // this | var
- SbxXOR, // this ^ var
- SbxEQV, // ~this ^ var
- SbxIMP, // ~this | var
- SbxNOT, // ~this (var is ignored)
- // String-concat:
- SbxCAT, // this & var
- // Comparisons:
- SbxEQ, // this = var
- SbxNE, // this <> var
- SbxLT, // this < var
- SbxGT, // this > var
- SbxLE, // this <= var
- SbxGE // this >= var
+ // Boolean operators (TODO deprecate this limit: max INT32!)
+ SbxAND, // this & var
+ SbxOR, // this | var
+ SbxXOR, // this ^ var
+ SbxEQV, // ~this ^ var
+ SbxIMP, // ~this | var
+ SbxNOT, // ~this (var is ignored)
+
+ // String concatenation:
+ SbxCAT, // this & var (VBA: this + var)
+
+ // Comparisons:
+ SbxEQ, // this = var
+ SbxNE, // this <> var
+ SbxLT, // this < var
+ SbxGT, // this > var
+ SbxLE, // this <= var
+ SbxGE // this >= var
};
#endif
@@ -147,167 +155,100 @@ enum SbxOperator {
#ifndef _SBX_NAME_TYPE
#define _SBX_NAME_TYPE
-enum SbxNameType { // Type of the questioned name of a variable
- SbxNAME_NONE, // plain name
- SbxNAME_SHORT, // Name(A,B)
- SbxNAME_SHORT_TYPES, // Name%(A%,B$)
- SbxNAME_LONG_TYPES // Name(A As Integer, B As String) As Integer
+enum SbxNameType { // Type of the questioned name of a variable
+ SbxNAME_NONE, // plain name
+ SbxNAME_SHORT, // Name(A,B)
+ SbxNAME_SHORT_TYPES, // Name%(A%,B$)
+ SbxNAME_LONG_TYPES // Name(A As Integer, B As String) As Integer
};
#endif
-// AB: 20.3.96: New error messages
+// from 1996/3/20: New error messages
typedef sal_uIntPtr SbxError; // Preserve old type
#endif
-// von #ifndef __RSC
// New error codes per define
-#define ERRCODE_SBX_OK ERRCODE_NONE // processed
-#define ERRCODE_SBX_SYNTAX (1UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_COMPILER) // Syntaxerror in parser (where else could syntax errors happen? ;-)
-#define ERRCODE_SBX_NOTIMP (2UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_NOTSUPPORTED) // not possible
-#define ERRCODE_SBX_OVERFLOW (3UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_SBX) // overflow
-#define ERRCODE_SBX_BOUNDS (4UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_SBX) // Invalid array index
-#define ERRCODE_SBX_ZERODIV (5UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_SBX) // Division by zero
-#define ERRCODE_SBX_CONVERSION (6UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_SBX) // wrong data type
-#define ERRCODE_SBX_BAD_PARAMETER (7UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // invalid Parameter
-#define ERRCODE_SBX_PROC_UNDEFINED (8UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // BASIC-Sub or Function undefined
-#define ERRCODE_SBX_ERROR (9UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_UNKNOWN) // other object-related error
-#define ERRCODE_SBX_NO_OBJECT (10UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // Object variable unassigned
-#define ERRCODE_SBX_CANNOT_LOAD (11UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_CREATE) // Object cannot be loaded or initialized
-#define ERRCODE_SBX_BAD_INDEX (12UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_SBX) // Invalid object index
-#define ERRCODE_SBX_NO_ACTIVE_OBJECT (13UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_ACCESS) // Object ist not activated
-#define ERRCODE_SBX_BAD_PROP_VALUE (14UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // Bad property value
-#define ERRCODE_SBX_PROP_READONLY (15UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_READ) // Property is read only
-#define ERRCODE_SBX_PROP_WRITEONLY (16UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_WRITE) // Property is write only
-#define ERRCODE_SBX_INVALID_OBJECT (17UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_ACCESS) // Invalid object reference
-#define ERRCODE_SBX_NO_METHOD (18UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // Property oder Methode unbekannt
-#define ERRCODE_SBX_INVALID_USAGE_OBJECT (19UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_ACCESS) // Invalid object usage
-#define ERRCODE_SBX_NO_OLE (20UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_ACCESS) // No OLE-Object
-#define ERRCODE_SBX_BAD_METHOD (21UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // Method not supported
-#define ERRCODE_SBX_OLE_ERROR (22UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // OLE Automation Error
-#define ERRCODE_SBX_BAD_ACTION (23UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_NOTSUPPORTED) // Action not supported
-#define ERRCODE_SBX_NO_NAMED_ARGS (24UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // No named arguments
-#define ERRCODE_SBX_BAD_LOCALE (25UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_NOTSUPPORTED) // Locale settings not supported
-#define ERRCODE_SBX_NAMED_NOT_FOUND (26UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // Unknown named argument
-#define ERRCODE_SBX_NOT_OPTIONAL (27UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // Argument not optional
-#define ERRCODE_SBX_WRONG_ARGS (28UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_SBX) // Invalid number of arguments
-#define ERRCODE_SBX_NOT_A_COLL (29UL | ERRCODE_AREA_SBX | \
- ERRCODE_CLASS_RUNTIME) // Object contains no elements
-#define LAST_SBX_ERROR_ID 29UL
-
-
-// Less important for resources
+#define ERRCODE_SBX_OK ERRCODE_NONE // processed
+
+#define ERRCODE_SBX_SYNTAX (1UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_COMPILER)
+#define ERRCODE_SBX_NOTIMP (2UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_NOTSUPPORTED)
+#define ERRCODE_SBX_OVERFLOW (3UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_SBX) // overflow
+#define ERRCODE_SBX_BOUNDS (4UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_SBX) // Invalid array index
+#define ERRCODE_SBX_ZERODIV (5UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_SBX) // Division by zero
+#define ERRCODE_SBX_CONVERSION (6UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_SBX) // wrong data type
+#define ERRCODE_SBX_BAD_PARAMETER (7UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // invalid Parameter
+#define ERRCODE_SBX_PROC_UNDEFINED (8UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // Sub or Func not def
+#define ERRCODE_SBX_ERROR (9UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_UNKNOWN) // generic object error
+#define ERRCODE_SBX_NO_OBJECT (10UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // Object var not object
+#define ERRCODE_SBX_CANNOT_LOAD (11UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_CREATE) // Object init/load fail
+#define ERRCODE_SBX_BAD_INDEX (12UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_SBX) // Invalid object index
+#define ERRCODE_SBX_NO_ACTIVE_OBJECT (13UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_ACCESS) // Object not active
+#define ERRCODE_SBX_BAD_PROP_VALUE (14UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // Bad property value
+#define ERRCODE_SBX_PROP_READONLY (15UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_READ) // Property is read only
+#define ERRCODE_SBX_PROP_WRITEONLY (16UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_WRITE) // Property is write only
+#define ERRCODE_SBX_INVALID_OBJECT (17UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_ACCESS) // Invalid object reference
+#define ERRCODE_SBX_NO_METHOD (18UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // Property oder Methode unbekannt
+#define ERRCODE_SBX_INVALID_USAGE_OBJECT (19UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_ACCESS) // Invalid object usage
+#define ERRCODE_SBX_NO_OLE (20UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_ACCESS) // No OLE-Object
+#define ERRCODE_SBX_BAD_METHOD (21UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // Method not supported
+#define ERRCODE_SBX_OLE_ERROR (22UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // OLE Automation Error
+#define ERRCODE_SBX_BAD_ACTION (23UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_NOTSUPPORTED) // Action not supported
+#define ERRCODE_SBX_NO_NAMED_ARGS (24UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // No named arguments
+#define ERRCODE_SBX_BAD_LOCALE (25UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_NOTSUPPORTED) // Locale not supported
+#define ERRCODE_SBX_NAMED_NOT_FOUND (26UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // Unknown named argument
+#define ERRCODE_SBX_NOT_OPTIONAL (27UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // Argument not optional
+#define ERRCODE_SBX_WRONG_ARGS (28UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_SBX) // Invalid number of arguments
+#define ERRCODE_SBX_NOT_A_COLL (29UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) // Object contains no elements
+#define LAST_SBX_ERROR_ID 29UL
+
#ifndef __RSC
// Map old codes to new ones
-#define SbxERR_OK ERRCODE_SBX_OK
-#define SbxERR_SYNTAX ERRCODE_SBX_SYNTAX
-#define SbxERR_NOTIMP ERRCODE_SBX_NOTIMP
-#define SbxERR_OVERFLOW ERRCODE_SBX_OVERFLOW
-#define SbxERR_BOUNDS ERRCODE_SBX_BOUNDS
-#define SbxERR_ZERODIV ERRCODE_SBX_ZERODIV
-#define SbxERR_CONVERSION ERRCODE_SBX_CONVERSION
-#define SbxERR_BAD_PARAMETER ERRCODE_SBX_BAD_PARAMETER
-#define SbxERR_PROC_UNDEFINED ERRCODE_SBX_PROC_UNDEFINED
-#define SbxERR_ERROR ERRCODE_SBX_ERROR
-#define SbxERR_NO_OBJECT ERRCODE_SBX_NO_OBJECT
-#define SbxERR_CANNOT_LOAD ERRCODE_SBX_CANNOT_LOAD
-#define SbxERR_BAD_INDEX ERRCODE_SBX_BAD_INDEX
-#define SbxERR_NO_ACTIVE_OBJECT ERRCODE_SBX_NO_ACTIVE_OBJECT
-#define SbxERR_BAD_PROP_VALUE ERRCODE_SBX_BAD_PROP_VALUE
-#define SbxERR_PROP_READONLY ERRCODE_SBX_PROP_READONLY
-#define SbxERR_PROP_WRITEONLY ERRCODE_SBX_PROP_WRITEONLY
-#define SbxERR_INVALID_OBJECT ERRCODE_SBX_INVALID_OBJECT
-#define SbxERR_NO_METHOD ERRCODE_SBX_NO_METHOD
-#define SbxERR_INVALID_USAGE_OBJECT ERRCODE_SBX_INVALID_USAGE_OBJECT
-#define SbxERR_NO_OLE ERRCODE_SBX_NO_OLE
-#define SbxERR_BAD_METHOD ERRCODE_SBX_BAD_METHOD
-#define SbxERR_OLE_ERROR ERRCODE_SBX_OLE_ERROR
-#define SbxERR_BAD_ACTION ERRCODE_SBX_BAD_ACTION
-#define SbxERR_NO_NAMED_ARGS ERRCODE_SBX_NO_NAMED_ARGS
-#define SbxERR_BAD_LOCALE ERRCODE_SBX_BAD_LOCALE
-#define SbxERR_NAMED_NOT_FOUND ERRCODE_SBX_NAMED_NOT_FOUND
-#define SbxERR_NOT_OPTIONAL ERRCODE_SBX_NOT_OPTIONAL
-#define SbxERR_WRONG_ARGS ERRCODE_SBX_WRONG_ARGS
-#define SbxERR_NOT_A_COLL ERRCODE_SBX_NOT_A_COLL
-
-
-/* Old codes with VB error codes
-enum SbxError { // Ergebnis einer Rechenoperation/Konversion
- SbxERR_OK = 0, // durchgefuehrt
- SbxERR_SYNTAX = 2, // Syntaxfehler im Parser
- SbxERR_NOTIMP = 5, // nicht moeglich
- SbxERR_OVERFLOW = 6, // Ueberlauf
- SbxERR_BOUNDS = 9, // Array-Index ungueltig
- SbxERR_ZERODIV = 11, // Division durch Null
- SbxERR_CONVERSION = 13, // falscher Datentyp
- SbxERR_BAD_PARAMETER = 14, // ungltiger Parameter
- SbxERR_PROC_UNDEFINED = 35, // BASIC-Sub oder Function undefiniert
- SbxERR_ERROR = 51, // andere Fehler
- // Objektbezogene Fehler
- SbxERR_NO_OBJECT = 91, // Objektvariable nicht belegt
- SbxERR_CANNOT_LOAD = 323, // Objekt kann nicht geladen/eingerichtet werden
- SbxERR_BAD_INDEX = 341, // Invalid object index
- SbxERR_NO_ACTIVE_OBJECT=366,// Objekt ist nicht aktiviert
- SbxERR_BAD_PROP_VALUE = 380,// Bad property value
- SbxERR_PROP_READONLY = 382, // Property is read only
- SbxERR_PROP_WRITEONLY = 394,// Property is write only
- SbxERR_INVALID_OBJECT = 420,// Invalid object reference
- SbxERR_NO_METHOD = 423, // Property oder Methode unbekannt
- SbxERR_INVALID_USAGE_OBJECT=425,// Falsche Verwendung eines Objekts
- SbxERR_NO_OLE = 430, // Kein OLE-Objekt
- SbxERR_BAD_METHOD = 438, // Methode nicht untersttzt
- SbxERR_OLE_ERROR = 440, // OLE Automation-Fehler
- SbxERR_BAD_ACTION = 445, // Aktion nicht untersttzt
- SbxERR_NO_NAMED_ARGS = 446, // Keine benannten Argumente
- SbxERR_BAD_LOCALE = 447, // Laenderspezifische Einstellungen nicht untersttzt
- SbxERR_NAMED_NOT_FOUND = 448,// Unbekanntes benanntes Argument
- SbxERR_NOT_OPTIONAL = 449, // Argument nicht optional
- SbxERR_WRONG_ARGS = 450, // Falsche Zahl von Argumenten
- SbxERR_NOT_A_COLL = 451 // Objekt enth„lt keine Elemente
-};
-*/
+#define SbxERR_OK ERRCODE_SBX_OK
+#define SbxERR_SYNTAX ERRCODE_SBX_SYNTAX
+#define SbxERR_NOTIMP ERRCODE_SBX_NOTIMP
+#define SbxERR_OVERFLOW ERRCODE_SBX_OVERFLOW
+#define SbxERR_BOUNDS ERRCODE_SBX_BOUNDS
+#define SbxERR_ZERODIV ERRCODE_SBX_ZERODIV
+#define SbxERR_CONVERSION ERRCODE_SBX_CONVERSION
+#define SbxERR_BAD_PARAMETER ERRCODE_SBX_BAD_PARAMETER
+#define SbxERR_PROC_UNDEFINED ERRCODE_SBX_PROC_UNDEFINED
+#define SbxERR_ERROR ERRCODE_SBX_ERROR
+#define SbxERR_NO_OBJECT ERRCODE_SBX_NO_OBJECT
+#define SbxERR_CANNOT_LOAD ERRCODE_SBX_CANNOT_LOAD
+#define SbxERR_BAD_INDEX ERRCODE_SBX_BAD_INDEX
+#define SbxERR_NO_ACTIVE_OBJECT ERRCODE_SBX_NO_ACTIVE_OBJECT
+#define SbxERR_BAD_PROP_VALUE ERRCODE_SBX_BAD_PROP_VALUE
+#define SbxERR_PROP_READONLY ERRCODE_SBX_PROP_READONLY
+#define SbxERR_PROP_WRITEONLY ERRCODE_SBX_PROP_WRITEONLY
+#define SbxERR_INVALID_OBJECT ERRCODE_SBX_INVALID_OBJECT
+#define SbxERR_NO_METHOD ERRCODE_SBX_NO_METHOD
+#define SbxERR_INVALID_USAGE_OBJECT ERRCODE_SBX_INVALID_USAGE_OBJECT
+#define SbxERR_NO_OLE ERRCODE_SBX_NO_OLE
+#define SbxERR_BAD_METHOD ERRCODE_SBX_BAD_METHOD
+#define SbxERR_OLE_ERROR ERRCODE_SBX_OLE_ERROR
+#define SbxERR_BAD_ACTION ERRCODE_SBX_BAD_ACTION
+#define SbxERR_NO_NAMED_ARGS ERRCODE_SBX_NO_NAMED_ARGS
+#define SbxERR_BAD_LOCALE ERRCODE_SBX_BAD_LOCALE
+#define SbxERR_NAMED_NOT_FOUND ERRCODE_SBX_NAMED_NOT_FOUND
+#define SbxERR_NOT_OPTIONAL ERRCODE_SBX_NOT_OPTIONAL
+#define SbxERR_WRONG_ARGS ERRCODE_SBX_WRONG_ARGS
+#define SbxERR_NOT_A_COLL ERRCODE_SBX_NOT_A_COLL
+
// Flag-Bits:
-#define SBX_READ 0x0001 // Read permission
-#define SBX_WRITE 0x0002 // Write permission
-#define SBX_READWRITE 0x0003 // Read/Write permission
-#define SBX_DONTSTORE 0x0004 // Don't store object
-#define SBX_MODIFIED 0x0008 // Object was changed
-#define SBX_FIXED 0x0010 // Fixed data type (SbxVariable)
-#define SBX_CONST 0x0020 // Definition of const value
-#define SBX_OPTIONAL 0x0040 // Parameter is optional
-#define SBX_HIDDEN 0x0080 // Element is invisible
+#define SBX_READ 0x0001 // Read permission
+#define SBX_WRITE 0x0002 // Write permission
+#define SBX_READWRITE 0x0003 // Read/Write permission
+#define SBX_DONTSTORE 0x0004 // Don't store object
+#define SBX_MODIFIED 0x0008 // Object was changed
+#define SBX_FIXED 0x0010 // Fixed data type (SbxVariable)
+#define SBX_CONST 0x0020 // Definition of const value
+#define SBX_OPTIONAL 0x0040 // Parameter is optional
+#define SBX_HIDDEN 0x0080 // Element is invisible
#define SBX_INVISIBLE 0x0100 // Element is not found by Find()
#define SBX_EXTSEARCH 0x0200 // Object is searched completely
#define SBX_EXTFOUND 0x0400 // Variable was found through extended search
@@ -331,7 +272,7 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion
// List of all creators for Load/Store
-#define SBXCR_SBX 0x20584253 // SBX(blank)
+#define SBXCR_SBX 0x20584253 // SBX(blank)
// List of predefined SBX-IDs. New SBX-IDs must be precisly defined so that
// they are unique within the Stream and appropriate Factory.
@@ -347,41 +288,49 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion
#define SBXID_PROPERTY 0x5250 // PR: SbxProperty
// StarBASIC restricts the base data type to different intervals.
-// These intervals are fixed due to portability and independent
+// These intervals are fixed to create 'portability and independent
// of the implementation. Only type double is greedy and takes
// what it gets.
-#define SbxMAXCHAR ((sal_Unicode)65535)
-#define SbxMINCHAR (0)
-#define SbxMAXBYTE ( 255)
-#define SbxMAXINT ( 32767)
-#define SbxMININT (-32768)
-#define SbxMAXUINT ((sal_uInt16) 65535)
-#define SbxMAXLNG ( 2147483647)
-#define SbxMINLNG ((sal_Int32)(-2147483647-1))
-#define SbxMAXULNG ((sal_uInt32) 0xffffffff)
+#define SbxMAXCHAR ((sal_Unicode)65535)
+#define SbxMINCHAR (0)
+#define SbxMAXBYTE ( 255)
+#define SbxMAXINT ( 32767)
+#define SbxMININT (-32768)
+#define SbxMAXUINT ((sal_uInt16) 65535)
+#define SbxMAXLNG ( 2147483647)
+#define SbxMINLNG ((sal_Int32)(-2147483647-1))
+#define SbxMAXULNG ((sal_uInt32) 0xffffffff)
+#define SbxMAXSALUINT64 SAL_MAX_UINT64
#define SbxMAXSALINT64 SAL_MAX_INT64
#define SbxMINSALINT64 SAL_MIN_INT64
-#define SbxMAXSALUINT64 SAL_MAX_UINT64
-#define SbxMAXSNG ( 3.402823e+38)
-#define SbxMINSNG (-3.402823e+38)
-#define SbxMAXSNG2 ( 1.175494351e-38)
-#define SbxMINSNG2 (-1.175494351e-38)
-#define SbxMAXCURR ( 922337203685477.5807)
-#define SbxMINCURR (-922337203685477.5808)
-#define CURRENCY_FACTOR 10000
-#define SbxMAXCURRLNG (SbxMAXLNG/CURRENCY_FACTOR)
-#define SbxMINCURRLNG (SbxMINLNG/CURRENCY_FACTOR)
+ // Currency stored as SbxSALINT64 == sal_Int64
+ // value range limits are ~(2^63 - 1)/10000
+ // fixed precision has 4 digits right of decimal pt
+#define CURRENCY_FACTOR (10000)
+#define CURRENCY_FACTOR_SQUARE (100000000)
+
+// TODO effective MAX/MINCURR limits:
+// true value ( 922337203685477.5807) is too precise for correct comparison to 64bit double
+#define SbxMAXCURR ( 922337203685477.5807)
+#define SbxMINCURR (-922337203685477.5808)
+
+#define SbxMAXSNG ( 3.402823e+38)
+#define SbxMINSNG (-3.402823e+38)
+#define SbxMAXSNG2 ( 1.175494351e-38)
+#define SbxMINSNG2 (-1.175494351e-38)
// Max valid offset index of a Sbx-Array (due to 64K limit)
-#define SBX_MAXINDEX 0x3FF0
-#define SBX_MAXINDEX32 SbxMAXLNG
+#define SBX_MAXINDEX 0x3FF0
+#define SBX_MAXINDEX32 SbxMAXLNG
// The numeric values of sal_True and FALSE
enum SbxBOOL { SbxFALSE = 0, SbxTRUE = -1 };
-#endif // __RSC
+#endif //ifndef __RSC
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxfac.hxx b/basic/inc/basic/sbxfac.hxx
index 372785657266..8597458c5ec2 100644..100755
--- a/basic/inc/basic/sbxfac.hxx
+++ b/basic/inc/basic/sbxfac.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxform.hxx b/basic/inc/basic/sbxform.hxx
index 9f31e3529d04..77921a0ce77e 100644..100755
--- a/basic/inc/basic/sbxform.hxx
+++ b/basic/inc/basic/sbxform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -179,3 +180,4 @@ class SbxBasicFormater {
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxmeth.hxx b/basic/inc/basic/sbxmeth.hxx
index 1f812cdb6260..31b07fdca18d 100644..100755
--- a/basic/inc/basic/sbxmeth.hxx
+++ b/basic/inc/basic/sbxmeth.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,4 @@ SV_IMPL_REF(SbxMethod)
#endif
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxmstrm.hxx b/basic/inc/basic/sbxmstrm.hxx
index c382269f6903..d3197bff883d 100644..100755
--- a/basic/inc/basic/sbxmstrm.hxx
+++ b/basic/inc/basic/sbxmstrm.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,5 @@ class SbxMemoryStream : public SbxBase, public SvMemoryStream
SV_IMPL_REF(SbxMemoryStream)
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxobj.hxx b/basic/inc/basic/sbxobj.hxx
index 8b973eee59cb..867cf6e2bd07 100644..100755
--- a/basic/inc/basic/sbxobj.hxx
+++ b/basic/inc/basic/sbxobj.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -123,3 +124,5 @@ SV_IMPL_REF(SbxObject)
#endif /* __SBX_SBXOBJECTREF_HXX */
#endif /* _SBX_SBXOBJECT_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxprop.hxx b/basic/inc/basic/sbxprop.hxx
index 467b86ee604c..25c875df9222 100644..100755
--- a/basic/inc/basic/sbxprop.hxx
+++ b/basic/inc/basic/sbxprop.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ SV_IMPL_REF(SbxProperty)
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/sbxvar.hxx b/basic/inc/basic/sbxvar.hxx
index 5a2fc4601586..7f0e5d878225 100644..100755
--- a/basic/inc/basic/sbxvar.hxx
+++ b/basic/inc/basic/sbxvar.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,169 +34,47 @@
#include <com/sun/star/bridge/oleautomation/Decimal.hpp>
#include <basic/sbxcore.hxx>
-#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 );
-};
-
-#endif
-
#ifndef __SBX_SBXVALUES_HXX
#define __SBX_SBXVALUES_HXX
-class BigInt;
class SbxDecimal;
struct SbxValues
{
union {
+ sal_uInt8 nByte;
+ sal_uInt16 nUShort;
sal_Unicode nChar;
- sal_uInt8 nByte;
- sal_Int16 nInteger;
- sal_Int32 nLong;
- sal_uInt16 nUShort;
- sal_uInt32 nULong;
+ sal_Int16 nInteger;
+ sal_uInt32 nULong;
+ sal_Int32 nLong;
+ unsigned int nUInt;
+ int nInt;
+ sal_uInt64 uInt64;
+ sal_Int64 nInt64;
+
float nSingle;
double nDouble;
- SbxINT64 nLong64;
- SbxUINT64 nULong64;
- sal_Int64 nInt64;
- sal_uInt64 uInt64;
- int nInt;
- unsigned int nUInt;
- ::rtl::OUString* pOUString;
+
+ rtl::OUString* pOUString;
SbxDecimal* pDecimal;
SbxBase* pObj;
+
+ sal_uInt8* pByte;
+ sal_uInt16* pUShort;
sal_Unicode* pChar;
- sal_uInt8* pByte;
- sal_Int16* pInteger;
- sal_Int32* pLong;
- sal_uInt16* pUShort;
- sal_uInt32* pULong;
+ sal_Int16* pInteger;
+ sal_uInt32* pULong;
+ sal_Int32* pLong;
+ unsigned int* pUInt;
+ int* pInt;
+ sal_uInt64* puInt64;
+ sal_Int64* pnInt64;
+
float* pSingle;
double* pDouble;
- SbxINT64* pLong64;
- SbxUINT64* pULong64;
- sal_Int64* pnInt64;
- sal_uInt64* puInt64;
- int* pInt;
- unsigned int* pUInt;
+
void* pData;
};
SbxDataType eType;
@@ -208,15 +87,15 @@ struct SbxValues
SbxValues( long _nLong ): nLong( _nLong ), eType(SbxLONG) {}
SbxValues( sal_uInt16 _nUShort ): nUShort( _nUShort ), eType(SbxUSHORT) {}
SbxValues( sal_uIntPtr _nULong ): nULong( _nULong ), eType(SbxULONG) {}
- SbxValues( float _nSingle ): nSingle( _nSingle ), eType(SbxSINGLE) {}
- SbxValues( double _nDouble ): nDouble( _nDouble ), eType(SbxDOUBLE) {}
SbxValues( int _nInt ): nInt( _nInt ), eType(SbxINT) {}
SbxValues( unsigned int _nUInt ): nUInt( _nUInt ), eType(SbxUINT) {}
+ SbxValues( float _nSingle ): nSingle( _nSingle ), eType(SbxSINGLE) {}
+ SbxValues( double _nDouble ): nDouble( _nDouble ), eType(SbxDOUBLE) {}
SbxValues( const ::rtl::OUString* _pString ): pOUString( (::rtl::OUString*)_pString ), eType(SbxSTRING) {}
SbxValues( SbxBase* _pObj ): pObj( _pObj ), eType(SbxOBJECT) {}
SbxValues( sal_Unicode* _pChar ): pChar( _pChar ), eType(SbxLPSTR) {}
SbxValues( void* _pData ): pData( _pData ), eType(SbxPOINTER) {}
- SbxValues( const BigInt &rBig );
+
};
#endif
@@ -290,36 +169,33 @@ public:
inline SbxValues * data() { return &aData; }
- SbxINT64 GetCurrency() const;
- SbxINT64 GetLong64() const;
- SbxUINT64 GetULong64() const;
- sal_Int64 GetInt64() const;
- sal_uInt64 GetUInt64() const;
- sal_Int16 GetInteger() const;
- sal_Int32 GetLong() const;
- float GetSingle() const;
- double GetDouble() const;
- double GetDate() const;
+ sal_Unicode GetChar() const;
+ sal_Int16 GetInteger() const;
+ sal_Int32 GetLong() const;
+ sal_Int64 GetInt64() const;
+ sal_uInt64 GetUInt64() const;
+
+ sal_Int64 GetCurrency() const;
+ SbxDecimal* GetDecimal() const;
+
+ float GetSingle() const;
+ double GetDouble() const;
+ double GetDate() const;
+
sal_Bool GetBool() const;
sal_uInt16 GetErr() const;
- const String& GetString() const;
- const String& GetCoreString() const;
- ::rtl::OUString GetOUString() const;
- SbxDecimal* GetDecimal() const;
- SbxBase* GetObject() const;
- sal_Bool HasObject() const;
- void* GetData() const;
- sal_Unicode GetChar() const;
+ const String& GetString() const;
+ const String& GetCoreString() const;
+ rtl::OUString GetOUString() const;
+
+ SbxBase* GetObject() const;
+ sal_Bool HasObject() const;
+ void* GetData() const;
sal_uInt8 GetByte() const;
sal_uInt16 GetUShort() 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 PutInt64( sal_Int64 );
- sal_Bool PutUInt64( sal_uInt64 );
sal_Bool PutInteger( sal_Int16 );
sal_Bool PutLong( sal_Int32 );
sal_Bool PutSingle( float );
@@ -328,12 +204,11 @@ public:
sal_Bool PutBool( sal_Bool );
sal_Bool PutErr( sal_uInt16 );
sal_Bool PutStringExt( const ::rtl::OUString& ); // with extended analysis (International, "sal_True"/"sal_False")
+ sal_Bool PutInt64( sal_Int64 );
+ sal_Bool PutUInt64( sal_uInt64 );
sal_Bool PutString( const ::rtl::OUString& );
sal_Bool PutString( const sal_Unicode* ); // Type = SbxSTRING
sal_Bool PutpChar( const sal_Unicode* ); // Type = SbxLPSTR
- sal_Bool PutDecimal( SbxDecimal* pDecimal );
- sal_Bool PutObject( SbxBase* );
- sal_Bool PutData( void* );
sal_Bool PutChar( sal_Unicode );
sal_Bool PutByte( sal_uInt8 );
sal_Bool PutUShort( sal_uInt16 );
@@ -342,9 +217,16 @@ public:
sal_Bool PutEmpty();
sal_Bool PutNull();
- // Special decimal methods
+ // Special methods
sal_Bool PutDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
+ sal_Bool PutDecimal( SbxDecimal* pDecimal );
+ sal_Bool PutCurrency( const sal_Int64& );
+ // Interface for CDbl in Basic
+ static SbxError ScanNumIntnl( const String& rSrc, double& nVal, sal_Bool bSingle = sal_False );
+
+ sal_Bool PutObject( SbxBase* );
+ sal_Bool PutData( void* );
virtual sal_Bool Convert( SbxDataType );
virtual sal_Bool Compute( SbxOperator, const SbxValue& );
@@ -352,12 +234,9 @@ public:
sal_Bool Scan( const String&, sal_uInt16* = NULL );
void Format( String&, const String* = NULL ) const;
- // Interface for CDbl in Basic
- static SbxError ScanNumIntnl( const String& rSrc, double& nVal, sal_Bool bSingle=sal_False );
-
// The following operators are definied for easier handling.
- // Error conditions (overflow, conversions) are not
- // taken into consideration.
+ // TODO: Ensure error conditions (overflow, conversions)
+ // are taken into consideration in Compute and Compare
inline int operator ==( const SbxValue& ) const;
inline int operator !=( const SbxValue& ) const;
@@ -446,7 +325,7 @@ class SbxVariable : public SbxValue
friend class SbMethod;
SbxVariableImpl* mpSbxVariableImpl; // Impl data
- SfxBroadcaster* pCst; // Broadcaster, if needed
+ SfxBroadcaster* pCst; // Broadcaster, if needed
String maName; // Name, if available
SbxArrayRef mpPar; // Parameter-Array, if set
sal_uInt16 nHash; // Hash-ID for search
@@ -515,3 +394,5 @@ SV_DECL_REF(SbxVariable)
#endif
#endif // _SBXVAR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/svtmsg.hrc b/basic/inc/basic/svtmsg.hrc
index ff215d3fc9cb..ff215d3fc9cb 100644..100755
--- a/basic/inc/basic/svtmsg.hrc
+++ b/basic/inc/basic/svtmsg.hrc
diff --git a/basic/inc/basic/testtool.hrc b/basic/inc/basic/testtool.hrc
index 075b462944c9..075b462944c9 100644..100755
--- a/basic/inc/basic/testtool.hrc
+++ b/basic/inc/basic/testtool.hrc
diff --git a/basic/inc/basic/testtool.hxx b/basic/inc/basic/testtool.hxx
index 179d28152561..ee0bd25f8ab4 100644..100755
--- a/basic/inc/basic/testtool.hxx
+++ b/basic/inc/basic/testtool.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,7 +43,6 @@
// this routine became necessary
sal_Bool IsTTSignatureForUnicodeTextfile( String aLine );
-//#include "testapp.hxx"
#define ADD_ERROR_QUIET(nNr, aStr) \
{ \
ErrorEntry *pErr; \
@@ -158,3 +158,5 @@ public:
};
#endif // _BASIC_TESTTOOL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basic/ttglobal.hrc b/basic/inc/basic/ttglobal.hrc
index 0248a06c7247..0248a06c7247 100644..100755
--- a/basic/inc/basic/ttglobal.hrc
+++ b/basic/inc/basic/ttglobal.hrc
diff --git a/basic/inc/basic/ttmsg.hrc b/basic/inc/basic/ttmsg.hrc
index 26f250bc6a6a..26f250bc6a6a 100644..100755
--- a/basic/inc/basic/ttmsg.hrc
+++ b/basic/inc/basic/ttmsg.hrc
diff --git a/basic/inc/basic/ttstrhlp.hxx b/basic/inc/basic/ttstrhlp.hxx
index 27867a97996d..adf9068fbdf7 100644..100755
--- a/basic/inc/basic/ttstrhlp.hxx
+++ b/basic/inc/basic/ttstrhlp.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -74,3 +75,4 @@ UniString GEN_RES_STR3( sal_uIntPtr nResId, const UniString &Text1, const UniStr
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/basrid.hxx b/basic/inc/basrid.hxx
index d12d05c3436a..f79778c61ee0 100644..100755
--- a/basic/inc/basrid.hxx
+++ b/basic/inc/basrid.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,3 +44,5 @@ class BasResId : public ResId
};
#endif //_BASRID_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/makefile.mk b/basic/inc/makefile.mk
index 1b56b6774806..1b56b6774806 100644..100755
--- a/basic/inc/makefile.mk
+++ b/basic/inc/makefile.mk
diff --git a/basic/inc/pch/precompiled_basic.cxx b/basic/inc/pch/precompiled_basic.cxx
index c27c1c7a66a6..29280bf5059a 100644..100755
--- a/basic/inc/pch/precompiled_basic.cxx
+++ b/basic/inc/pch/precompiled_basic.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_basic.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/pch/precompiled_basic.hxx b/basic/inc/pch/precompiled_basic.hxx
index ae45c383c74d..1b7a57032830 100644..100755
--- a/basic/inc/pch/precompiled_basic.hxx
+++ b/basic/inc/pch/precompiled_basic.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,6 +149,7 @@
#include "i18npool/lang.h"
+#include "osl/diagnose.h"
#include "osl/file.hxx"
#include "osl/module.h"
#include "osl/mutex.hxx"
@@ -211,7 +213,6 @@
#include "tools/fsys.hxx"
#include "tools/gen.hxx"
#include "tools/link.hxx"
-#include "tools/list.hxx"
#include "tools/rc.hxx"
#include "tools/rcid.h"
#include "tools/ref.hxx"
@@ -275,14 +276,11 @@
#include "tools/wintypes.hxx"
#include "vcl/wrkwin.hxx"
-#include "vos/diagnose.hxx"
-#include "vos/macros.hxx"
-#include "vos/mutex.hxx"
-#include "vos/process.hxx"
-
#include "xmlscript/xmldlg_imexp.hxx"
#include "xmlscript/xmllib_imexp.hxx"
#include "xmlscript/xmlmod_imexp.hxx"
//---MARKER---
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/sb.hrc b/basic/inc/sb.hrc
index c371d2abc046..c371d2abc046 100644..100755
--- a/basic/inc/sb.hrc
+++ b/basic/inc/sb.hrc
diff --git a/basic/inc/sb.hxx b/basic/inc/sb.hxx
index ecc85bfa4000..b54d77974fef 100644..100755
--- a/basic/inc/sb.hxx
+++ b/basic/inc/sb.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@
#include <basic/sbstar.hxx>
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */