[Libreoffice-commits] core.git: basic/source
Thomas Arnhold
thomas at arnhold.org
Mon Mar 11 13:38:08 PDT 2013
basic/source/basmgr/basmgr.cxx | 14 +++++++-------
basic/source/classes/sb.cxx | 2 +-
basic/source/runtime/basrdll.cxx | 6 +++---
basic/source/runtime/runtime.cxx | 2 +-
basic/source/runtime/stdobj1.cxx | 4 ++--
basic/source/sbx/sbxarray.cxx | 4 ++--
basic/source/sbx/sbxbase.cxx | 2 +-
basic/source/sbx/sbxobj.cxx | 10 +++++-----
basic/source/sbx/sbxvalue.cxx | 17 +++++++++--------
basic/source/sbx/sbxvar.cxx | 2 +-
10 files changed, 32 insertions(+), 31 deletions(-)
New commits:
commit 59b5ff75745d3c784b7b999605bf50090ee64d34
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Mar 11 21:36:43 2013 +0100
basic: translation of all debug messages
runtime.cxx: Added some output instead of nothing.
Change-Id: Ia25ae4b5fe8661a8a3ac317bc0562e1339640cd8
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 4fa65c7..70775ae 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -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();
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index ed23b59..abf94b0 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -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;
}
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx
index ccd50c0..6a8b37d 100644
--- a/basic/source/runtime/basrdll.cxx
+++ b/basic/source/runtime/basrdll.cxx
@@ -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 ) )
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 55836e8..52b3b23 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -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) ) )
diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx
index 50c13c7..5cd8153 100644
--- a/basic/source/runtime/stdobj1.cxx
+++ b/basic/source/runtime/stdobj1.cxx
@@ -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
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 9a68c137..ded3f2e 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -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;
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index e561722..f6b39b4 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -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() )
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index da05ce2..d4aa1ee 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -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 );
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 1e31916..dc4c777 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -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;
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index f9148c7..e7b02c4 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -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
More information about the Libreoffice-commits
mailing list