[Libreoffice-commits] .: binfilter/bf_basic
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Nov 22 03:34:34 PST 2010
binfilter/bf_basic/source/basmgr/basmgr.cxx | 66 --
binfilter/bf_basic/source/classes/image.cxx | 10
binfilter/bf_basic/source/classes/sb.cxx | 69 --
binfilter/bf_basic/source/classes/sbunoobj.cxx | 198 +------
binfilter/bf_basic/source/classes/sbxmod.cxx | 635 -------------------------
binfilter/bf_basic/source/comp/buffer.cxx | 1
binfilter/bf_basic/source/comp/parser.cxx | 10
binfilter/bf_basic/source/comp/sbcomp.cxx | 2
binfilter/bf_basic/source/comp/scanner.cxx | 29 -
binfilter/bf_basic/source/comp/token.cxx | 2
binfilter/bf_basic/source/runtime/basrdll.cxx | 46 -
binfilter/bf_basic/source/sbx/sbxarray.cxx | 3
binfilter/bf_basic/source/sbx/sbxcurr.cxx | 1
binfilter/bf_basic/source/sbx/sbxdec.cxx | 13
binfilter/bf_basic/source/sbx/sbxexec.cxx | 69 --
binfilter/bf_basic/source/sbx/sbxvalue.cxx | 5
binfilter/bf_basic/source/sbx/sbxvar.cxx | 2
17 files changed, 51 insertions(+), 1110 deletions(-)
New commits:
commit 679c0396bd1fdf35d71d67dc9bd574b80ce65374
Author: Kevin Hunter <hunteke at earlham.edu>
Date: Fri Nov 19 19:03:35 2010 -0500
EasyHacks - kill dead code, translate, formatting
- Mainly removed some uncompiled code
- Translated a couple of comments
- Removed some errant tabs and tried to line up code as originally intended
diff --git a/binfilter/bf_basic/source/basmgr/basmgr.cxx b/binfilter/bf_basic/source/basmgr/basmgr.cxx
index 04a4bd0..8b5aa3a 100644
--- a/binfilter/bf_basic/source/basmgr/basmgr.cxx
+++ b/binfilter/bf_basic/source/basmgr/basmgr.cxx
@@ -460,7 +460,7 @@ public:
const String& GetLibName() const { return aLibName; }
void SetLibName( const String& rName ) { aLibName = rName; }
- // Nur temporaer fuer Laden/Speichern....
+ // Only temporary, for saving/loading ...
BOOL DoLoad() { return bDoLoad; }
BOOL HasPassword() const { return aPassword.Len() != 0; }
@@ -520,13 +520,12 @@ void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStora
if ( aStorageName.Len() == 0 )
aStorageName = aCurStorageName;
- // Wieder laden?
+ // Load again?
BOOL bDoLoad_ = xLib.Is();
if ( bUseOldReloadInfo )
bDoLoad_ = DoLoad();
rSStream << bDoLoad_;
- // Den Namen der Lib...
rSStream.WriteByteString(GetLibName());
// Absoluter Pfad....
@@ -581,10 +580,10 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
rSStream >> nId;
rSStream >> nVer;
- DBG_ASSERT( nId == LIBINFO_ID, "Keine BasicLibInfo !?" );
+ DBG_ASSERT( nId == LIBINFO_ID, "Without BasicLibInfo !?" );
if( nId == LIBINFO_ID )
{
- // Wieder laden?
+ // Load again?
BOOL bDoLoad;
rSStream >> bDoLoad;
pInfo->bDoLoad = bDoLoad;
@@ -645,8 +644,6 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
// #91251: Storage name not longer available for documents < 5.0
// Should be no real problem, because only relative storage names
// (links) can be affected.
- // DBG_ASSERT( aStorName.Len(), "No Storage Name!" );
- // DBG_ASSERT(aStorageName.Len() != 0, "Bad storage name");
// Wenn es den Manager-Stream nicht gibt, sind keine weiteren
// Aktionen noetig.
@@ -679,7 +676,6 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
StarBASIC* pBasic = GetLib( nBasic );
if ( pBasic )
{
-// pBasic->SetParent( pStdLib );
pStdLib->Insert( pBasic );
pBasic->SetFlag( SBX_EXTSEARCH );
}
@@ -902,8 +898,6 @@ void BasicManager::ImpMgrNotLoaded( const String& rStorageName )
{
// pErrInf wird nur zerstoert, wenn der Fehler von einem ErrorHandler
// gehandelt wird!
-// String aErrorText( BasicResId( IDS_SBERR_MGROPEN ) );
-// aErrorText.SearchAndReplace( "XX", rStorageName );
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, rStorageName, ERRCODE_BUTTON_OK );
pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENMGRSTREAM, rStorageName ) );
@@ -933,7 +927,6 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
{
DBG_CHKTHIS( BasicManager, 0 );
-// StreamMode eStreamMode = STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE;
SotStorageStreamRef xManagerStream = rStorage.OpenSotStream
( ManagerStreamName, eStreamReadMode );
@@ -953,7 +946,6 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
String aRealStorageName = maStorageName; // fuer relative Pfade, kann durch BaseURL umgebogen werden.
// Wenn aus Vorlagen geladen wird, gilt nur die BaseURL:
- //String aBaseURL = INetURLObject::GetBaseURL();
if ( rBaseURL.Len() )
{
INetURLObject aObj( rBaseURL );
@@ -988,11 +980,6 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
bool bWasAbsolute = FALSE;
aObj = aObj.smartRel2Abs( pInfo->GetRelStorageName(), bWasAbsolute );
- //*** TODO: Replace if still necessary
- /* if ( SfxContentHelper::Exists( aObj.GetMainURL() ) )
- pInfo->SetStorageName( aObj.GetMainURL() );
- else */
- //*** TODO-End
if ( pLibs->aBasicLibPath.Len() )
{
// Lib im Pfad suchen...
@@ -1026,7 +1013,6 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
{
DBG_CHKTHIS( BasicManager, 0 );
-// StreamMode eStreamMode = STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE;
SotStorageStreamRef xManagerStream = rStorage.OpenSotStream
( String::CreateFromAscii(szOldManagerStream), eStreamReadMode );
@@ -1051,8 +1037,6 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
xManagerStream->Seek( nBasicStartOff );
if( !ImplLoadBasic( *xManagerStream, pLibs->GetObject(0)->GetLibRef() ) )
{
-// String aErrorText( BasicResId( IDS_SBERR_MGROPEN ) );
-// aErrorText.SearchAndReplace( "XX", aStorName );
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, aStorName, ERRCODE_BUTTON_OK );
pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENMGRSTREAM, aStorName ) );
// und es geht weiter...
@@ -1099,8 +1083,6 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
AddLib( *xStorageRef, aLibName, FALSE );
else
{
-// String aErrorText( BasicResId( IDS_SBERR_LIBLOAD ) );
-// aErrorText.SearchAndReplace( "XX", aLibName );
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, aStorName, ERRCODE_BUTTON_OK );
pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_STORAGENOTFOUND, aStorName ) );
}
@@ -1171,7 +1153,6 @@ BOOL BasicManager::CopyBasicData( SotStorage* pStorFrom, const String& rSourceUR
bOk = pStorFrom->CopyTo( BasicStreamName, pStorTo, BasicStreamName );
if( bOk && pStorFrom->IsStream( ManagerStreamName ) )
{
- // bOk = pStorFrom->CopyTo( szManagerStream, pStorTo, szManagerStream );
BasicManager aBasMgr;
// Die aktuelle Base-URL ist die vom speichern...
String aStorName( pStorFrom->GetName() );
@@ -1277,7 +1258,7 @@ void BasicManager::Store( SotStorage& rStorage, const String& rBaseURL, BOOL bSt
// Store saved streams
SotStorageStreamRef xManagerStream = rStorage.OpenSotStream(
ManagerStreamName, STREAM_STD_READWRITE | STREAM_TRUNC );
- //ManagerStreamName, STREAM_STD_READWRITE /* | STREAM_TRUNC */ );
+
// STREAM_TRUNC buggy??!!! Then
// xManagerStream->Seek( 0 );
mpImpl->mpManagerStream->Seek( 0 );
@@ -1321,8 +1302,6 @@ void BasicManager::Store( SotStorage& rStorage, const String& rBaseURL, BOOL bSt
if ( !xManagerStream.Is() || xManagerStream->GetError() )
{
-// String aErrorText( BasicResId( IDS_SBERR_MGRSAVE ) );
-// aErrorText.SearchAndReplace( "XX", aStorName );
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGRSAVE, aStorName, ERRCODE_BUTTON_OK );
((BasicManager*)this)->pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENMGRSTREAM, aStorName ) );
}
@@ -1432,8 +1411,6 @@ BOOL BasicManager::ImpStoreLibary( StarBASIC* pLib, SotStorage& rStorage ) const
DBG_ASSERT( aStorName.Len(), "No Storage Name!" );
if ( !xBasicStorage.Is() || xBasicStorage->GetError() )
{
-// String aErrorText( BasicResId( IDS_SBERR_MGRSAVE ) );
-// aErrorText.SearchAndReplace( "XX", aStorName );
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGRSAVE, aStorName, ERRCODE_BUTTON_OK );
((BasicManager*)this)->pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENLIBSTORAGE, pLib->GetName() ) );
}
@@ -1443,8 +1420,6 @@ BOOL BasicManager::ImpStoreLibary( StarBASIC* pLib, SotStorage& rStorage ) const
SotStorageStreamRef xBasicStream = xBasicStorage->OpenSotStream( pLib->GetName(), STREAM_STD_READWRITE );
if ( !xBasicStream.Is() || xBasicStream->GetError() )
{
-// String aErrorText( BasicResId( IDS_SBERR_LIBSAVE ) );
-// aErrorText.SearchAndReplace( "XX", pLib->GetName() );
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBSAVE, pLib->GetName(), ERRCODE_BUTTON_OK );
((BasicManager*)this)->pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENLIBSTREAM, pLib->GetName() ) );
}
@@ -1476,7 +1451,6 @@ BOOL BasicManager::ImpStoreLibary( StarBASIC* pLib, SotStorage& rStorage ) const
}
// Vorsichtshalber alle Dont't Store lassen...
pLib->SetFlag( SBX_DONTSTORE );
-// SetFlagToAllLibs( SBX_DONTSTORE, FALSE );
pLib->SetModified( FALSE );
if( !xBasicStorage->Commit() )
bDone = FALSE;
@@ -1583,7 +1557,6 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag
xBasicStream->SetKey( ByteString() );
CheckModules( pLibInfo->GetLib(), pLibInfo->IsReference() );
}
-// bBasMgrModified = TRUE; // Warum?
return bLoaded;
}
}
@@ -1632,13 +1605,6 @@ BOOL BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con
// Fill new libray container (5.2 -> 6.0)
copyToLibraryContainer( pNew, mpImpl->mpInfo );
-/*
- if( rOldBasic->GetParent() )
- {
- rOldBasic->GetParent()->Insert( rOldBasic );
- rOldBasic->SetFlag( SBX_EXTSEARCH );
- }
-*/
pNew->SetModified( FALSE );
bLoaded = TRUE;
}
@@ -1655,14 +1621,6 @@ void BasicManager::CheckModules( StarBASIC* pLib, BOOL bReference ) const
BOOL bModified = pLib->IsModified();
-/*?*/ // for ( USHORT nMod = 0; nMod < pLib->GetModules()->Count(); nMod++ )
-/*?*/ // {
-/*?*/ // SbModule* pModule = (SbModule*)pLib->GetModules()->Get( nMod );
-/*?*/ // DBG_ASSERT( pModule, "Modul nicht erhalten!" );
-/*?*/ // if ( !pModule->IsCompiled() && !StarBASIC::GetErrorCode() )
-/*?*/ // pLib->Compile( pModule );
-/*?*/ // }
-
// #67477, AB 8.12.99 On demand Compilieren bei referenzierten
// Libraries sollte nicht zu modified fuehren
if( !bModified && bReference )
@@ -1691,7 +1649,6 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B
// Erstmal mit dem Original-Namen, da sonst ImpLoadLibary nicht geht...
pLibInfo->SetLibName( rLibName );
// Funktioniert so aber nicht, wenn Name doppelt
-// USHORT nLibId = GetLibId( rLibName );
USHORT nLibId = (USHORT) pLibs->GetPos( pLibInfo );
// Vorm Laden StorageNamen setzen, da er mit pCurStorage verglichen wird.
@@ -1707,7 +1664,6 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const String& rLibName, B
{
pLibInfo->GetLib()->SetModified( FALSE ); // Dann nicht speichern
pLibInfo->SetRelStorageName( String() );
-// pLibInfo->CalcRelStorageName( GetStorageName() );
pLibInfo->IsReference() = TRUE;
}
else
@@ -1781,7 +1737,6 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
if ( !xBasicStorage.Is() || xBasicStorage->GetError() )
{
-// String aErrorText( BasicResId( IDS_SBERR_REMOVELIB ) );
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, String(), ERRCODE_BUTTON_OK );
pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENLIBSTORAGE, pLibInfo->GetLibName() ) );
}
@@ -1807,9 +1762,6 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage )
{
String aName_( xStorage->GetName() );
xStorage.Clear();
- //*** TODO: Replace if still necessary
- //SfxContentHelper::Kill( aName );
- //*** TODO-End
}
}
}
@@ -1953,15 +1905,7 @@ StarBASIC* BasicManager::CreateLib
{
pLib = AddLib( *xStorage, rLibName, TRUE );
- //if( !pLibInfo )
- //pLibInfo = FindLibInfo( pLib );
- //pLibInfo->SetStorageName( LinkTargetURL );
- //pLibInfo->GetLib()->SetModified( FALSE ); // Dann nicht speichern
- //pLibInfo->SetRelStorageName( String() );
- //pLibInfo->IsReference() = TRUE;
}
- //else
- //Message?
DBG_ASSERT( pLib, "XML Import: Linked basic library could not be loaded");
}
diff --git a/binfilter/bf_basic/source/classes/image.cxx b/binfilter/bf_basic/source/classes/image.cxx
index 65cb44c..b7e4f5a 100644
--- a/binfilter/bf_basic/source/classes/image.cxx
+++ b/binfilter/bf_basic/source/classes/image.cxx
@@ -80,7 +80,7 @@ void SbiImage::Clear()
/**************************************************************************
*
-* Service-Routinen fuer das Laden und Speichern
+* Service routes for saving and loading
*
**************************************************************************/
@@ -157,18 +157,15 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
{
case B_NAME:
r.ReadByteString( aName, eCharSet );
- //r >> aName;
break;
case B_COMMENT:
r.ReadByteString( aComment, eCharSet );
- //r >> aComment;
break;
case B_SOURCE:
{
String aTmp;
r.ReadByteString( aTmp, eCharSet );
aOUSource = aTmp;
- //r >> aSource;
break;
}
#ifdef EXTENDED_BINARY_MODULES
@@ -249,8 +246,6 @@ BOOL SbiImage::Load( SvStream& r, UINT32& nVersion )
}
done:
r.Seek( nLast );
- //if( eCharSet != ::GetSystemCharSet() )
- //ConvertStrings();
if( !SbiGood( r ) )
bError = TRUE;
return BOOL( !bError );
@@ -290,7 +285,6 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
{
nPos = SbiOpenRecord( r, B_NAME, 1 );
r.WriteByteString( aName, eCharSet );
- //r << aName;
SbiCloseRecord( r, nPos );
}
// Kommentar?
@@ -298,7 +292,6 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
{
nPos = SbiOpenRecord( r, B_COMMENT, 1 );
r.WriteByteString( aComment, eCharSet );
- //r << aComment;
SbiCloseRecord( r, nPos );
}
// Source?
@@ -313,7 +306,6 @@ BOOL SbiImage::Save( SvStream& r, UINT32 nVer )
else
aTmp = aOUSource;
r.WriteByteString( aTmp, eCharSet );
- //r << aSource;
SbiCloseRecord( r, nPos );
#ifdef EXTENDED_BINARY_MODULES
diff --git a/binfilter/bf_basic/source/classes/sb.cxx b/binfilter/bf_basic/source/classes/sb.cxx
index df3f3f4..c48d4ac 100644
--- a/binfilter/bf_basic/source/classes/sb.cxx
+++ b/binfilter/bf_basic/source/classes/sb.cxx
@@ -51,8 +51,6 @@
namespace binfilter {
-// #pragma SW_SEGMENT_CLASS( SBASIC, SBASIC_CODE )
-
TYPEINIT1(StarBASIC,SbxObject)
#define RTLNAME "@SBRTL"
@@ -408,7 +406,6 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
pProcedureProp->SetFlag( SBX_NO_BROADCAST );
SbProcedureProperty* pNewProp = new SbProcedureProperty
( pProcedureProp->GetName(), pProcedureProp->GetType() );
- // ( pProcedureProp->GetName(), pProcedureProp->GetType(), this );
pNewProp->ResetFlag( SBX_NO_BROADCAST );
pProcedureProp->SetFlags( nFlags_ );
pProps->PutDirect( pNewProp, i );
@@ -618,7 +615,7 @@ StarBASIC::StarBASIC( StarBASIC* p )
pOLEFAC = new SbOLEFactory;
AddFactory( pOLEFAC );
}
-// pRtl = new SbiStdObject( String( RTL_CONSTASCII_USTRINGPARAM(RTLNAME) ), this );
+
// Suche ueber StarBASIC ist immer global
SetFlag( SBX_GBLSEARCH );
}
@@ -668,7 +665,6 @@ void* StarBASIC::operator new( size_t n )
{
if( n < sizeof( StarBASIC ) )
{
-// DBG_ASSERT( FALSE, "Warnung: inkompatibler BASIC-Stand!" );
n = sizeof( StarBASIC );
}
return ::operator new( n );
@@ -746,14 +742,6 @@ SbModule* StarBASIC::FindModule( const String& rName )
// Init-Code aller Module ausfuehren (auch in inserteten Bibliotheken)
void StarBASIC::InitAllModules( StarBASIC* pBasicNotToInit )
{
- // Eigene Module initialisieren
-/*?*/ // for ( USHORT nMod = 0; nMod < pModules->Count(); nMod++ )
-/*?*/ // {
-/*?*/ // SbModule* pModule = (SbModule*)pModules->Get( nMod );
-/*?*/ // if( !pModule->IsCompiled() )
-/*?*/ // pModule->Compile();
-/*?*/ // pModule->RunInit();
-/*?*/ // }
DBG_ERROR( "StarBASIC::InitAllModules: dead code!" );
// Alle Objekte ueberpruefen, ob es sich um ein Basic handelt
// Wenn ja, auch dort initialisieren
@@ -810,8 +798,6 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t )
if( rName.EqualsIgnoreCaseAscii( RTLNAME ) )
pRes = pRtl;
}
-/*?*/ // if( !pRes )
-/*?*/ // pRes = ((SbiStdObject*) (SbxObject*) pRtl)->Find( rName, t );
if( pRes )
pRes->SetFlag( SBX_EXTFOUND );
}
@@ -863,15 +849,7 @@ BOOL StarBASIC::Call( const String& rName, SbxArray* pParam )
return bRes;
}
-void StarBASIC::Stop()
-{
-/*?*/ // SbiInstance* p = pINST;
-/*?*/ // while( p )
-/*?*/ // {
-/*?*/ // p->Stop();
-/*?*/ // p = p->pNext;
-/*?*/ // }
-}
+void StarBASIC::Stop() { }
BOOL StarBASIC::IsRunning()
{
@@ -986,26 +964,6 @@ void StarBASIC::MakeErrorText( SbError nId, const String& /*aMsg*/ )
USHORT nOldID = GetVBErrorCode( nId );
- // Hilfsklasse instanzieren
-/*?*/ // BasicResId aId( RID_BASIC_START );
-/*?*/ // BasicStringList_Impl aMyStringList( aId, USHORT(nId & ERRCODE_RES_MASK) );
-
-/*?*/ // if( aMyStringList.IsErrorTextAvailable() )
-/*?*/ ///*?*/ // {
-/*?*/ // // Merge Message mit Zusatztext
-/*?*/ // String aMsg1 = aMyStringList.GetString();
-/*?*/ // // Argument-Platzhalter durch %s ersetzen
-/*?*/ // String aSrgStr( RTL_CONSTASCII_USTRINGPARAM("$(ARG1)") );
-/*?*/ // USHORT nResult = aMsg1.Search( aSrgStr );
-/*?*/ //
-/*?*/ // if( nResult != STRING_NOTFOUND )
-/*?*/ // {
-/*?*/ // aMsg1.Erase( nResult, aSrgStr.Len() );
-/*?*/ // aMsg1.Insert( aMsg, nResult );
-/*?*/ // }
-/*?*/ // GetSbData()->aErrMsg = aMsg1;
-/*?*/ // }
-/*?*/ // else if( nOldID != 0 )
if( nOldID != 0 )
{
String aStdMsg( RTL_CONSTASCII_USTRINGPARAM("error ") );
@@ -1025,11 +983,6 @@ BOOL StarBASIC::CError
// Compiler-Fehler waehrend der Laufzeit -> Programm anhalten
if( IsRunning() )
{
- // #109018 Check if running Basic is affected
-/*?*/ // StarBASIC* pStartedBasic = pINST->GetBasic();
-/*?*/ // if( pStartedBasic != this )
-/*?*/ // return FALSE;
-
Stop();
}
@@ -1050,7 +1003,7 @@ BOOL StarBASIC::CError
bRet = (BOOL) GetSbData()->aErrHdl.Call( this );
else
bRet = ErrorHdl();
- GetSbData()->bCompiler = FALSE; // nur TRUE fuer Error-Handler
+ GetSbData()->bCompiler = FALSE; // Only TRUE for Error-Handler
return bRet;
}
@@ -1085,17 +1038,9 @@ void StarBASIC::Error( SbError n )
Error( n, String() );
}
-void StarBASIC::Error( SbError /*n*/, const String& /*rMsg*/ )
-{
-/*?*/ // if( pINST )
-/*?*/ // pINST->Error( n, rMsg );
-}
+void StarBASIC::Error( SbError /*n*/, const String& /*rMsg*/ ) { }
-void StarBASIC::FatalError( SbError /*n*/ )
-{
-/*?*/ // if( pINST )
-/*?*/ // pINST->FatalError( n );
-}
+void StarBASIC::FatalError( SbError /*n*/ ) { }
BOOL __EXPORT StarBASIC::ErrorHdl()
{
@@ -1105,7 +1050,7 @@ BOOL __EXPORT StarBASIC::ErrorHdl()
/**************************************************************************
*
-* Laden und Speichern
+* Saving and Loading
*
**************************************************************************/
@@ -1336,7 +1281,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ )
}
nNextIndex = nAfterIndex + 1;
}
- else // if( nCount == 4 )
+ else
{
INT32 nBeforeIndex = implGetIndex( pBefore );
if( nBeforeIndex == -1 )
diff --git a/binfilter/bf_basic/source/classes/sbunoobj.cxx b/binfilter/bf_basic/source/classes/sbunoobj.cxx
index 444f5e4..a7ea3cd 100644
--- a/binfilter/bf_basic/source/classes/sbunoobj.cxx
+++ b/binfilter/bf_basic/source/classes/sbunoobj.cxx
@@ -97,10 +97,6 @@ TYPEINIT1(SbUnoClass,SbxObject)
typedef WeakImplHelper1< XAllListener > BasicAllListenerHelper;
-// Flag, um immer ueber Invocation zu gehen
-//#define INVOCATION_ONLY
-
-
// Identifier fuer die dbg_-Properies als Strings anlegen
static String ID_DBG_SUPPORTEDINTERFACES( RTL_CONSTASCII_USTRINGPARAM("Dbg_SupportedInterfaces") );
static String ID_DBG_PROPERTIES( RTL_CONSTASCII_USTRINGPARAM("Dbg_Properties") );
@@ -340,43 +336,26 @@ SbxDataType unoToSbxType( TypeClass eType )
case TypeClass_INTERFACE:
case TypeClass_TYPE:
case TypeClass_STRUCT:
- case TypeClass_EXCEPTION: eRetType = SbxOBJECT; break;
+ case TypeClass_EXCEPTION: eRetType = SbxOBJECT; break;
- /* folgende Typen lassen wir erstmal weg
- case TypeClass_SERVICE: break;
- case TypeClass_CLASS: break;
- case TypeClass_TYPEDEF: break;
- case TypeClass_UNION: break;
- case TypeClass_ARRAY: break;
- */
- case TypeClass_ENUM: eRetType = SbxLONG; break;
+ case TypeClass_ENUM: eRetType = SbxLONG; break;
case TypeClass_SEQUENCE:
eRetType = (SbxDataType) ( SbxOBJECT | SbxARRAY );
break;
- /*
- case TypeClass_VOID: break;
- case TypeClass_UNKNOWN: break;
- */
-
- case TypeClass_ANY: eRetType = SbxVARIANT; break;
- case TypeClass_BOOLEAN: eRetType = SbxBOOL; break;
- case TypeClass_CHAR: eRetType = SbxCHAR; break;
- case TypeClass_STRING: eRetType = SbxSTRING; break;
- case TypeClass_FLOAT: eRetType = SbxSINGLE; break;
- case TypeClass_DOUBLE: eRetType = SbxDOUBLE; break;
- //case TypeClass_OCTET: break;
- case TypeClass_BYTE: eRetType = SbxINTEGER; break;
- //case TypeClass_INT: eRetType = SbxINT; break;
- case TypeClass_SHORT: eRetType = SbxINTEGER; break;
- case TypeClass_LONG: eRetType = SbxLONG; break;
- case TypeClass_HYPER: eRetType = SbxSALINT64; break;
- //case TypeClass_UNSIGNED_OCTET: break;
- case TypeClass_UNSIGNED_SHORT: eRetType = SbxUSHORT; break;
- case TypeClass_UNSIGNED_LONG: eRetType = SbxULONG; break;
- case TypeClass_UNSIGNED_HYPER: eRetType = SbxSALUINT64;break;
- //case TypeClass_UNSIGNED_INT: eRetType = SbxUINT; break;
- //case TypeClass_UNSIGNED_BYTE: eRetType = SbxUSHORT; break;
+ case TypeClass_ANY: eRetType = SbxVARIANT; break;
+ case TypeClass_BOOLEAN: eRetType = SbxBOOL; break;
+ case TypeClass_CHAR: eRetType = SbxCHAR; break;
+ case TypeClass_STRING: eRetType = SbxSTRING; break;
+ case TypeClass_FLOAT: eRetType = SbxSINGLE; break;
+ case TypeClass_DOUBLE: eRetType = SbxDOUBLE; break;
+ case TypeClass_BYTE: eRetType = SbxINTEGER; break;
+ case TypeClass_SHORT: eRetType = SbxINTEGER; break;
+ case TypeClass_LONG: eRetType = SbxLONG; break;
+ case TypeClass_HYPER: eRetType = SbxSALINT64; break;
+ case TypeClass_UNSIGNED_SHORT: eRetType = SbxUSHORT; break;
+ case TypeClass_UNSIGNED_LONG: eRetType = SbxULONG; break;
+ case TypeClass_UNSIGNED_HYPER: eRetType = SbxSALUINT64;break;
default: break;
}
return eRetType;
@@ -609,24 +588,8 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
pVar->PutObject( (SbxDimArray*)xArray );
pVar->SetFlags( nFlags );
- // #54548, Die Parameter duerfen hier nicht weggehauen werden
- //pVar->SetParameters( NULL );
- }
- break;
-
- /*
- case TypeClass_VOID: break;
- case TypeClass_UNKNOWN: break;
-
- case TypeClass_ANY:
- {
- // Any rausholen und konvertieren
- //Any* pAny = (Any*)aValue.get();
- //if( pAny )
- //unoToSbxValue( pVar, *pAny );
}
break;
- */
case TypeClass_BOOLEAN: pVar->PutBool( *(sal_Bool*)aValue.getValue() ); break;
case TypeClass_CHAR:
@@ -634,22 +597,17 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
pVar->PutChar( *(sal_Unicode*)aValue.getValue() );
break;
}
- case TypeClass_STRING: { OUString val; aValue >>= val; pVar->PutString( String( val ) ); } break;
- case TypeClass_FLOAT: { float val = 0; aValue >>= val; pVar->PutSingle( val ); } break;
- case TypeClass_DOUBLE: { double val = 0; aValue >>= val; pVar->PutDouble( val ); } break;
- //case TypeClass_OCTET: break;
- case TypeClass_BYTE: { sal_Int8 val = 0; aValue >>= val; pVar->PutInteger( val ); } break;
- //case TypeClass_INT: break;
- case TypeClass_SHORT: { sal_Int16 val = 0; aValue >>= val; pVar->PutInteger( val ); } break;
- case TypeClass_LONG: { sal_Int32 val = 0; aValue >>= val; pVar->PutLong( val ); } break;
- case TypeClass_HYPER: { sal_Int64 val = 0; aValue >>= val; pVar->PutInt64( val ); } break;
- //case TypeClass_UNSIGNED_OCTET:break;
- case TypeClass_UNSIGNED_SHORT: { sal_uInt16 val = 0; aValue >>= val; pVar->PutUShort( val ); } break;
- case TypeClass_UNSIGNED_LONG: { sal_uInt32 val = 0; aValue >>= val; pVar->PutULong( val ); } break;
- case TypeClass_UNSIGNED_HYPER: { sal_uInt64 val = 0; aValue >>= val; pVar->PutUInt64( val ); } break;
- //case TypeClass_UNSIGNED_INT: break;
- //case TypeClass_UNSIGNED_BYTE: break;
- default: pVar->PutEmpty(); break;
+ case TypeClass_STRING: { OUString val; aValue >>= val; pVar->PutString( String( val ) ); } break;
+ case TypeClass_FLOAT: { float val = 0; aValue >>= val; pVar->PutSingle( val ); } break;
+ case TypeClass_DOUBLE: { double val = 0; aValue >>= val; pVar->PutDouble( val ); } break;
+ case TypeClass_BYTE: { sal_Int8 val = 0; aValue >>= val; pVar->PutInteger( val ); } break;
+ case TypeClass_SHORT: { sal_Int16 val = 0; aValue >>= val; pVar->PutInteger( val ); } break;
+ case TypeClass_LONG: { sal_Int32 val = 0; aValue >>= val; pVar->PutLong( val ); } break;
+ case TypeClass_HYPER: { sal_Int64 val = 0; aValue >>= val; pVar->PutInt64( val ); } break;
+ case TypeClass_UNSIGNED_SHORT: { sal_uInt16 val = 0; aValue >>= val; pVar->PutUShort( val ); } break;
+ case TypeClass_UNSIGNED_LONG: { sal_uInt32 val = 0; aValue >>= val; pVar->PutULong( val ); } break;
+ case TypeClass_UNSIGNED_HYPER: { sal_uInt64 val = 0; aValue >>= val; pVar->PutUInt64( val ); } break;
+ default: pVar->PutEmpty(); break;
}
}
@@ -659,7 +617,6 @@ Type getUnoTypeForSbxBaseType( SbxDataType eType )
Type aRetType = getCppuVoidType();
switch( eType )
{
- //case SbxEMPTY: eRet = TypeClass_VOID; break;
case SbxNULL: aRetType = ::getCppuType( (const Reference< XInterface > *)0 ); break;
case SbxINTEGER: aRetType = ::getCppuType( (sal_Int16*)0 ); break;
case SbxLONG: aRetType = ::getCppuType( (sal_Int32*)0 ); break;
@@ -668,38 +625,20 @@ Type getUnoTypeForSbxBaseType( SbxDataType eType )
case SbxCURRENCY: aRetType = ::getCppuType( (oleautomation::Currency*)0 ); break;
case SbxDECIMAL: aRetType = ::getCppuType( (oleautomation::Decimal*)0 ); break;
case SbxDATE: {
-/*?*/ // SbiInstance* pInst = pINST;
-/*?*/ // if( pInst && pInst->IsCompatibility() )
-/*?*/ // aRetType = ::getCppuType( (double*)0 );
-/*?*/ // else
aRetType = ::getCppuType( (oleautomation::Date*)0 );
}
break;
- // case SbxDATE: aRetType = ::getCppuType( (double*)0 ); break;
case SbxSTRING: aRetType = ::getCppuType( (OUString*)0 ); break;
- //case SbxOBJECT: break;
- //case SbxERROR: break;
case SbxBOOL: aRetType = ::getCppuType( (sal_Bool*)0 ); break;
case SbxVARIANT: aRetType = ::getCppuType( (Any*)0 ); break;
- //case SbxDATAOBJECT: break;
case SbxCHAR: aRetType = ::getCppuType( (sal_Unicode*)0 ); break;
case SbxBYTE: aRetType = ::getCppuType( (sal_Int16*)0 ); break;
case SbxUSHORT: aRetType = ::getCppuType( (sal_uInt16*)0 ); break;
case SbxULONG: aRetType = ::getCppuType( (sal_uInt32*)0 ); break;
- //case SbxLONG64: break;
- //case SbxULONG64: break;
+
// Maschinenabhaengige zur Sicherheit auf Hyper abbilden
case SbxINT: aRetType = ::getCppuType( (sal_Int32*)0 ); break;
case SbxUINT: aRetType = ::getCppuType( (sal_uInt32*)0 ); break;
- //case SbxVOID: break;
- //case SbxHRESULT: break;
- //case SbxPOINTER: break;
- //case SbxDIMARRAY: break;
- //case SbxCARRAY: break;
- //case SbxUSERDEF: break;
- //case SbxLPSTR: break;
- //case SbxLPWSTR: break;
- //case SbxCoreSTRING: break;
default: break;
}
return aRetType;
@@ -719,8 +658,6 @@ Type getUnoTypeForSbxValue( SbxValue* pVal )
SbxBaseRef xObj = (SbxBase*)pVal->GetObject();
if( !xObj )
{
- // #109936 No error any more
- // StarBASIC::Error( SbERR_INVALID_OBJECT );
aRetType = getCppuType( static_cast<Reference<XInterface> *>(0) );
return aRetType;
}
@@ -1767,27 +1704,6 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
nParamCount = nUnoParamCount;
nAllocParamCount = nParamCount;
}
- else if( nParamCount < nUnoParamCount )
- {
-/*?*/ // SbiInstance* pInst = pINST;
-/*?*/ // if( pInst && pInst->IsCompatibility() )
-/*?*/ // {
-/*?*/ // // Check types
-/*?*/ // bool bError = false;
-/*?*/ // for( i = nParamCount ; i < nUnoParamCount ; i++ )
-/*?*/ // {
-/*?*/ // const ParamInfo& rInfo = pParamInfos[i];
-/*?*/ // const Reference< XIdlClass >& rxClass = rInfo.aType;
-/*?*/ // if( rxClass->getTypeClass() != TypeClass_ANY )
-/*?*/ // {
-/*?*/ // bError = true;
-/*?*/ // StarBASIC::Error( SbERR_NOT_OPTIONAL );
-/*?*/ // }
-/*?*/ // }
-/*?*/ // if( !bError )
-/*?*/ // nAllocParamCount = nUnoParamCount;
-/*?*/ // }
- }
if( nAllocParamCount > 0 )
{
@@ -1826,7 +1742,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
args.realloc( nParamCount );
Any* pAnyArgs = args.getArray();
bool bBlockConversionToSmallestType( false );
-/*?*/ // bool bBlockConversionToSmallestType = pINST->IsCompatibility();
+
if( pArgNamesArray )
{
Sequence< OUString >& rNameSeq = pArgNamesArray->getNames();
@@ -1946,14 +1862,6 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
{
StarBASIC::Error( ERRCODE_BASIC_EXCEPTION, implGetExceptionMsg( e4 ) );
}
- /*
- catch( NullPointerException& e1 )
- {
- }
- catch( InvocationTargetException& e2 )
- {
- }
- */
GetSbData()->bBlockCompilerError = FALSE; // #106433 Unblock compiler errors
}
}
@@ -2175,29 +2083,6 @@ SbUnoMethod::~SbUnoMethod()
SbxInfo* SbUnoMethod::GetInfo()
{
-/*?*/ // if( !pInfo && m_xUnoMethod.is() )
-/*?*/ // {
-/*?*/ // SbiInstance* pInst = pINST;
-/*?*/ // if( pInst && pInst->IsCompatibility() )
-/*?*/ // {
-/*?*/ // pInfo = new SbxInfo();
-/*?*/ //
-/*?*/ // const Sequence<ParamInfo>& rInfoSeq = getParamInfos();
-/*?*/ // const ParamInfo* pParamInfos = rInfoSeq.getConstArray();
-/*?*/ // UINT32 nParamCount = rInfoSeq.getLength();
-/*?*/ //
-/*?*/ // for( UINT32 i = 0 ; i < nParamCount ; i++ )
-/*?*/ // {
-/*?*/ // const ParamInfo& rInfo = pParamInfos[i];
-/*?*/ // OUString aParamName = rInfo.aName;
-/*?*/ //
-/*?*/ // // const Reference< XIdlClass >& rxClass = rInfo.aType;
-/*?*/ // SbxDataType t = SbxVARIANT;
-/*?*/ // USHORT nFlags_ = SBX_READ;
-/*?*/ // pInfo->AddParam( aParamName, t, nFlags_ );
-/*?*/ // }
-/*?*/ // }
-/*?*/ // }
return pInfo;
}
@@ -2234,33 +2119,6 @@ SbUnoProperty::~SbUnoProperty()
{}
-/*?*/ // // #72732 Spezielle SbxVariable, die beim put/get prueft,
-/*?*/ // // ob der Kontext fuer eine UnoClass sinnvoll ist. Sonst
-/*?*/ // // liegt eventuell ein Schreibfehler im Basic-Source vor.
-/*?*/ // BOOL UnoClassMemberVariable::Get( SbxValues& rRes ) const
-/*?*/ // {
-/*?*/ // // Zugriff auf den Member einer UnoClass mit Parametern ist unsinnig
-/*?*/ // if( GetParameters() )
-/*?*/ // {
-/*?*/ // if( mpRuntime )
-/*?*/ // mpRuntime->Error( SbERR_NO_METHOD );
-/*?*/ // }
-/*?*/ // return SbxVariable::Get( rRes );
-/*?*/ // }
-/*?*/ //
-/*?*/ // BOOL UnoClassMemberVariable::Put( const SbxValues& rRes )
-/*?*/ // {
-/*?*/ // if( bInternalUse )
-/*?*/ // {
-/*?*/ // return SbxVariable::Put( rRes );
-/*?*/ // }
-/*?*/ // // Schreibzugriff auf den Member einer UnoClass ist immer falsch
-/*?*/ // mpRuntime->Error( SbERR_NO_METHOD );
-/*?*/ // return FALSE;
-/*?*/ // }
-/*?*/ //
-/*?*/ // TYPEINIT1(UnoClassMemberVariable,SbxVariable)
-
SbxVariable* SbUnoObject::Find( const XubString& rName, SbxClassType t )
{
static Reference< XIdlMethod > xDummyMethod;
diff --git a/binfilter/bf_basic/source/classes/sbxmod.cxx b/binfilter/bf_basic/source/classes/sbxmod.cxx
index 4f954d2..8035f08 100644
--- a/binfilter/bf_basic/source/classes/sbxmod.cxx
+++ b/binfilter/bf_basic/source/classes/sbxmod.cxx
@@ -201,34 +201,6 @@ void SbModule::Clear()
SbxVariable* SbModule::Find( const XubString& rName, SbxClassType t )
{
SbxVariable* pRes = SbxObject::Find( rName, t );
-/*?*/ // if( !pRes && pImage )
-/*?*/ // {
-/*?*/ // SbiInstance* pInst = pINST;
-/*?*/ // if( pInst && pInst->IsCompatibility() )
-/*?*/ // {
-/*?*/ // // Put enum types as objects into module,
-/*?*/ // // allows MyEnum.First notation
-/*?*/ // SbxArrayRef xArray = pImage->GetEnums();
-/*?*/ // if( xArray.Is() )
-/*?*/ // {
-/*?*/ // SbxVariable* pEnumVar = xArray->Find( rName, SbxCLASS_DONTCARE );
-/*?*/ // SbxObject* pEnumObject = PTR_CAST( SbxObject, pEnumVar );
-/*?*/ // if( pEnumObject )
-/*?*/ // {
-/*?*/ // bool bPrivate = pEnumObject->IsSet( SBX_PRIVATE );
-/*?*/ // String aEnumName = pEnumObject->GetName();
-/*?*/ //
-/*?*/ // pRes = new SbxVariable( SbxOBJECT );
-/*?*/ // pRes->SetName( aEnumName );
-/*?*/ // pRes->SetParent( this );
-/*?*/ // pRes->SetFlag( SBX_READ );
-/*?*/ // if( bPrivate )
-/*?*/ // pRes->SetFlag( SBX_PRIVATE );
-/*?*/ // pRes->PutObject( pEnumObject );
-/*?*/ // }
-/*?*/ // }
-/*?*/ // }
-/*?*/ // }
return pRes;
}
@@ -248,8 +220,6 @@ const String& SbModule::GetSource() const
void SbModule::SetParent( SbxObject* p )
{
- // #118083: Assertion is not valid any more
- // DBG_ASSERT( !p || p->IsA( TYPE(StarBASIC) ), "SbModules nur in BASIC eintragen" );
pParent = p;
}
@@ -403,12 +373,6 @@ static void _SendHint( SbxObject* pObj, ULONG nId, SbMethod* p )
}
}
-/*?*/ // static void SendHint( SbxObject* pObj, ULONG nId, SbMethod* p )
-/*?*/ // {
-/*?*/ // while( pObj->GetParent() )
-/*?*/ // pObj = pObj->GetParent();
-/*?*/ // _SendHint( pObj, nId, p );
-/*?*/ // }
// #57841 Uno-Objekte, die in RTL-Funktionen gehalten werden,
// beim Programm-Ende freigeben, damit nichts gehalten wird.
@@ -469,38 +433,6 @@ const BYTE* SbModule::FindNextStmnt( const BYTE* /*p*/, USHORT& /*nLine*/, USHOR
BOOL /*bFollowJumps*/, const SbiImage* /*pImg*/ ) const
{
DBG_ERROR( "SbModule::FindNextStmnt: dead code!" );
-/*?*/ // UINT32 nPC = (UINT32) ( p - (const BYTE*) pImage->GetCode() );
-/*?*/ // while( nPC < pImage->GetCodeSize() )
-/*?*/ // {
-/*?*/ // SbiOpcode eOp = (SbiOpcode ) ( *p++ );
-/*?*/ // nPC++;
-/*?*/ // if( bFollowJumps && eOp == _JUMP && pImg )
-/*?*/ // {
-/*?*/ // DBG_ASSERT( pImg, "FindNextStmnt: pImg==NULL with FollowJumps option" );
-/*?*/ // UINT32 nOp1 = *p++; nOp1 |= *p++ << 8;
-/*?*/ // nOp1 |= *p++ << 16; nOp1 |= *p++ << 24;
-/*?*/ // p = (const BYTE*) pImg->GetCode() + nOp1;
-/*?*/ // }
-/*?*/ // else if( eOp >= SbOP1_START && eOp <= SbOP1_END )
-/*?*/ // p += 4, nPC += 4;
-/*?*/ // else if( eOp == _STMNT )
-/*?*/ // {
-/*?*/ // UINT32 nl, nc;
-/*?*/ // nl = *p++; nl |= *p++ << 8;
-/*?*/ // nl |= *p++ << 16 ; nl |= *p++ << 24;
-/*?*/ // nc = *p++; nc |= *p++ << 8;
-/*?*/ // nc |= *p++ << 16 ; nc |= *p++ << 24;
-/*?*/ // nLine = (USHORT)nl; nCol = (USHORT)nc;
-/*?*/ // return p;
-/*?*/ // }
-/*?*/ // else if( eOp >= SbOP2_START && eOp <= SbOP2_END )
-/*?*/ // p += 8, nPC += 8;
-/*?*/ // else if( !( eOp >= SbOP0_START && eOp <= SbOP0_END ) )
-/*?*/ // {
-/*?*/ // StarBASIC::FatalError( SbERR_INTERNAL_ERROR );
-/*?*/ // break;
-/*?*/ // }
-/*?*/ // }
return NULL;
}
@@ -695,542 +627,6 @@ BOOL SbModule::LoadCompleted()
#define CHAR_EOF 0x00
-/*?*/ // class SimpleTokenizer_Impl
-/*?*/ // {
-/*?*/ // // Zeichen-Info-Tabelle
-/*?*/ // USHORT aCharTypeTab[256];
-/*?*/ //
-/*?*/ // const sal_Unicode* mpStringBegin;
-/*?*/ // const sal_Unicode* mpActualPos;
-/*?*/ //
-/*?*/ // // Zeile und Spalte
-/*?*/ // UINT32 nLine;
-/*?*/ // UINT32 nCol;
-/*?*/ //
-/*?*/ // sal_Unicode peekChar( void ) { return *mpActualPos; }
-/*?*/ // sal_Unicode getChar( void ) { nCol++; return *mpActualPos++; }
-/*?*/ //
-/*?*/ // // Hilfsfunktion: Zeichen-Flag Testen
-/*?*/ // BOOL testCharFlags( sal_Unicode c, USHORT nTestFlags );
-/*?*/ //
-/*?*/ // // Neues Token holen, Leerstring == nix mehr da
-/*?*/ // BOOL getNextToken( /*out*/TokenTypes& reType,
-/*?*/ // /*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos );
-/*?*/ //
-/*?*/ // String getTokStr( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos );
-/*?*/ //
-/*?*/ // #ifdef DBG_UTIL
-/*?*/ // // TEST: Token ausgeben
-/*?*/ // String getFullTokenStr( /*out*/TokenTypes eType,
-/*?*/ // /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos );
-/*?*/ // #endif
-/*?*/ //
-/*?*/ // const char** ppListKeyWords;
-/*?*/ // UINT16 nKeyWordCount;
-/*?*/ //
-/*?*/ // public:
-/*?*/ // SimpleTokenizer_Impl( void );
-/*?*/ // ~SimpleTokenizer_Impl( void );
-/*?*/ //
-/*?*/ // UINT16 parseLine( UINT32 nLine, const String* aSource );
-/*?*/ // void getHighlightPortions( UINT32 nParseLine, const String& rLine,
-/*?*/ // /*out*/HighlightPortions& portions );
-/*?*/ // void setKeyWords( const char** ppKeyWords, UINT16 nCount );
-/*?*/ // };
-
-/*?*/ // // Hilfsfunktion: Zeichen-Flag Testen
-/*?*/ // BOOL SimpleTokenizer_Impl::testCharFlags( sal_Unicode c, USHORT nTestFlags )
-/*?*/ // {
-/*?*/ // bool bRet = false;
-/*?*/ // if( c != 0 && c <= 255 )
-/*?*/ // {
-/*?*/ // bRet = ( (aCharTypeTab[c] & nTestFlags) != 0 );
-/*?*/ // }
-/*?*/ // else if( c > 255 )
-/*?*/ // {
-/*?*/ // bRet = (( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER ) & nTestFlags) != 0
-/*?*/ // ? BasicSimpleCharClass::isAlpha( c, true ) : false;
-/*?*/ // }
-/*?*/ // return bRet;
-/*?*/ // }
-/*?*/ //
-/*?*/ // void SimpleTokenizer_Impl::setKeyWords( const char** ppKeyWords, UINT16 nCount )
-/*?*/ // {
-/*?*/ // ppListKeyWords = ppKeyWords;
-/*?*/ // nKeyWordCount = nCount;
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Neues Token holen
-/*?*/ // BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
-/*?*/ // /*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos )
-/*?*/ // {
-/*?*/ // reType = TT_UNKNOWN;
-/*?*/ //
-/*?*/ // // Position merken
-/*?*/ // rpStartPos = mpActualPos;
-/*?*/ //
-/*?*/ // // Zeichen untersuchen
-/*?*/ // sal_Unicode c = peekChar();
-/*?*/ // if( c == CHAR_EOF )
-/*?*/ // return FALSE;
-/*?*/ //
-/*?*/ // // Zeichen lesen
-/*?*/ // getChar();
-/*?*/ //
-/*?*/ // //*** Alle Moeglichkeiten durchgehen ***
-/*?*/ // // Space?
-/*?*/ // if ( (testCharFlags( c, CHAR_SPACE ) == TRUE) )
-/*?*/ // {
-/*?*/ // while( testCharFlags( peekChar(), CHAR_SPACE ) == TRUE )
-/*?*/ // getChar();
-/*?*/ //
-/*?*/ // reType = TT_WHITESPACE;
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Identifier?
-/*?*/ // else if ( (testCharFlags( c, CHAR_START_IDENTIFIER ) == TRUE) )
-/*?*/ // {
-/*?*/ // BOOL bIdentifierChar;
-/*?*/ // do
-/*?*/ // {
-/*?*/ // // Naechstes Zeichen holen
-/*?*/ // c = peekChar();
-/*?*/ // bIdentifierChar = testCharFlags( c, CHAR_IN_IDENTIFIER );
-/*?*/ // if( bIdentifierChar )
-/*?*/ // getChar();
-/*?*/ // }
-/*?*/ // while( bIdentifierChar );
-/*?*/ //
-/*?*/ // reType = TT_IDENTIFIER;
-/*?*/ //
-/*?*/ // // Schluesselwort-Tabelle
-/*?*/ // if (ppListKeyWords != NULL)
-/*?*/ // {
-/*?*/ // int nCount = mpActualPos - rpStartPos;
-/*?*/ //
-/*?*/ // // No keyword if string contains char > 255
-/*?*/ // bool bCanBeKeyword = true;
-/*?*/ // for( int i = 0 ; i < nCount ; i++ )
-/*?*/ // {
-/*?*/ // if( rpStartPos[i] > 255 )
-/*?*/ // {
-/*?*/ // bCanBeKeyword = false;
-/*?*/ // break;
-/*?*/ // }
-/*?*/ // }
-/*?*/ //
-/*?*/ // if( bCanBeKeyword )
-/*?*/ // {
-/*?*/ // String aKWString(
-/*?*/ // rpStartPos, sal::static_int_cast< xub_StrLen >(nCount) );
-/*?*/ // ByteString aByteStr( aKWString, RTL_TEXTENCODING_ASCII_US );
-/*?*/ // aByteStr.ToLowerAscii();
-/*?*/ // if ( bsearch( aByteStr.GetBuffer(), ppListKeyWords, nKeyWordCount, sizeof( char* ),
-/*?*/ // compare_strings ) )
-/*?*/ // {
-/*?*/ // reType = TT_KEYWORD;
-/*?*/ //
-/*?*/ // if ( aByteStr.Equals( "rem" ) )
-/*?*/ // {
-/*?*/ // // Alle Zeichen bis Zeilen-Ende oder EOF entfernen
-/*?*/ // sal_Unicode cPeek = peekChar();
-/*?*/ // while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE )
-/*?*/ // {
-/*?*/ // c = getChar();
-/*?*/ // cPeek = peekChar();
-/*?*/ // }
-/*?*/ //
-/*?*/ // reType = TT_COMMENT;
-/*?*/ // }
-/*?*/ // }
-/*?*/ // }
-/*?*/ // }
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Operator?
-/*?*/ // else if ( testCharFlags( c, CHAR_OPERATOR ) == TRUE || c == '\'' )
-/*?*/ // {
-/*?*/ // // Kommentar ?
-/*?*/ // if ( c == '\'' )
-/*?*/ // {
-/*?*/ // c = getChar(); // '/' entfernen
-/*?*/ //
-/*?*/ // // Alle Zeichen bis Zeilen-Ende oder EOF entfernen
-/*?*/ // sal_Unicode cPeek = peekChar();
-/*?*/ // while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE )
-/*?*/ // {
-/*?*/ // getChar();
-/*?*/ // cPeek = peekChar();
-/*?*/ // }
-/*?*/ //
-/*?*/ // reType = TT_COMMENT;
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Echter Operator, kann hier einfach behandelt werden,
-/*?*/ // // da nicht der wirkliche Operator, wie z.B. += interessiert,
-/*?*/ // // sondern nur die Tatsache, dass es sich um einen handelt.
-/*?*/ // if( reType != TT_COMMENT )
-/*?*/ // {
-/*?*/ // reType = TT_OPERATOR;
-/*?*/ // }
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Objekt-Trenner? Muss vor Number abgehandelt werden
-/*?*/ // else if( c == '.' && ( peekChar() < '0' || peekChar() > '9' ) )
-/*?*/ // {
-/*?*/ // reType = TT_OPERATOR;
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Zahl?
-/*?*/ // else if( testCharFlags( c, CHAR_START_NUMBER ) == TRUE )
-/*?*/ // {
-/*?*/ // reType = TT_NUMBER;
-/*?*/ //
-/*?*/ // // Zahlensystem, 10 = normal, wird bei Oct/Hex geaendert
-/*?*/ // int nRadix = 10;
-/*?*/ //
-/*?*/ // // Ist es eine Hex- oder Oct-Zahl?
-/*?*/ // if( c == '&' )
-/*?*/ // {
-/*?*/ // // Octal?
-/*?*/ // if( peekChar() == 'o' || peekChar() == 'O' )
-/*?*/ // {
-/*?*/ // // o entfernen
-/*?*/ // getChar();
-/*?*/ // nRadix = 8; // Octal-Basis
-/*?*/ //
-/*?*/ // // Alle Ziffern einlesen
-/*?*/ // while( testCharFlags( peekChar(), CHAR_IN_OCT_NUMBER ) )
-/*?*/ // c = getChar();
-/*?*/ // }
-/*?*/ // // Hex?
-/*?*/ // else if( peekChar() == 'h' || peekChar() == 'H' )
-/*?*/ // {
-/*?*/ // // x entfernen
-/*?*/ // getChar();
-/*?*/ // nRadix = 16; // Hex-Basis
-/*?*/ //
-/*?*/ // // Alle Ziffern einlesen und puffern
-/*?*/ // while( testCharFlags( peekChar(), CHAR_IN_HEX_NUMBER ) )
-/*?*/ // c = getChar();
-/*?*/ // }
-/*?*/ // else
-/*?*/ // {
-/*?*/ // reType = TT_OPERATOR;
-/*?*/ // }
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Wenn nicht Oct oder Hex als double ansehen
-/*?*/ // if( reType == TT_NUMBER && nRadix == 10 )
-/*?*/ // {
-/*?*/ // // Flag, ob das letzte Zeichen ein Exponent war
-/*?*/ // BOOL bAfterExpChar = FALSE;
-/*?*/ //
-/*?*/ // // Alle Ziffern einlesen
-/*?*/ // while( testCharFlags( peekChar(), CHAR_IN_NUMBER ) ||
-/*?*/ // (bAfterExpChar && peekChar() == '+' ) ||
-/*?*/ // (bAfterExpChar && peekChar() == '-' ) )
-/*?*/ // // Nach Exponent auch +/- OK
-/*?*/ // {
-/*?*/ // c = getChar(); // Zeichen lesen
-/*?*/ // bAfterExpChar = ( c == 'e' || c == 'E' );
-/*?*/ // }
-/*?*/ // }
-/*?*/ //
-/*?*/ // // reType = TT_NUMBER;
-/*?*/ // }
-/*?*/ //
-/*?*/ // // String?
-/*?*/ // else if( testCharFlags( c, CHAR_START_STRING ) == TRUE )
-/*?*/ // {
-/*?*/ // // Merken, welches Zeichen den String eroeffnet hat
-/*?*/ // sal_Unicode cEndString = c;
-/*?*/ // if( c == '[' )
-/*?*/ // cEndString = ']';
-/*?*/ //
-/*?*/ // // Alle Ziffern einlesen und puffern
-/*?*/ // while( peekChar() != cEndString )
-/*?*/ // {
-/*?*/ // // #58846 EOF vor getChar() abfangen, damit EOF micht verloren geht
-/*?*/ // if( peekChar() == CHAR_EOF )
-/*?*/ // {
-/*?*/ // // ERROR: unterminated string literal
-/*?*/ // reType = TT_ERROR;
-/*?*/ // break;
-/*?*/ // }
-/*?*/ // c = getChar();
-/*?*/ // if( testCharFlags( c, CHAR_EOL ) == TRUE )
-/*?*/ // {
-/*?*/ // // ERROR: unterminated string literal
-/*?*/ // reType = TT_ERROR;
-/*?*/ // break;
-/*?*/ // }
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Zeichen lesen
-/*?*/ // if( reType != TT_ERROR )
-/*?*/ // {
-/*?*/ // getChar();
-/*?*/ // if( cEndString == ']' )
-/*?*/ // reType = TT_IDENTIFIER;
-/*?*/ // else
-/*?*/ // reType = TT_STRING;
-/*?*/ // }
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Zeilenende?
-/*?*/ // else if( testCharFlags( c, CHAR_EOL ) == TRUE )
-/*?*/ // {
-/*?*/ // // Falls ein weiteres anderes EOL-Char folgt, weg damit
-/*?*/ // sal_Unicode cNext = peekChar();
-/*?*/ // if( cNext != c && testCharFlags( cNext, CHAR_EOL ) == TRUE )
-/*?*/ // getChar();
-/*?*/ //
-/*?*/ // // Positions-Daten auf Zeilen-Beginn setzen
-/*?*/ // nCol = 0;
-/*?*/ // nLine++;
-/*?*/ //
-/*?*/ // reType = TT_EOL;
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Alles andere bleibt TT_UNKNOWN
-/*?*/ //
-/*?*/ //
-/*?*/ // // End-Position eintragen
-/*?*/ // rpEndPos = mpActualPos;
-/*?*/ // return TRUE;
-/*?*/ // }
-/*?*/ //
-/*?*/ // String SimpleTokenizer_Impl::getTokStr
-/*?*/ // ( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos )
-/*?*/ // {
-/*?*/ // return String( pStartPos, (USHORT)( pEndPos - pStartPos ) );
-/*?*/ // }
-/*?*/ //
-/*?*/ // #ifdef DBG_UTIL
-/*?*/ // // TEST: Token ausgeben
-/*?*/ // String SimpleTokenizer_Impl::getFullTokenStr( /*out*/TokenTypes eType,
-/*?*/ // /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos )
-/*?*/ // {
-/*?*/ // String aOut;
-/*?*/ // switch( eType )
-/*?*/ // {
-/*?*/ // case TT_UNKNOWN: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_UNKNOWN:") ); break;
-/*?*/ // case TT_IDENTIFIER: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_IDENTIFIER:") ); break;
-/*?*/ // case TT_WHITESPACE: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_WHITESPACE:") ); break;
-/*?*/ // case TT_NUMBER: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_NUMBER:") ); break;
-/*?*/ // case TT_STRING: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_STRING:") ); break;
-/*?*/ // case TT_EOL: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_EOL:") ); break;
-/*?*/ // case TT_COMMENT: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_COMMENT:") ); break;
-/*?*/ // case TT_ERROR: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_ERROR:") ); break;
-/*?*/ // case TT_OPERATOR: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_OPERATOR:") ); break;
-/*?*/ // case TT_KEYWORD: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_KEYWORD:") ); break;
-/*?*/ // }
-/*?*/ // if( eType != TT_EOL )
-/*?*/ // {
-/*?*/ // aOut += String( pStartPos, (USHORT)( pEndPos - pStartPos ) );
-/*?*/ // }
-/*?*/ // aOut += String( RTL_CONSTASCII_USTRINGPARAM("\n") );
-/*?*/ // return aOut;
-/*?*/ // }
-/*?*/ // #endif
-/*?*/ //
-/*?*/ // SimpleTokenizer_Impl::SimpleTokenizer_Impl( void )
-/*?*/ // {
-/*?*/ // memset( aCharTypeTab, 0, sizeof( aCharTypeTab ) );
-/*?*/ //
-/*?*/ // // Zeichen-Tabelle fuellen
-/*?*/ // USHORT i;
-/*?*/ //
-/*?*/ // // Zulaessige Zeichen fuer Identifier
-/*?*/ // USHORT nHelpMask = (USHORT)( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER );
-/*?*/ // for( i = 'a' ; i <= 'z' ; i++ )
-/*?*/ // aCharTypeTab[i] |= nHelpMask;
-/*?*/ // for( i = 'A' ; i <= 'Z' ; i++ )
-/*?*/ // aCharTypeTab[i] |= nHelpMask;
-/*?*/ // // '_' extra eintragen
-/*?*/ // aCharTypeTab[(int)'_'] |= nHelpMask;
-/*?*/ // // AB 23.6.97: '$' ist auch erlaubt
-/*?*/ // aCharTypeTab[(int)'$'] |= nHelpMask;
-/*?*/ //
-/*?*/ // // Ziffern (Identifier und Number ist moeglich)
-/*?*/ // nHelpMask = (USHORT)( CHAR_IN_IDENTIFIER | CHAR_START_NUMBER |
-/*?*/ // CHAR_IN_NUMBER | CHAR_IN_HEX_NUMBER );
-/*?*/ // for( i = '0' ; i <= '9' ; i++ )
-/*?*/ // aCharTypeTab[i] |= nHelpMask;
-/*?*/ //
-/*?*/ // // e und E sowie . von Hand ergaenzen
-/*?*/ // aCharTypeTab[(int)'e'] |= CHAR_IN_NUMBER;
-/*?*/ // aCharTypeTab[(int)'E'] |= CHAR_IN_NUMBER;
-/*?*/ // aCharTypeTab[(int)'.'] |= (USHORT)( CHAR_IN_NUMBER | CHAR_START_NUMBER );
-/*?*/ // aCharTypeTab[(int)'&'] |= CHAR_START_NUMBER;
-/*?*/ //
-/*?*/ // // Hex-Ziffern
-/*?*/ // for( i = 'a' ; i <= 'f' ; i++ )
-/*?*/ // aCharTypeTab[i] |= CHAR_IN_HEX_NUMBER;
-/*?*/ // for( i = 'A' ; i <= 'F' ; i++ )
-/*?*/ // aCharTypeTab[i] |= CHAR_IN_HEX_NUMBER;
-/*?*/ //
-/*?*/ // // Oct-Ziffern
-/*?*/ // for( i = '0' ; i <= '7' ; i++ )
-/*?*/ // aCharTypeTab[i] |= CHAR_IN_OCT_NUMBER;
-/*?*/ //
-/*?*/ // // String-Beginn/End-Zeichen
-/*?*/ // aCharTypeTab[(int)'\''] |= CHAR_START_STRING;
-/*?*/ // aCharTypeTab[(int)'\"'] |= CHAR_START_STRING;
-/*?*/ // aCharTypeTab[(int)'['] |= CHAR_START_STRING;
-/*?*/ //
-/*?*/ // // Operator-Zeichen
-/*?*/ // aCharTypeTab[(int)'!'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'%'] |= CHAR_OPERATOR;
-/*?*/ // // aCharTypeTab[(int)'&'] |= CHAR_OPERATOR; Removed because of #i14140
-/*?*/ // aCharTypeTab[(int)'('] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)')'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'*'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'+'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)','] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'-'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'/'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)':'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'<'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'='] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'>'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'?'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'^'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'|'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'~'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'{'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)'}'] |= CHAR_OPERATOR;
-/*?*/ // // aCharTypeTab[(int)'['] |= CHAR_OPERATOR; Removed because of #i17826
-/*?*/ // aCharTypeTab[(int)']'] |= CHAR_OPERATOR;
-/*?*/ // aCharTypeTab[(int)';'] |= CHAR_OPERATOR;
-/*?*/ //
-/*?*/ // // Space
-/*?*/ // aCharTypeTab[(int)' ' ] |= CHAR_SPACE;
-/*?*/ // aCharTypeTab[(int)'\t'] |= CHAR_SPACE;
-/*?*/ //
-/*?*/ // // Zeilen-Ende-Zeichen
-/*?*/ // aCharTypeTab[(int)'\r'] |= CHAR_EOL;
-/*?*/ // aCharTypeTab[(int)'\n'] |= CHAR_EOL;
-/*?*/ //
-/*?*/ // ppListKeyWords = NULL;
-/*?*/ // }
-/*?*/ //
-/*?*/ // SimpleTokenizer_Impl::~SimpleTokenizer_Impl( void )
-/*?*/ // {
-/*?*/ // }
-/*?*/ //
-/*?*/ // SimpleTokenizer_Impl* getSimpleTokenizer( void )
-/*?*/ // {
-/*?*/ // static SimpleTokenizer_Impl* pSimpleTokenizer = NULL;
-/*?*/ // if( !pSimpleTokenizer )
-/*?*/ // pSimpleTokenizer = new SimpleTokenizer_Impl();
-/*?*/ // return pSimpleTokenizer;
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Heraussuchen der jeweils naechsten Funktion aus einem JavaScript-Modul
-/*?*/ // UINT16 SimpleTokenizer_Impl::parseLine( UINT32 nParseLine, const String* aSource )
-/*?*/ // {
-/*?*/ // // Position auf den Anfang des Source-Strings setzen
-/*?*/ // mpStringBegin = mpActualPos = aSource->GetBuffer();
-/*?*/ //
-/*?*/ // // Zeile und Spalte initialisieren
-/*?*/ // nLine = nParseLine;
-/*?*/ // nCol = 0L;
-/*?*/ //
-/*?*/ // // Variablen fuer die Out-Parameter
-/*?*/ // TokenTypes eType;
-/*?*/ // const sal_Unicode* pStartPos;
-/*?*/ // const sal_Unicode* pEndPos;
-/*?*/ //
-/*?*/ // // Schleife ueber alle Tokens
-/*?*/ // UINT16 nTokenCount = 0;
-/*?*/ // while( getNextToken( eType, pStartPos, pEndPos ) )
-/*?*/ // nTokenCount++;
-/*?*/ //
-/*?*/ // return nTokenCount;
-/*?*/ // }
-/*?*/ //
-/*?*/ // void SimpleTokenizer_Impl::getHighlightPortions( UINT32 nParseLine, const String& rLine,
-/*?*/ // /*out*/HighlightPortions& portions )
-/*?*/ // {
-/*?*/ // // Position auf den Anfang des Source-Strings setzen
-/*?*/ // mpStringBegin = mpActualPos = rLine.GetBuffer();
-/*?*/ //
-/*?*/ // // Zeile und Spalte initialisieren
-/*?*/ // nLine = nParseLine;
-/*?*/ // nCol = 0L;
-/*?*/ //
-/*?*/ // // Variablen fuer die Out-Parameter
-/*?*/ // TokenTypes eType;
-/*?*/ // const sal_Unicode* pStartPos;
-/*?*/ // const sal_Unicode* pEndPos;
-/*?*/ //
-/*?*/ // // Schleife ueber alle Tokens
-/*?*/ // while( getNextToken( eType, pStartPos, pEndPos ) )
-/*?*/ // {
-/*?*/ // HighlightPortion portion;
-/*?*/ //
-/*?*/ // portion.nBegin = (UINT16)(pStartPos - mpStringBegin);
-/*?*/ // portion.nEnd = (UINT16)(pEndPos - mpStringBegin);
-/*?*/ // portion.tokenType = eType;
-/*?*/ //
-/*?*/ // portions.Insert(portion, portions.Count());
-/*?*/ // }
-/*?*/ // }
-
-
-/*?*/ // //////////////////////////////////////////////////////////////////////////
-/*?*/ // // Implementierung des SyntaxHighlighter
-/*?*/ //
-/*?*/ // SyntaxHighlighter::SyntaxHighlighter()
-/*?*/ // {
-/*?*/ // m_pSimpleTokenizer = new SimpleTokenizer_Impl();
-/*?*/ // m_pKeyWords = NULL;
-/*?*/ // m_nKeyWordCount = 0;
-/*?*/ // }
-/*?*/ //
-/*?*/ // SyntaxHighlighter::~SyntaxHighlighter()
-/*?*/ // {
-/*?*/ // delete(m_pSimpleTokenizer);
-/*?*/ // delete(m_pKeyWords);
-/*?*/ // }
-/*?*/ //
-/*?*/ // void SyntaxHighlighter::initialize( HighlighterLanguage eLanguage_ )
-/*?*/ // {
-/*?*/ // eLanguage = eLanguage_;
-/*?*/ // delete(m_pSimpleTokenizer);
-/*?*/ // m_pSimpleTokenizer = new SimpleTokenizer_Impl();
-/*?*/ //
-/*?*/ // if (eLanguage == HIGHLIGHT_BASIC)
-/*?*/ // {
-/*?*/ // m_pSimpleTokenizer->setKeyWords( strListBasicKeyWords,
-/*?*/ // sizeof( strListBasicKeyWords ) / sizeof( char* ));
-/*?*/ // }
-/*?*/ // else
-/*?*/ // {
-/*?*/ // m_pSimpleTokenizer->setKeyWords( NULL, 0 );
-/*?*/ // }
-/*?*/ // }
-/*?*/ //
-/*?*/ // const Range SyntaxHighlighter::notifyChange( UINT32 nLine, INT32 nLineCountDifference,
-/*?*/ // const String* pChangedLines, UINT32 nArrayLength)
-/*?*/ // {
-/*?*/ // (void)nLineCountDifference;
-/*?*/ //
-/*?*/ // for( UINT32 i=0 ; i < nArrayLength ; i++ )
-/*?*/ // m_pSimpleTokenizer->parseLine(nLine+i, &pChangedLines[i]);
-/*?*/ //
-/*?*/ // return Range( nLine, nLine + nArrayLength-1 );
-/*?*/ // }
-/*?*/ //
-/*?*/ // void SyntaxHighlighter::getHighlightPortions( UINT32 nLine, const String& rLine,
-/*?*/ // /*out*/HighlightPortions& portions )
-/*?*/ // {
-/*?*/ // m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions );
-/*?*/ // }
-
-
/////////////////////////////////////////////////////////////////////////
// Implementation SbJScriptModule (Basic-Modul fuer JavaScript-Sourcen)
SbJScriptModule::SbJScriptModule( const String& rName )
@@ -1250,7 +646,6 @@ BOOL SbJScriptModule::LoadData( SvStream& rStrm, USHORT nVer )
String aTmp;
rStrm.ReadByteString( aTmp, gsl_getSystemTextEncoding() );
aOUSource = aTmp;
- //rStrm >> aSource;
return TRUE;
}
@@ -1262,7 +657,6 @@ BOOL SbJScriptModule::StoreData( SvStream& rStrm ) const
// Source-String schreiben
String aTmp = aOUSource;
rStrm.WriteByteString( aTmp, gsl_getSystemTextEncoding() );
- //rStrm << aSource;
return TRUE;
}
@@ -1338,35 +732,6 @@ SbxInfo* SbMethod::GetInfo()
ErrCode SbMethod::Call( SbxValue* /*pRet*/ )
{
DBG_ERROR( "SbMethod::Call: dead code!" );
-/*?*/ // // RefCount vom Modul hochzaehlen
-/*?*/ // SbModule* pMod_ = (SbModule*)GetParent();
-/*?*/ // pMod_->AddRef();
-/*?*/ //
-/*?*/ // // RefCount vom Basic hochzaehlen
-/*?*/ // StarBASIC* pBasic = (StarBASIC*)pMod_->GetParent();
-/*?*/ // pBasic->AddRef();
-/*?*/ //
-/*?*/ // // Values anlegen, um Return-Wert zu erhalten
-/*?*/ // SbxValues aVals;
-/*?*/ // aVals.eType = SbxVARIANT;
-/*?*/ //
-/*?*/ // // #104083: Compile BEFORE get
-/*?*/ // if( bInvalid && !pMod_->Compile() )
-/*?*/ // StarBASIC::Error( SbERR_BAD_PROP_VALUE );
-/*?*/ //
-/*?*/ // Get( aVals );
-/*?*/ // if ( pRet )
-/*?*/ // pRet->Put( aVals );
-/*?*/ //
-/*?*/ // // Gab es einen Error
-/*?*/ // ErrCode nErr = SbxBase::GetError();
-/*?*/ // SbxBase::ResetError();
-/*?*/ //
-/*?*/ // // Objekte freigeben
-/*?*/ // pMod_->ReleaseRef();
-/*?*/ // pBasic->ReleaseRef();
-/*?*/ //
-/*?*/ // return nErr;
return SbERR_NO_METHOD;
}
diff --git a/binfilter/bf_basic/source/comp/buffer.cxx b/binfilter/bf_basic/source/comp/buffer.cxx
index 7a2a65c..5a71c94 100644
--- a/binfilter/bf_basic/source/comp/buffer.cxx
+++ b/binfilter/bf_basic/source/comp/buffer.cxx
@@ -82,7 +82,6 @@ BOOL SbiBuffer::Check( USHORT n )
else p = new char [nSize + nn];
if( !p )
{
-/*?*/ // pParser->Error( SbERR_PROG_TOO_LARGE );
nInc = 0;
delete[] pBuf; pBuf = NULL;
return FALSE;
diff --git a/binfilter/bf_basic/source/comp/parser.cxx b/binfilter/bf_basic/source/comp/parser.cxx
index e68ad64..9841c02 100644
--- a/binfilter/bf_basic/source/comp/parser.cxx
+++ b/binfilter/bf_basic/source/comp/parser.cxx
@@ -522,7 +522,7 @@ void SbiParser::Symbol()
SbiExpression aExpr( this );
aExpr.Gen();
SbiOpcode eOp = _PUT;
- // SbiSymDef* pDef = aVar.GetRealVar();
+
if( pDef )
{
if( pDef->GetConstDef() )
@@ -585,7 +585,6 @@ void SbiParser::Set()
TypeDecl( *pTypeDef, TRUE );
aLvalue.Gen();
- // aGen.Gen( _CLASS, pDef->GetTypeId() | 0x8000 );
aGen.Gen( _CREATE, pDef->GetId(), pTypeDef->GetTypeId() );
aGen.Gen( _SETCLASS, pDef->GetTypeId() );
}
@@ -609,10 +608,9 @@ void SbiParser::Set()
aGen.Gen( _SET );
}
}
- // aGen.Gen( _SET );
}
-// JSM 07.10.95
+
void SbiParser::LSet()
{
SbiExpression aLvalue( this, SbLVALUE );
@@ -628,7 +626,7 @@ void SbiParser::LSet()
aGen.Gen( _LSET );
}
-// JSM 07.10.95
+
void SbiParser::RSet()
{
SbiExpression aLvalue( this, SbLVALUE );
@@ -663,7 +661,6 @@ void SbiParser::DefXXX()
else
{
ch2 = aSym.ToUpperAscii().GetBuffer()[0];
- //ch2 = aSym.Upper();
if( ch2 < ch1 ) Error( SbERR_SYNTAX ), ch2 = 0;
}
}
@@ -809,7 +806,6 @@ void SbiParser::ErrorStmnt()
}
-// AB 22.5.1996
// JavaScript-Parsing zunaechst provisorisch hier implementiert
void SbiParser::OpenJavaBlock( SbiToken, SbiExprNode* )
{
diff --git a/binfilter/bf_basic/source/comp/sbcomp.cxx b/binfilter/bf_basic/source/comp/sbcomp.cxx
index f4beb81..544f2de 100644
--- a/binfilter/bf_basic/source/comp/sbcomp.cxx
+++ b/binfilter/bf_basic/source/comp/sbcomp.cxx
@@ -30,8 +30,6 @@
#include "image.hxx"
-// For debugging only
-// #define DBG_SAVE_DISASSEMBLY
#include <comphelper/processfactory.hxx>
diff --git a/binfilter/bf_basic/source/comp/scanner.cxx b/binfilter/bf_basic/source/comp/scanner.cxx
index 069c22b..2e71fa9 100644
--- a/binfilter/bf_basic/source/comp/scanner.cxx
+++ b/binfilter/bf_basic/source/comp/scanner.cxx
@@ -73,18 +73,7 @@ SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf
SbiScanner::~SbiScanner()
{}
-/*?*/ // void SbiScanner::LockColumn()
-/*?*/ // {
-/*?*/ // if( !nColLock++ )
-/*?*/ // nSavedCol1 = nCol1;
-/*?*/ // }
-/*?*/ //
-/*?*/ // void SbiScanner::UnlockColumn()
-/*?*/ // {
-/*?*/ // if( nColLock )
-/*?*/ // nColLock--;
-/*?*/ // }
-/*?*/ //
+
void SbiScanner::GenError( SbError code )
{
if( GetSbData()->bBlockCompilerError )
@@ -245,7 +234,7 @@ BOOL SbiScanner::NextSym()
BOOL bBufOverflow = FALSE;
while( strchr( "0123456789.DEde", *pLine ) && *pLine )
{
- // AB 4.1.1996: Buffer voll? -> leer weiter scannen
+ // Buffer full? Stop scanning
if( (p-buf) == (BUF_SIZE-1) )
{
bBufOverflow = TRUE;
@@ -267,8 +256,6 @@ BOOL SbiScanner::NextSym()
{
pLine++; nCol++; continue;
}
-// if( toupper( *pLine ) == 'D' )
-// eScanType = SbxDOUBLE;
*p++ = 'E'; pLine++; nCol++;
// Vorzeichen hinter Exponent?
if( *pLine == '+' )
@@ -306,12 +293,6 @@ BOOL SbiScanner::NextSym()
}
if( bBufOverflow )
GenError( SbERR_MATH_OVERFLOW );
- // zu viele Zahlen fuer SINGLE?
-// if (ndig > 15 || ncdig > 6)
-// eScanType = SbxDOUBLE;
-// else
-// if( nVal > SbxMAXSNG || nVal < SbxMINSNG )
-// eScanType = SbxDOUBLE;
// Typkennung?
SbxDataType t = GetSuffixType( *pLine );
@@ -330,7 +311,6 @@ BOOL SbiScanner::NextSym()
sal_Unicode cmp1[] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F', 0 };
sal_Unicode cmp2[] = { '0', '1', '2', '3', '4', '5', '6', '7', 0 };
sal_Unicode *cmp = cmp1;
- //char *cmp = "0123456789ABCDEF";
sal_Unicode base = 16;
sal_Unicode ndig = 8;
sal_Unicode xch = *pLine++ & 0xFF; nCol++;
@@ -338,7 +318,6 @@ BOOL SbiScanner::NextSym()
{
case 'O':
cmp = cmp2; base = 8; ndig = 11; break;
- //cmp = "01234567"; base = 8; ndig = 11; break;
case 'H':
break;
default :
@@ -354,11 +333,11 @@ BOOL SbiScanner::NextSym()
sal_Unicode ch = sal::static_int_cast< sal_Unicode >(
toupper( *pLine & 0xFF ) );
pLine++; nCol++;
- // AB 4.1.1996: Buffer voll, leer weiter scannen
+
+ // If buffer full, stop scanning.
if( (p-buf) == (BUF_SIZE-1) )
bBufOverflow = TRUE;
else if( String( cmp ).Search( ch ) != STRING_NOTFOUND )
- //else if( strchr( cmp, ch ) )
*p++ = ch;
else
{
diff --git a/binfilter/bf_basic/source/comp/token.cxx b/binfilter/bf_basic/source/comp/token.cxx
index f26f2b7..d4ab2de 100644
--- a/binfilter/bf_basic/source/comp/token.cxx
+++ b/binfilter/bf_basic/source/comp/token.cxx
@@ -358,8 +358,6 @@ SbiTokenizer::SbiTokenizer( const ::rtl::OUString& rSrc, StarBASIC* pb )
: SbiScanner( rSrc, pb )
{
pTokTable = aTokTable_Basic;
- //if( StarBASIC::GetGlobalLanguageMode() == SB_LANG_JAVASCRIPT )
- // pTokTable = aTokTable_Java;
TokenTable *tp;
bEof = bAs = FALSE;
eCurTok = NIL;
diff --git a/binfilter/bf_basic/source/runtime/basrdll.cxx b/binfilter/bf_basic/source/runtime/basrdll.cxx
index a2efc14..c2f6d8f 100644
--- a/binfilter/bf_basic/source/runtime/basrdll.cxx
+++ b/binfilter/bf_basic/source/runtime/basrdll.cxx
@@ -30,63 +30,17 @@
namespace binfilter {
-/*?*/ // BasicResId::BasicResId( USHORT nId ):
-/*?*/ // ResId( nId, (*(BasicDLL**)GetAppData(SHL_BASIC))->GetResMgr() )
-/*?*/ // {
-/*?*/ // }
BasicDLL::BasicDLL()
{
-/*?*/ // *(BasicDLL**)GetAppData(SHL_BASIC) = this;
-/*?*/ // ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
-/*?*/ // pResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(ofa), aLocale );
bDebugMode = FALSE;
bBreakEnabled = TRUE;
}
BasicDLL::~BasicDLL()
{
-/*?*/ // delete pResMgr;
}
-/*?*/ // void BasicDLL::EnableBreak( BOOL bEnable )
-/*?*/ // {
-/*?*/ // BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC);
-/*?*/ // DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
-/*?*/ // if ( pThis )
-/*?*/ // pThis->bBreakEnabled = bEnable;
-/*?*/ // }
-/*?*/ //
-/*?*/ // void BasicDLL::SetDebugMode( BOOL bDebugMode )
-/*?*/ // {
-/*?*/ // BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC);
-/*?*/ // DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
-/*?*/ // if ( pThis )
-/*?*/ // pThis->bDebugMode = bDebugMode;
-/*?*/ // }
-/*?*/ //
-/*?*/ //
-/*?*/ // void BasicDLL::BasicBreak()
-/*?*/ // {
-/*?*/ // //bJustStopping: Wenn jemand wie wild x-mal STOP drueckt, aber das Basic
-/*?*/ // // nicht schnell genug anhaelt, kommt die Box ggf. oefters...
-/*?*/ // static BOOL bJustStopping = FALSE;
-/*?*/ //
-/*?*/ // BasicDLL* pThis = *(BasicDLL**)GetAppData(SHL_BASIC);
-/*?*/ // DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
-/*?*/ // if ( pThis )
-/*?*/ // {
-/*?*/ // if ( StarBASIC::IsRunning() && !bJustStopping && ( pThis->bBreakEnabled || pThis->bDebugMode ) )
-/*?*/ // {
-/*?*/ // bJustStopping = TRUE;
-/*?*/ // StarBASIC::Stop();
-/*?*/ // String aMessageStr( BasicResId( IDS_SBERR_TERMINATED ) );
-/*?*/ // InfoBox( 0, aMessageStr ).Execute();
-/*?*/ // bJustStopping = FALSE;
-/*?*/ // }
-/*?*/ // }
-/*?*/ // }
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_basic/source/sbx/sbxarray.cxx b/binfilter/bf_basic/source/sbx/sbxarray.cxx
index 7430133..84d57e1 100644
--- a/binfilter/bf_basic/source/sbx/sbxarray.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxarray.cxx
@@ -314,7 +314,6 @@ void SbxArray::Remove( SbxVariable* pVar )
for( UINT32 i = 0; i < pData->size(); i++ )
{
SbxVariableRef* pRef = (*pData)[i];
- // SbxVariableRef* pRef = pData->GetObject( i );
if( *pRef == pVar )
{
Remove32( i ); break;
@@ -381,7 +380,7 @@ SbxVariable* SbxArray::FindUserData( UINT32 nData )
{
p = pVar;
p->ResetFlag( SBX_EXTFOUND );
- break; // JSM 06.10.95
+ break;
}
// Haben wir ein Array/Objekt mit Extended Search?
else if( pVar->IsSet( SBX_EXTSEARCH ) )
diff --git a/binfilter/bf_basic/source/sbx/sbxcurr.cxx b/binfilter/bf_basic/source/sbx/sbxcurr.cxx
index 5e27349..ab73697 100644
--- a/binfilter/bf_basic/source/sbx/sbxcurr.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxcurr.cxx
@@ -324,7 +324,6 @@ static String ImpCurrencyToString( const SbxINT64 &r )
{
BigInt a10000 = 10000;
- //return GetpApp()->GetAppInternational().GetCurr( BigInt( r ), 4 );
BigInt aInt( SbxINT64Converter::SbxINT64_2_BigInt( r ) );
aInt.Abs();
BigInt aFrac = aInt;
diff --git a/binfilter/bf_basic/source/sbx/sbxdec.cxx b/binfilter/bf_basic/source/sbx/sbxdec.cxx
index ff74d66..94399a2 100644
--- a/binfilter/bf_basic/source/sbx/sbxdec.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxdec.cxx
@@ -36,12 +36,10 @@
namespace binfilter {
#ifdef WIN32
-// int GnDecCounter = 0;
SbxDecimal::SbxDecimal( void )
{
setInt( 0 );
mnRefCount = 0;
- // GnDecCounter++;
}
#endif
@@ -53,13 +51,9 @@ SbxDecimal::SbxDecimal( const SbxDecimal& rDec )
(void)rDec;
#endif
mnRefCount = 0;
- // GnDecCounter++;
}
-SbxDecimal::~SbxDecimal()
-{
- // GnDecCounter--;
-}
+SbxDecimal::~SbxDecimal() { }
void releaseDecimalPtr( SbxDecimal*& rpDecimal )
{
@@ -571,8 +565,6 @@ start:
if( pDec != p->pDecimal )
{
releaseDecimalPtr( p->pDecimal );
- // if( p->pDecimal )
- // p->pDecimal->ReleaseRef();
p->pDecimal = pDec;
if( pDec )
pDec->addRef();
@@ -614,7 +606,6 @@ start:
case SbxBYREF | SbxSTRING:
if( !p->pString )
p->pString = new XubString;
- // ImpCvtNum( (double) n, 0, *p->pString );
pDec->getString( *p->pString );
break;
case SbxOBJECT:
@@ -649,7 +640,6 @@ start:
*p->pInteger = 0;
}
break;
- // *p->pInteger = n; break;
case SbxBYREF | SbxERROR:
case SbxBYREF | SbxUSHORT:
if( !pDec->getUShort( *p->pUShort ) )
@@ -697,7 +687,6 @@ start:
*p->pSingle = 0;
}
break;
- // *p->pSingle = (float) n; break;
case SbxBYREF | SbxDATE:
case SbxBYREF | SbxDOUBLE:
if( !pDec->getDouble( *p->pDouble ) )
diff --git a/binfilter/bf_basic/source/sbx/sbxexec.cxx b/binfilter/bf_basic/source/sbx/sbxexec.cxx
index 679495e..442b2ca 100644
--- a/binfilter/bf_basic/source/sbx/sbxexec.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxexec.cxx
@@ -252,47 +252,6 @@ static SbxVariable* PlusMinus( SbxObject* pObj, SbxObject* pGbl, const xub_Unico
return refVar;
}
-/*?*/ // static SbxVariable* Assign( SbxObject* pObj, SbxObject* pGbl, const xub_Unicode** ppBuf )
-/*?*/ // {
-/*?*/ // const xub_Unicode* p = *ppBuf;
-/*?*/ // SbxVariableRef refVar( Operand( pObj, pGbl, &p, TRUE ) );
-/*?*/ // p = SkipWhitespace( p );
-/*?*/ // if( refVar.Is() )
-/*?*/ // {
-/*?*/ // if( *p == '=' )
-/*?*/ // {
-/*?*/ // // Nur auf Props zuweisen!
-/*?*/ // if( refVar->GetClass() != SbxCLASS_PROPERTY )
-/*?*/ // {
-/*?*/ // SbxBase::SetError( SbxERR_BAD_ACTION );
-/*?*/ // refVar.Clear();
-/*?*/ // }
-/*?*/ // else
-/*?*/ // {
-/*?*/ // p++;
-/*?*/ // SbxVariableRef refVar2( PlusMinus( pObj, pGbl, &p ) );
-/*?*/ // if( refVar2.Is() )
-/*?*/ // {
-/*?*/ // SbxVariable* pVar = refVar;
-/*?*/ // SbxVariable* pVar2 = refVar2;
-/*?*/ // *pVar = *pVar2;
-/*?*/ // pVar->SetParameters( NULL );
-/*?*/ // }
-/*?*/ // }
-/*?*/ // }
-/*?*/ // else
-/*?*/ // // Einfacher Aufruf: einmal aktivieren
-/*?*/ // refVar->Broadcast( SBX_HINT_DATAWANTED );
-/*?*/ // }
-/*?*/ // *ppBuf = p;
-/*?*/ // if( refVar.Is() )
-/*?*/ // refVar->AddRef();
-/*?*/ // return refVar;
-/*?*/ // }
-/*?*/ //
-/*?*/ // // Einlesen eines Elements. Dies ist ein Symbol, optional gefolgt
-/*?*/ // // von einer Parameterliste. Das Symbol wird im angegebenen Objekt
-/*?*/ // // gesucht und die Parameterliste wird ggf. angefuegt.
static SbxVariable* Element
( SbxObject* pObj, SbxObject* pGbl, const xub_Unicode** ppBuf,
@@ -356,33 +315,7 @@ static SbxVariable* Element
return refVar;
}
-/*?*/ // // Hauptroutine
-/*?*/ //
-/*?*/ // SbxVariable* SbxObject::Execute( const XubString& rTxt )
-/*?*/ // {
-/*?*/ // SbxVariable* pVar = NULL;
-/*?*/ // const xub_Unicode* p = rTxt.GetBuffer();
-/*?*/ // for( ;; )
-/*?*/ // {
-/*?*/ // p = SkipWhitespace( p );
-/*?*/ // if( !*p )
-/*?*/ // break;
-/*?*/ // if( *p++ != '[' )
-/*?*/ // {
-/*?*/ // SetError( SbxERR_SYNTAX ); break;
-/*?*/ // }
-/*?*/ // pVar = Assign( this, this, &p );
-/*?*/ // if( !pVar )
-/*?*/ // break;
-/*?*/ // p = SkipWhitespace( p );
-/*?*/ // if( *p++ != ']' )
-/*?*/ // {
-/*?*/ // SetError( SbxERR_SYNTAX ); break;
-/*?*/ // }
-/*?*/ // }
-/*?*/ // return pVar;
-/*?*/ // }
-/*?*/ //
+
SbxVariable* SbxObject::FindQualified( const XubString& rName, SbxClassType t )
{
SbxVariable* pVar = NULL;
diff --git a/binfilter/bf_basic/source/sbx/sbxvalue.cxx b/binfilter/bf_basic/source/sbx/sbxvalue.cxx
index 5c88a12..58c247f 100644
--- a/binfilter/bf_basic/source/sbx/sbxvalue.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxvalue.cxx
@@ -1074,8 +1074,6 @@ BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
|| GetType() == SbxCURRENCY
|| GetType() == SbxULONG )
aL.eType = aR.eType = GetType();
-// else if( GetType() == SbxDouble || GetType() == SbxSingle )
-// aL.eType = aR.eType = SbxLONG64;
else
aL.eType = aR.eType = SbxLONG;
}
@@ -1083,9 +1081,6 @@ BOOL SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
|| GetType() == SbxULONG64 || eOpType == SbxULONG64
|| GetType() == SbxLONG64 || eOpType == SbxLONG64 )
aL.eType = aR.eType = SbxLONG64;
-// else if( GetType() == SbxDouble || rOP.GetType() == SbxDouble
-// || GetType() == SbxSingle || rOP.GetType() == SbxSingle )
-// aL.eType = aR.eType = SbxLONG64;
else
aL.eType = aR.eType = SbxLONG;
diff --git a/binfilter/bf_basic/source/sbx/sbxvar.cxx b/binfilter/bf_basic/source/sbx/sbxvar.cxx
index 43c431b..190b309 100644
--- a/binfilter/bf_basic/source/sbx/sbxvar.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxvar.cxx
@@ -462,8 +462,6 @@ BOOL SbxVariable::StoreData( SvStream& rStrm ) const
bValStore = SbxValue::StoreData( rStrm );
if( !bValStore )
return FALSE;
- // if( !SbxValue::StoreData( rStrm ) )
- // return FALSE;
rStrm.WriteByteString( maName, RTL_TEXTENCODING_ASCII_US );
rStrm << nUserData;
if( pInfo.Is() )
More information about the Libreoffice-commits
mailing list