summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-11-03 14:11:10 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-11-03 14:11:10 +0000
commit8ba505c68c81048005e3b995c26cba4c66e31eb3 (patch)
tree581a439ddb3aa2adb7ccb24c3c99fa21d28a95df /basic
parenta322ecc76f2ee69bb1e9a7a1f553f2ddde4332e4 (diff)
#100000# get rid of warnings
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbxmod.cxx12
-rw-r--r--basic/source/comp/buffer.cxx14
-rw-r--r--basic/source/comp/codegen.cxx29
-rw-r--r--basic/source/comp/symtbl.cxx20
-rw-r--r--basic/source/inc/symtbl.hxx8
-rw-r--r--basic/source/runtime/step1.cxx28
-rw-r--r--basic/source/runtime/step2.cxx52
7 files changed, 84 insertions, 79 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index fd985f63999a..52e5796ad238 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sbxmod.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: vg $ $Date: 2006-11-01 16:13:15 $
+ * last change: $Author: vg $ $Date: 2006-11-03 15:10:25 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1013,7 +1013,7 @@ const BYTE* SbModule::FindNextStmnt( const BYTE* p, USHORT& nLine, USHORT& nCol,
nl |= *p++ << 16 ; nl |= *p++ << 24;
nc = *p++; nc |= *p++ << 8;
nc |= *p++ << 16 ; nc |= *p++ << 24;
- nLine = nl; nCol = nc;
+ nLine = (USHORT)nl; nCol = (USHORT)nc;
return p;
}
else if( eOp >= SbOP2_START && eOp <= SbOP2_END )
@@ -1133,14 +1133,14 @@ SbModule::fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg ) const
pImg = pImage;
for( UINT32 i = 0; i < pMethods->Count(); i++ )
{
- SbMethod* pMeth = PTR_CAST(SbMethod,pMethods->Get( i ) );
+ SbMethod* pMeth = PTR_CAST(SbMethod,pMethods->Get( (USHORT)i ) );
if( pMeth )
{
//fixup method start positions
if ( bCvtToLegacy )
pMeth->nStart = pImg->CalcLegacyOffset( pMeth->nStart );
else
- pMeth->nStart = pImg->CalcNewOffset( pMeth->nStart );
+ pMeth->nStart = pImg->CalcNewOffset( (USHORT)pMeth->nStart );
}
}
@@ -1951,7 +1951,7 @@ BOOL SbMethod::LoadData( SvStream& rStrm, USHORT nVer )
return FALSE;
INT16 n;
rStrm >> n;
- INT16 nTempStart = nStart;
+ INT16 nTempStart = (INT16)nStart;
// nDebugFlags = n; // AB 16.1.96: Nicht mehr uebernehmen
if( nVer == 2 )
rStrm >> nLine1 >> nLine2 >> nTempStart >> bInvalid;
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index f713d85ef27b..5fa05a523a0e 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: buffer.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: vg $ $Date: 2006-11-01 16:13:28 $
+ * last change: $Author: vg $ $Date: 2006-11-03 15:11:10 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -117,7 +117,7 @@ void SbiBuffer::Align( INT32 n )
if( nn <= UP_LIMIT )
{
nn = nn - nOff;
- if( Check( nn ) )
+ if( Check( static_cast<USHORT>(nn) ) )
{
memset( pCur, 0, nn );
pCur += nn;
@@ -133,8 +133,8 @@ void SbiBuffer::Patch( UINT32 off, UINT32 val )
{
if( ( off + sizeof( UINT32 ) ) < nOff )
{
- UINT16 val1 = ( val & 0xFFFF );
- UINT16 val2 = ( val >> 16 );
+ UINT16 val1 = static_cast<UINT16>( val & 0xFFFF );
+ UINT16 val2 = static_cast<UINT16>( val >> 16 );
BYTE* p = (BYTE*) pBuf + off;
*p++ = (char) ( val1 & 0xFF );
*p++ = (char) ( val1 >> 8 );
@@ -214,8 +214,8 @@ BOOL SbiBuffer::operator +=( UINT32 n )
{
if( Check( 4 ) )
{
- UINT16 n1 = ( n & 0xFFFF );
- UINT16 n2 = ( n >> 16 );
+ UINT16 n1 = static_cast<UINT16>( n & 0xFFFF );
+ UINT16 n2 = static_cast<UINT16>( n >> 16 );
if ( operator +=( n1 ) && operator +=( n2 ) )
return TRUE;
return TRUE;
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index 9281ea5f5ae2..60cb994ab876 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: codegen.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: vg $ $Date: 2006-11-01 16:13:40 $
+ * last change: $Author: vg $ $Date: 2006-11-03 15:11:02 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -345,14 +345,19 @@ template < class T >
class PCodeVisitor
{
public:
- virtual void start( BYTE* pStart ) = 0;
- virtual void processOpCode0( SbiOpcode eOp ) = 0;
- virtual void processOpCode1( SbiOpcode eOp, T nOp1 ) = 0;
- virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 ) = 0;
- virtual bool processParams() = 0;
- virtual void end() = 0;
+ virtual ~PCodeVisitor();
+
+ virtual void start( BYTE* pStart ) = 0;
+ virtual void processOpCode0( SbiOpcode eOp ) = 0;
+ virtual void processOpCode1( SbiOpcode eOp, T nOp1 ) = 0;
+ virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 ) = 0;
+ virtual bool processParams() = 0;
+ virtual void end() = 0;
};
+template <class T> PCodeVisitor< T >::~PCodeVisitor()
+{}
+
template <class T>
class PCodeBufferWalker
{
@@ -464,11 +469,11 @@ public:
case _RETURN:
case _ERRHDL:
case _TESTFOR:
- nOp1 = convertBufferOffSet(m_pStart, nOp1);
+ nOp1 = static_cast<T>( convertBufferOffSet(m_pStart, nOp1) );
break;
case _RESUME:
if ( nOp1 > 1 )
- nOp1 = convertBufferOffSet(m_pStart, nOp1);
+ nOp1 = static_cast<T>( convertBufferOffSet(m_pStart, nOp1) );
break;
default:
break; //
@@ -481,7 +486,7 @@ public:
m_ConvertedBuf += (UINT8)eOp;
if ( eOp == _CASEIS )
if ( nOp1 )
- nOp1 = convertBufferOffSet(m_pStart, nOp1);
+ nOp1 = static_cast<T>( convertBufferOffSet(m_pStart, nOp1) );
m_ConvertedBuf += (S)nOp1;
m_ConvertedBuf += (S)nOp2;
@@ -524,7 +529,7 @@ PCodeBuffConvertor<T,S>::convert()
BufferTransformer< T, S > aTrnsfrmer;
aBuf.visitBuffer( aTrnsfrmer );
m_pCnvtdBuf = (BYTE*)aTrnsfrmer.buffer().GetBuffer();
- m_nCnvtdSize = aTrnsfrmer.buffer().GetSize();
+ m_nCnvtdSize = static_cast<S>( aTrnsfrmer.buffer().GetSize() );
}
void NeverRunsEver()
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index 177d922e9d80..f05af57e8e9f 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: symtbl.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: vg $ $Date: 2006-11-01 16:14:34 $
+ * last change: $Author: vg $ $Date: 2006-11-03 15:10:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -253,7 +253,7 @@ SbiSymDef* SbiSymPool::Get( USHORT n ) const
return aData.GetObject( n );
}
-USHORT SbiSymPool::Define( const String& rName )
+UINT32 SbiSymPool::Define( const String& rName )
{
SbiSymDef* p = Find( rName );
if( p )
@@ -296,12 +296,12 @@ void SbiSymPool::CheckRefs()
SbiSymDef::SbiSymDef( const String& rName ) : aName( rName )
{
eType = SbxEMPTY;
- nDims =
- nTypeId =
- nProcId =
- nId =
- nPos =
- nLen =
+ nDims = 0;
+ nTypeId = 0;
+ nProcId = 0;
+ nId = 0;
+ nPos = 0;
+ nLen = 0;
nChain = 0;
bAs =
bNew =
@@ -379,7 +379,7 @@ UINT32 SbiSymDef::Reference()
// Definition eines Symbols.
// Hier wird der Backchain aufgeloest, falls vorhanden
-USHORT SbiSymDef::Define()
+UINT32 SbiSymDef::Define()
{
UINT32 n = pIn->pParser->aGen.GetPC();
pIn->pParser->aGen.GenStmnt();
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index 98c01b2ad165..32fd9732cba8 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: symtbl.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: vg $ $Date: 2006-11-01 16:16:27 $
+ * last change: $Author: vg $ $Date: 2006-11-03 15:10:33 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -119,7 +119,7 @@ public:
SbiSymDef* Get( USHORT ) const; // Variable per Position suchen
SbiSymDef* First(), *Next(); // Iteratoren
- USHORT Define( const String& ); // Label definieren
+ UINT32 Define( const String& ); // Label definieren
UINT32 Reference( const String& ); // Label referenzieren
void CheckRefs(); // offene Referenzen suchen
};
@@ -188,7 +188,7 @@ public:
BOOL IsGlobal() const { return bGlobal; }
SbiSymPool& GetPool();
- USHORT Define(); // Symbol in Code definieren
+ UINT32 Define(); // Symbol in Code definieren
UINT32 Reference(); // Symbol in Code referenzieren
private:
diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx
index 4e1e15b563d9..3ca98a07a883 100644
--- a/basic/source/runtime/step1.cxx
+++ b/basic/source/runtime/step1.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: step1.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: vg $ $Date: 2006-11-01 16:16:55 $
+ * last change: $Author: vg $ $Date: 2006-11-03 15:10:48 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -51,7 +51,7 @@ void SbiRuntime::StepLOADNC( UINT32 nOp1 )
SbxVariable* p = new SbxVariable( SbxDOUBLE );
// #57844 Lokalisierte Funktion benutzen
- String aStr = pImg->GetString( nOp1 );
+ String aStr = pImg->GetString( static_cast<short>( nOp1 ) );
// Auch , zulassen !!!
USHORT iComma = aStr.Search( ',' );
if( iComma != STRING_NOTFOUND )
@@ -73,7 +73,7 @@ void SbiRuntime::StepLOADNC( UINT32 nOp1 )
void SbiRuntime::StepLOADSC( UINT32 nOp1 )
{
SbxVariable* p = new SbxVariable;
- p->PutString( pImg->GetString( nOp1 ) );
+ p->PutString( pImg->GetString( static_cast<short>( nOp1 ) ) );
PushVar( p );
}
@@ -82,7 +82,7 @@ void SbiRuntime::StepLOADSC( UINT32 nOp1 )
void SbiRuntime::StepLOADI( UINT32 nOp1 )
{
SbxVariable* p = new SbxVariable;
- p->PutInteger( nOp1 );
+ p->PutInteger( static_cast<INT16>( nOp1 ) );
PushVar( p );
}
@@ -94,7 +94,7 @@ void SbiRuntime::StepARGN( UINT32 nOp1 )
StarBASIC::FatalError( SbERR_INTERNAL_ERROR );
else
{
- String aAlias( pImg->GetString( nOp1 ) );
+ String aAlias( pImg->GetString( static_cast<short>( nOp1 ) ) );
SbxVariableRef pVal = PopVar();
refArgv->Put( pVal, nArgc );
refArgv->PutAlias( aAlias, nArgc++ );
@@ -153,9 +153,9 @@ void SbiRuntime::StepPAD( UINT32 nOp1 )
SbxVariable* p = GetTOS();
String& s = (String&)(const String&) *p;
if( s.Len() > nOp1 )
- s.Erase( nOp1 );
+ s.Erase( static_cast<xub_StrLen>( nOp1 ) );
else
- s.Expand( nOp1, ' ' );
+ s.Expand( static_cast<xub_StrLen>( nOp1 ), ' ' );
}
// Sprung (+Target)
@@ -207,8 +207,8 @@ void SbiRuntime::StepONJUMP( UINT32 nOp1 )
//PushGosub( pCode + 3 * nOp1 );
PushGosub( pCode + 5 * nOp1 );
}
- if( n < 1 || static_cast<UINT32>(n) > nOp1 )
- n = nOp1 + 1;
+ if( n < 1 || static_cast<UINT32>(n) > nOp1 )
+ n = static_cast<INT16>( nOp1 + 1 );
//nOp1 = (UINT32) ( (const char*) pCode - pImg->GetCode() ) + 3 * --n;
nOp1 = (UINT32) ( (const char*) pCode - pImg->GetCode() ) + 5 * --n;
StepJUMP( nOp1 );
@@ -501,7 +501,7 @@ void SbiRuntime::StepSETCLASS( UINT32 nOp1 )
{
SbxVariableRef refVal = PopVar();
SbxVariableRef refVar = PopVar();
- String aClass( pImg->GetString( nOp1 ) );
+ String aClass( pImg->GetString( static_cast<short>( nOp1 ) ) );
bool bOk = checkClass_Impl( refVal, aClass, true );
if( bOk )
@@ -511,7 +511,7 @@ void SbiRuntime::StepSETCLASS( UINT32 nOp1 )
void SbiRuntime::StepTESTCLASS( UINT32 nOp1 )
{
SbxVariableRef xObjVal = PopVar();
- String aClass( pImg->GetString( nOp1 ) );
+ String aClass( pImg->GetString( static_cast<short>( nOp1 ) ) );
bool bOk = checkClass_Impl( xObjVal, aClass, false );
SbxVariable* pRet = new SbxVariable;
@@ -523,7 +523,7 @@ void SbiRuntime::StepTESTCLASS( UINT32 nOp1 )
void SbiRuntime::StepLIB( UINT32 nOp1 )
{
- aLibName = pImg->GetString( nOp1 );
+ aLibName = pImg->GetString( static_cast<short>( nOp1 ) );
}
// TOS wird um BASE erhoeht, BASE davor gepusht (+BASE)
@@ -537,7 +537,7 @@ void SbiRuntime::StepBASED( UINT32 nOp1 )
// #109275 Check compatiblity mode
bool bCompatible = ((nOp1 & 0x8000) != 0);
- USHORT uBase = (nOp1 & 1); // Can only be 0 or 1
+ USHORT uBase = static_cast<USHORT>(nOp1 & 1); // Can only be 0 or 1
p1->PutInteger( uBase );
if( !bCompatible )
x2->Compute( SbxPLUS, *p1 );
diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx
index 6e7ad1f27caa..3e7e3c5225e6 100644
--- a/basic/source/runtime/step2.cxx
+++ b/basic/source/runtime/step2.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: step2.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: vg $ $Date: 2006-11-02 16:37:23 $
+ * last change: $Author: vg $ $Date: 2006-11-03 15:10:41 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -66,9 +66,8 @@ SbxArray* getVBAGlobals( StarBASIC* pSBasic )
if (pThisComp && pThisComp->IsObject())
{
SbxObject *pObj = static_cast<SbxObject *>(pThisComp->GetObject());
- SbxVariable *vba;
- if ((vba = pObj->Find( aVBAHook, SbxCLASS_DONTCARE/* SbxCLASS_PROPERTY */ ) ) &&
- (vba->GetType() & SbxARRAY))
+ SbxVariable *vba = pObj->Find( aVBAHook, SbxCLASS_DONTCARE/* SbxCLASS_PROPERTY */ );
+ if ( vba && (vba->GetType() & SbxARRAY) )
{
pArray = static_cast<SbxArray *>(vba->GetObject());
isInitialised = true;
@@ -91,8 +90,8 @@ SbxVariable* VBAFind( const String& rName, SbxClassType t, StarBASIC* pBasic )
if (!pElem || !pElem->IsObject())
continue;
SbxObject *pVba = static_cast<SbxObject *>(pElem->GetObject());
- SbxVariable *pVbaVar;
- if( pVba && (pVbaVar = pVba->Find( rName, t ) ) )
+ SbxVariable *pVbaVar = pVba ? pVba->Find( rName, t ) : NULL;
+ if( pVbaVar )
{
return pVbaVar;
}
@@ -121,7 +120,7 @@ SbxVariable* SbiRuntime::FindElement
{
BOOL bFatalError = FALSE;
SbxDataType t = (SbxDataType) nOp2;
- String aName( pImg->GetString( nOp1 & 0x7FFF ) );
+ String aName( pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) ) );
if( bLocal )
pElem = refLocals->Find( aName, SbxCLASS_DONTCARE );
if( !pElem )
@@ -669,7 +668,7 @@ void SbiRuntime::StepELEM( UINT32 nOp1, UINT32 nOp2 )
void SbiRuntime::StepPARAM( UINT32 nOp1, UINT32 nOp2 )
{
- UINT32 i = nOp1 & 0x7FFF;
+ USHORT i = static_cast<USHORT>( nOp1 & 0x7FFF );
SbxDataType t = (SbxDataType) nOp2;
SbxVariable* p;
@@ -749,7 +748,7 @@ void SbiRuntime::StepCASEIS( UINT32 nOp1, UINT32 nOp2 )
void SbiRuntime::StepCALL( UINT32 nOp1, UINT32 nOp2 )
{
- String aName = pImg->GetString( nOp1 & 0x7FFF );
+ String aName = pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) );
SbxArray* pArgs = NULL;
if( nOp1 & 0x8000 )
pArgs = refArgv;
@@ -764,7 +763,7 @@ void SbiRuntime::StepCALL( UINT32 nOp1, UINT32 nOp2 )
void SbiRuntime::StepCALLC( UINT32 nOp1, UINT32 nOp2 )
{
- String aName = pImg->GetString( nOp1 & 0x7FFF );
+ String aName = pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) );
SbxArray* pArgs = NULL;
if( nOp1 & 0x8000 )
pArgs = refArgv;
@@ -809,10 +808,10 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 )
}
pStmnt = pCode - 9;
USHORT nOld = nLine;
- nLine = nOp1;
+ nLine = static_cast<short>( nOp1 );
// #29955 & 0xFF, um for-Schleifen-Ebene wegzufiltern
- nCol1 = nOp2 & 0xFF;
+ nCol1 = static_cast<short>( nOp2 & 0xFF );
// Suchen des naechsten STMNT-Befehls,
// um die End-Spalte dieses Statements zu setzen
@@ -835,7 +834,7 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 )
if( !bInError )
{
// (Bei Sprngen aus Schleifen tritt hier eine Differenz auf)
- USHORT nExspectedForLevel = nOp2 / 0x100;
+ USHORT nExspectedForLevel = static_cast<USHORT>( nOp2 / 0x100 );
if( pGosubStk )
nExspectedForLevel = nExspectedForLevel + pGosubStk->nStartForLvl;
@@ -860,7 +859,7 @@ void SbiRuntime::StepSTMNT( UINT32 nOp1, UINT32 nOp2 )
// Breakpoints nur bei STMNT-Befehlen in neuer Zeile!
else if( ( nOp1 != nOld )
&& ( nFlags & SbDEBUG_BREAK )
- && pMod->IsBP( nOp1 ) )
+ && pMod->IsBP( static_cast<USHORT>( nOp1 ) ) )
{
StarBASIC* pBreakBasic = GetCurrentBasic( &rBasic );
USHORT nNewFlags = pBreakBasic->BreakPoint( nLine, nCol1, nCol2 );
@@ -886,7 +885,8 @@ void SbiRuntime::StepOPEN( UINT32 nOp1, UINT32 nOp2 )
short nBlkLen = pLen->GetInteger();
short nChan = pChan->GetInteger();
ByteString aName( pName->GetString(), gsl_getSystemTextEncoding() );
- pIosys->Open( nChan, aName, nOp1, nOp2, nBlkLen );
+ pIosys->Open( nChan, aName, static_cast<short>( nOp1 ),
+ static_cast<short>( nOp2 ), nBlkLen );
Error( pIosys->GetError() );
}
@@ -894,13 +894,13 @@ void SbiRuntime::StepOPEN( UINT32 nOp1, UINT32 nOp2 )
void SbiRuntime::StepCREATE( UINT32 nOp1, UINT32 nOp2 )
{
- String aClass( pImg->GetString( nOp2 ) );
+ String aClass( pImg->GetString( static_cast<short>( nOp2 ) ) );
SbxObject *pObj = SbxBase::CreateObject( aClass );
if( !pObj )
Error( SbERR_INVALID_OBJECT );
else
{
- String aName( pImg->GetString( nOp1 ) );
+ String aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
pObj->SetName( aName );
// Das Objekt muss BASIC rufen koennen
pObj->SetParent( &rBasic );
@@ -980,7 +980,7 @@ void SbiRuntime::StepDCREATE_IMPL( UINT32 nOp1, UINT32 nOp2 )
}
// Objekte anlegen und ins Array eintragen
- String aClass( pImg->GetString( nOp2 ) );
+ String aClass( pImg->GetString( static_cast<short>( nOp2 ) ) );
for( i = 0 ; i < nTotalSize ; i++ )
{
SbxObject *pClassObj = SbxBase::CreateObject( aClass );
@@ -991,7 +991,7 @@ void SbiRuntime::StepDCREATE_IMPL( UINT32 nOp1, UINT32 nOp2 )
}
else
{
- String aName( pImg->GetString( nOp1 ) );
+ String aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
pClassObj->SetName( aName );
// Das Objekt muss BASIC rufen koennen
pClassObj->SetParent( &rBasic );
@@ -1059,8 +1059,8 @@ SbxObject* createUserTypeImpl( const String& rClassName ); // sb.cxx
void SbiRuntime::StepTCREATE( UINT32 nOp1, UINT32 nOp2 )
{
- String aName( pImg->GetString( nOp1 ) );
- String aClass( pImg->GetString( nOp2 ) );
+ String aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
+ String aClass( pImg->GetString( static_cast<short>( nOp2 ) ) );
SbxObject* pCopyObj = createUserTypeImpl( aClass );
if( pCopyObj )
@@ -1077,7 +1077,7 @@ void SbiRuntime::StepLOCAL( UINT32 nOp1, UINT32 nOp2 )
{
if( !refLocals.Is() )
refLocals = new SbxArray;
- String aName( pImg->GetString( nOp1 ) );
+ String aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
if( refLocals->Find( aName, SbxCLASS_DONTCARE ) == NULL )
{
SbxDataType t = (SbxDataType) nOp2;
@@ -1091,7 +1091,7 @@ void SbiRuntime::StepLOCAL( UINT32 nOp1, UINT32 nOp2 )
void SbiRuntime::StepPUBLIC_Impl( UINT32 nOp1, UINT32 nOp2, bool bUsedForClassModule )
{
- String aName( pImg->GetString( nOp1 ) );
+ String aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
SbxDataType t = (SbxDataType) nOp2;
BOOL bFlag = pMod->IsSet( SBX_NO_MODIFY );
pMod->SetFlag( SBX_NO_MODIFY );
@@ -1123,7 +1123,7 @@ void SbiRuntime::StepGLOBAL( UINT32 nOp1, UINT32 nOp2 )
if( pImg->GetFlag( SBIMG_CLASSMODULE ) )
StepPUBLIC_Impl( nOp1, nOp2, true );
- String aName( pImg->GetString( nOp1 ) );
+ String aName( pImg->GetString( static_cast<short>( nOp1 ) ) );
SbxDataType t = (SbxDataType) nOp2;
BOOL bFlag = rBasic.IsSet( SBX_NO_MODIFY );
rBasic.SetFlag( SBX_NO_MODIFY );
@@ -1168,7 +1168,7 @@ void SbiRuntime::StepFIND_G( UINT32 nOp1, UINT32 nOp2 )
{
// Return dummy variable
SbxDataType t = (SbxDataType) nOp2;
- String aName( pImg->GetString( nOp1 & 0x7FFF ) );
+ String aName( pImg->GetString( static_cast<short>( nOp1 & 0x7FFF ) ) );
SbxVariable* pDummyVar = new SbxVariable( t );
pDummyVar->SetName( aName );