basic: translation of all debug messages

runtime.cxx: Added some output instead of nothing.

Change-Id: Ia25ae4b5fe8661a8a3ac317bc0562e1339640cd8
This commit is contained in:
Thomas Arnhold 2013-03-11 21:36:43 +01:00
parent 1def535928
commit 59b5ff7574
10 changed files with 32 additions and 31 deletions

View file

@ -545,7 +545,7 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
rSStream >> nId;
rSStream >> nVer;
DBG_ASSERT( nId == LIBINFO_ID, "Keine BasicLibInfo !?" );
DBG_ASSERT( nId == LIBINFO_ID, "No BasicLibInfo?!" );
if( nId == LIBINFO_ID )
{
// Reload?
@ -678,7 +678,7 @@ void copyToLibraryContainer( StarBASIC* pBasic, const LibraryContainerInfo& rInf
for ( sal_uInt16 nMod = 0 ; nMod < nModCount ; nMod++ )
{
SbModule* pModule = (SbModule*)pBasic->GetModules()->Get( nMod );
DBG_ASSERT( pModule, "Modul nicht erhalten!" );
DBG_ASSERT( pModule, "Module not received!" );
OUString aModName = pModule->GetName();
if( !xLib->hasByName( aModName ) )
@ -929,7 +929,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
*xManagerStream >> nBasicStartOff;
*xManagerStream >> nBasicEndOff;
DBG_ASSERT( !xManagerStream->GetError(), "Ungueltiger Manager-Stream!" );
DBG_ASSERT( !xManagerStream->GetError(), "Invalid Manager-Stream!" );
xManagerStream->Seek( nBasicStartOff );
if( !ImplLoadBasic( *xManagerStream, pLibs->GetObject(0)->GetLibRef() ) )
@ -952,7 +952,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
{
OUString aLibInfo(comphelper::string::getToken(aLibs, nLib, LIB_SEP));
// TODO: Remove == 2
DBG_ASSERT( ( comphelper::string::getTokenCount(aLibInfo, LIBINFO_SEP) == 2 ) || ( comphelper::string::getTokenCount(aLibInfo, LIBINFO_SEP) == 3 ), "Ungueltige Lib-Info!" );
DBG_ASSERT( ( comphelper::string::getTokenCount(aLibInfo, LIBINFO_SEP) == 2 ) || ( comphelper::string::getTokenCount(aLibInfo, LIBINFO_SEP) == 3 ), "Invalid Lib-Info!" );
OUString aLibName( aLibInfo.getToken( 0, LIBINFO_SEP ) );
OUString aLibAbsStorageName( aLibInfo.getToken( 1, LIBINFO_SEP ) );
OUString aLibRelStorageName( aLibInfo.getToken( 2, LIBINFO_SEP ) );
@ -1217,7 +1217,7 @@ void BasicManager::CheckModules( StarBASIC* pLib, sal_Bool bReference ) const
for ( sal_uInt16 nMod = 0; nMod < pLib->GetModules()->Count(); nMod++ )
{
SbModule* pModule = (SbModule*)pLib->GetModules()->Get( nMod );
DBG_ASSERT( pModule, "Modul nicht erhalten!" );
DBG_ASSERT( pModule, "Module not received!" );
if ( !pModule->IsCompiled() && !StarBASIC::GetErrorCode() )
{
pLib->Compile( pModule );
@ -1228,7 +1228,7 @@ void BasicManager::CheckModules( StarBASIC* pLib, sal_Bool bReference ) const
// cause modified
if( !bModified && bReference )
{
OSL_FAIL( "Per Reference eingebundene Basic-Library ist nicht compiliert!" );
OSL_FAIL( "Referenced basic library is not compiled!" );
pLib->SetModified( sal_False );
}
}
@ -1393,7 +1393,7 @@ StarBASIC* BasicManager::GetLib( sal_uInt16 nLib ) const
{
DBG_CHKTHIS( BasicManager, 0 );
BasicLibInfo* pInf = pLibs->GetObject( nLib );
DBG_ASSERT( pInf, "Lib existiert nicht!" );
DBG_ASSERT( pInf, "Lib does not exist!" );
if ( pInf )
{
return pInf->GetLib();

View file

@ -1922,7 +1922,7 @@ sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
}
// End of the hacks!
// Search via StarBASIC is at all times global
DBG_ASSERT( IsSet( SBX_GBLSEARCH ), "Basic ohne GBLSEARCH geladen" );
DBG_ASSERT( IsSet( SBX_GBLSEARCH ), "Basic loaded without GBLSEARCH" );
SetFlag( SBX_GBLSEARCH );
return sal_True;
}

View file

@ -50,7 +50,7 @@ BasicDLL::~BasicDLL()
void BasicDLL::EnableBreak( bool bEnable )
{
BasicDLL* pThis = BASIC_DLL();
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
if ( pThis )
{
pThis->bBreakEnabled = bEnable;
@ -60,7 +60,7 @@ void BasicDLL::EnableBreak( bool bEnable )
void BasicDLL::SetDebugMode( bool bDebugMode )
{
BasicDLL* pThis = BASIC_DLL();
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
if ( pThis )
{
pThis->bDebugMode = bDebugMode;
@ -75,7 +75,7 @@ void BasicDLL::BasicBreak()
static bool bJustStopping = false;
BasicDLL* pThis = BASIC_DLL();
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: Noch keine Instanz!" );
DBG_ASSERT( pThis, "BasicDLL::EnableBreak: No instance yet!" );
if ( pThis )
{
if ( StarBASIC::IsRunning() && !bJustStopping && ( pThis->bBreakEnabled || pThis->bDebugMode ) )

View file

@ -962,7 +962,7 @@ SbxVariableRef SbiRuntime::PopVar()
SbxVariableRef xVar = refExprStk->Get( --nExprLvl );
#ifdef DBG_UTIL
if ( xVar->GetName().equalsAscii( "Cells" ) )
SAL_INFO("basic", "" );
SAL_INFO("basic", "PopVar: Name equals 'Cells'" );
#endif
// methods hold themselves in parameter 0
if( xVar->IsA( TYPE(SbxMethod) ) )

View file

@ -251,7 +251,7 @@ SbStdFont::SbStdFont() :
// handle name property yourself
p = Find( OUString("Name"), SbxCLASS_PROPERTY );
DBG_ASSERT( p, "Keine Name Property" );
DBG_ASSERT( p, "No Name Property" );
p->SetUserData( ATTR_IMP_NAME );
}
@ -400,7 +400,7 @@ SbStdClipboard::SbStdClipboard() :
SbxObject( OUString("Clipboard") )
{
SbxVariable* p = Find( OUString("Name"), SbxCLASS_PROPERTY );
DBG_ASSERT( p, "Keine Name Property" );
DBG_ASSERT( p, "No Name Property" );
p->SetUserData( ATTR_IMP_NAME );
// register methods

View file

@ -300,7 +300,7 @@ void SbxArray::PutAlias( const OUString& rAlias, sal_uInt16 nIdx )
void SbxArray::Insert32( SbxVariable* pVar, sal_uInt32 nIdx )
{
DBG_ASSERT( pData->size() <= SBX_MAXINDEX32, "SBX: Array wird zu gross" );
DBG_ASSERT( pData->size() <= SBX_MAXINDEX32, "SBX: Array gets too big" );
if( pData->size() > SBX_MAXINDEX32 )
{
return;
@ -329,7 +329,7 @@ void SbxArray::Insert32( SbxVariable* pVar, sal_uInt32 nIdx )
void SbxArray::Insert( SbxVariable* pVar, sal_uInt16 nIdx )
{
DBG_ASSERT( pData->size() <= 0x3FF0, "SBX: Array wird zu gross" );
DBG_ASSERT( pData->size() <= 0x3FF0, "SBX: Array gets too big" );
if( pData->size() > 0x3FF0 )
{
return;

View file

@ -232,7 +232,7 @@ SbxBase* SbxBase::Load( SvStream& rStrm )
{
sal_uIntPtr nNewPos = rStrm.Tell();
nOldPos += nSize;
DBG_ASSERT( nOldPos >= nNewPos, "SBX: Zu viele Daten eingelesen" );
DBG_ASSERT( nOldPos >= nNewPos, "SBX: Too much data loaded" );
if( nOldPos != nNewPos )
rStrm.Seek( nOldPos );
if( !p->LoadCompleted() )

View file

@ -249,7 +249,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
case SbxCLASS_PROPERTY: pArray = pProps; break;
case SbxCLASS_METHOD: pArray = pMethods; break;
case SbxCLASS_OBJECT: pArray = pObjs; break;
default: DBG_ASSERT( !this, "Ungueltige SBX-Klasse" ); break;
default: DBG_ASSERT( !this, "Invalid SBX-Class" ); break;
}
if( pArray )
{
@ -349,7 +349,7 @@ SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx )
case SbxCLASS_PROPERTY: pArray = pProps; break;
case SbxCLASS_METHOD: pArray = pMethods; break;
case SbxCLASS_OBJECT: pArray = pObjs; break;
default: DBG_ASSERT( !this, "Ungueltige SBX-Klasse" ); break;
default: DBG_ASSERT( !this, "Invalid SBX-Class" ); break;
}
if( pArray )
{
@ -385,7 +385,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
case SbxCLASS_PROPERTY: pArray = pProps; break;
case SbxCLASS_METHOD: pArray = pMethods; break;
case SbxCLASS_OBJECT: pArray = pObjs; break;
default: DBG_ASSERT( !this, "Ungueltige SBX-Klasse" ); break;
default: DBG_ASSERT( !this, "Invalid SBX-Class" ); break;
}
if( !pArray )
{
@ -522,7 +522,7 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
case SbxCLASS_PROPERTY: pArray = pProps; break;
case SbxCLASS_METHOD: pArray = pMethods; break;
case SbxCLASS_OBJECT: pArray = pObjs; break;
default: DBG_ASSERT( !this, "Ungueltige SBX-Klasse" ); break;
default: DBG_ASSERT( !this, "Invalid SBX-Class" ); break;
}
}
if( pArray )
@ -644,7 +644,7 @@ sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
}
sal_uIntPtr nNewPos = rStrm.Tell();
nPos += nSize;
DBG_ASSERT( nPos >= nNewPos, "SBX: Zu viele Daten eingelesen" );
DBG_ASSERT( nPos >= nNewPos, "SBX: Loaded too much data" );
if( nPos != nNewPos )
{
rStrm.Seek( nPos );

View file

@ -74,7 +74,7 @@ SbxValue::SbxValue( SbxDataType t, void* p ) : SbxBase()
aData.pDecimal->addRef();
break;
default:
DBG_ASSERT( !this, "Angabe eines Pointers unzulaessig" );
DBG_ASSERT( !this, "Improper pointer argument" );
n = SbxNULL;
}
}
@ -189,7 +189,7 @@ void SbxValue::Clear()
{
if( aData.pObj != this )
{
SAL_WARN("basic.sbx", "nicht bei Parent-Prop - sonst CyclicRef");
SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = PTR_CAST(SbxVariable, this);
sal_Bool bParentProp = pThisVar && 5345 ==
( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) );
@ -540,7 +540,7 @@ sal_Bool SbxValue::Put( const SbxValues& rVal )
{
OSL_FAIL( "TheRealValue" );
}
SAL_WARN("basic.sbx", "nicht bei Parent-Prop - sonst CyclicRef");
SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = PTR_CAST(SbxVariable, this);
sal_Bool bParentProp = pThisVar && 5345 ==
( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) );
@ -773,7 +773,7 @@ SbxDataType SbxValue::GetFullType() const
sal_Bool SbxValue::SetType( SbxDataType t )
{
DBG_ASSERT( !( t & 0xF000 ), "Setzen von BYREF|ARRAY verboten!" );
DBG_ASSERT( !( t & 0xF000 ), "SetType of BYREF|ARRAY is forbidden!" );
if( ( t == SbxEMPTY && aData.eType == SbxVOID )
|| ( aData.eType == SbxEMPTY && t == SbxVOID ) )
return sal_True;
@ -804,13 +804,13 @@ sal_Bool SbxValue::SetType( SbxDataType t )
case SbxOBJECT:
if( aData.pObj && aData.pObj != this )
{
SAL_WARN("basic.sbx", "nicht bei Parent-Prop - sonst CyclicRef");
SAL_WARN("basic.sbx", "Not at Parent-Prop - otherwise CyclicRef");
SbxVariable *pThisVar = PTR_CAST(SbxVariable, this);
sal_uInt16 nSlotId = pThisVar
? ( (sal_Int16) ( pThisVar->GetUserData() & 0xFFFF ) )
: 0;
DBG_ASSERT( nSlotId != 5345 || pThisVar->GetName().equalsAscii("Parent"),
"SID_PARENTOBJECT heisst nicht 'Parent'" );
"SID_PARENTOBJECT is not named 'Parent'" );
sal_Bool bParentProp = 5345 == nSlotId;
if ( !bParentProp )
aData.pObj->ReleaseRef();
@ -1550,7 +1550,8 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
memset (&aData,0,sizeof(aData));
ResetFlag(SBX_FIXED);
aData.eType = SbxNULL;
DBG_ASSERT( !this, "Nicht unterstuetzer Datentyp geladen" );
DBG_ASSERT( !this, "Loaded a non-supported data type" );
return sal_False;
}
return sal_True;
@ -1651,7 +1652,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxWCHAR:
break;
default:
DBG_ASSERT( !this, "Speichern eines nicht unterstuetzten Datentyps" );
DBG_ASSERT( !this, "Saving a non-supported data type" );
return sal_False;
}
return sal_True;

View file

@ -583,7 +583,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
break;
default:
aData.eType = SbxNULL;
DBG_ASSERT( !this, "Nicht unterstuetzer Datentyp geladen" );
DBG_ASSERT( !this, "Loaded a non-supported data type" );
return sal_False;
}
// putt value