Kaydet (Commit) fb3a1bb9 authored tarafından Andreas Mantke's avatar Andreas Mantke Kaydeden (comit) Cédric Bosdonnat

Translation of comments from German to English

I translated the comments in the files from German to English.
There were tabs in the file sbunoobj.cxx. I coverted them with the help of Kohei to whitespaces.
I found whitespaces at the end of two rows in that file (line 1642 and 2642). They were deleted.
üst 19b140bb
...@@ -297,7 +297,7 @@ namespace basic ...@@ -297,7 +297,7 @@ namespace basic
BasicManager* pBasicManager = new BasicManager( new StarBASIC, &aAppBasicDir ); BasicManager* pBasicManager = new BasicManager( new StarBASIC, &aAppBasicDir );
setApplicationBasicManager( pBasicManager ); setApplicationBasicManager( pBasicManager );
// Als Destination das erste Dir im Pfad: // The first dir in the path as destination:
String aFileName( aAppBasic.getName() ); String aFileName( aAppBasic.getName() );
aAppBasic = INetURLObject( aAppBasicDir.GetToken(1) ); aAppBasic = INetURLObject( aAppBasicDir.GetToken(1) );
DBG_ASSERT( aAppBasic.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); DBG_ASSERT( aAppBasic.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
...@@ -475,7 +475,7 @@ namespace basic ...@@ -475,7 +475,7 @@ namespace basic
// initialize the containers // initialize the containers
impl_initDocLibraryContainers_nothrow( xBasicLibs, xDialogLibs ); impl_initDocLibraryContainers_nothrow( xBasicLibs, xDialogLibs );
// damit auch Dialoge etc. 'qualifiziert' angesprochen werden k"onnen // so that also dialogs etc. could be 'qualified' addressed
pBasicManager->GetLib(0)->SetParent( pAppBasic ); pBasicManager->GetLib(0)->SetParent( pAppBasic );
// global properties in the document's Basic // global properties in the document's Basic
......
...@@ -974,7 +974,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR ...@@ -974,7 +974,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR
USHORT nLibs; USHORT nLibs;
*xManagerStream >> nLibs; *xManagerStream >> nLibs;
// Plausi! // Plausibility!
if( nLibs & 0xF000 ) if( nLibs & 0xF000 )
{ {
DBG_ASSERT( !this, "BasicManager-Stream defect!" ); DBG_ASSERT( !this, "BasicManager-Stream defect!" );
...@@ -1059,7 +1059,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) ...@@ -1059,7 +1059,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
// aErrorText.SearchAndReplace( "XX", aStorName ); // aErrorText.SearchAndReplace( "XX", aStorName );
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, aStorName, ERRCODE_BUTTON_OK ); StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_MGROPEN, aStorName, ERRCODE_BUTTON_OK );
pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENMGRSTREAM, aStorName ) ); pErrorMgr->InsertError( BasicError( *pErrInf, BASERR_REASON_OPENMGRSTREAM, aStorName ) );
// und es geht weiter... // and it proceeds ...
} }
xManagerStream->Seek( nBasicEndOff+1 ); // +1: 0x00 as separator xManagerStream->Seek( nBasicEndOff+1 ); // +1: 0x00 as separator
String aLibs; String aLibs;
...@@ -1662,7 +1662,7 @@ StarBASIC* BasicManager::CreateLib ...@@ -1662,7 +1662,7 @@ StarBASIC* BasicManager::CreateLib
//if( !pLibInfo ) //if( !pLibInfo )
//pLibInfo = FindLibInfo( pLib ); //pLibInfo = FindLibInfo( pLib );
//pLibInfo->SetStorageName( LinkTargetURL ); //pLibInfo->SetStorageName( LinkTargetURL );
//pLibInfo->GetLib()->SetModified( FALSE ); // Dann nicht speichern //pLibInfo->GetLib()->SetModified( FALSE ); // Then don't save
//pLibInfo->SetRelStorageName( String() ); //pLibInfo->SetRelStorageName( String() );
//pLibInfo->IsReference() = TRUE; //pLibInfo->IsReference() = TRUE;
} }
......
...@@ -619,10 +619,10 @@ static char* SbiDisas_TypeOp_pTypes[13] = { ...@@ -619,10 +619,10 @@ static char* SbiDisas_TypeOp_pTypes[13] = {
#endif #endif
void SbiDisas::TypeOp( String& rText ) void SbiDisas::TypeOp( String& rText )
{ {
// AB 19.1.96: Typ kann Flag fr BYVAL enthalten (StepARGTYP) // From 1996-01-19: type can contain flag for BYVAL (StepARGTYP)
if( nOp1 & 0x8000 ) if( nOp1 & 0x8000 )
{ {
nOp1 &= 0x7FFF; // Flag wegfiltern nOp1 &= 0x7FFF; // filter away the flag
rText.AppendAscii( "BYVAL " ); rText.AppendAscii( "BYVAL " );
} }
if( nOp1 < 13 ) if( nOp1 < 13 )
......
...@@ -407,8 +407,6 @@ void SbiImage::MakeStrings( short nSize ) ...@@ -407,8 +407,6 @@ void SbiImage::MakeStrings( short nSize )
bError = TRUE; bError = TRUE;
} }
// Hinzufuegen eines Strings an den StringPool. Der String-Puffer
// waechst dynamisch in 1K-Schritten
// Add a string to StringPool. The String buffer is dynamically // Add a string to StringPool. The String buffer is dynamically
// growing in 1K-Steps // growing in 1K-Steps
void SbiImage::AddString( const String& r ) void SbiImage::AddString( const String& r )
......
...@@ -392,7 +392,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ...@@ -392,7 +392,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite
String aServiceName( RTL_CONSTASCII_USTRINGPARAM("stardiv.uno.beans.PropertySet") ); String aServiceName( RTL_CONSTASCII_USTRINGPARAM("stardiv.uno.beans.PropertySet") );
#if 0 #if 0
// Service suchen und instanzieren // search service and instantiate
Reference< XMultiServiceFactory > xServiceManager = getProcessServiceFactory(); Reference< XMultiServiceFactory > xServiceManager = getProcessServiceFactory();
Reference< XInterface > xInterface; Reference< XInterface > xInterface;
if( xProv.is() ) if( xProv.is() )
......
...@@ -1406,14 +1406,14 @@ SbLanguageMode StarBASIC::GetLanguageMode() ...@@ -1406,14 +1406,14 @@ SbLanguageMode StarBASIC::GetLanguageMode()
return eLanguageMode; return eLanguageMode;
} }
// AB: 29.3.96 // From 1996-03-29:
// Das Mapping zwischen alten und neuen Fehlercodes erfolgt, indem die Tabelle // The mapping between the old and the new error codes take place by searching
// SFX_VB_ErrorTab[] durchsucht wird. Dies ist zwar nicht besonders performant, // through the table SFX_VB_ErrorTab[]. This is indeed not with good performance,
// verbraucht aber viel weniger Speicher als entsprechende switch-Bloecke. // but it consumes much less memory than corresponding switch blocs.
// Die Umrechnung von Fehlercodes muss nicht schnell sein, daher auch keine // Because the conversion of error codes has not to be fast. there is no
// binaere Suche bei VB-Error -> SFX-Error. // binaere search by VB-Error -> SFX-Error.
// Neue Fehler-Codes auf alte, Sbx-Kompatible zurueckmappen // Map back new error codes to old, Sbx-compatible
USHORT StarBASIC::GetVBErrorCode( SbError nError ) USHORT StarBASIC::GetVBErrorCode( SbError nError )
{ {
USHORT nRet = 0; USHORT nRet = 0;
...@@ -1439,7 +1439,7 @@ USHORT StarBASIC::GetVBErrorCode( SbError nError ) ...@@ -1439,7 +1439,7 @@ USHORT StarBASIC::GetVBErrorCode( SbError nError )
} }
} }
// Suchschleife // search loop
const SFX_VB_ErrorItem* pErrItem; const SFX_VB_ErrorItem* pErrItem;
USHORT nIndex = 0; USHORT nIndex = 0;
do do
...@@ -1452,7 +1452,7 @@ USHORT StarBASIC::GetVBErrorCode( SbError nError ) ...@@ -1452,7 +1452,7 @@ USHORT StarBASIC::GetVBErrorCode( SbError nError )
} }
nIndex++; nIndex++;
} }
while( pErrItem->nErrorVB != 0xFFFF ); // bis End-Marke while( pErrItem->nErrorVB != 0xFFFF ); // up to end mark
return nRet; return nRet;
} }
...@@ -1498,15 +1498,15 @@ SbError StarBASIC::GetSfxFromVBError( USHORT nError ) ...@@ -1498,15 +1498,15 @@ SbError StarBASIC::GetSfxFromVBError( USHORT nError )
break; break;
} }
else if( pErrItem->nErrorVB > nError ) else if( pErrItem->nErrorVB > nError )
break; // kann nicht mehr gefunden werden break; // couldn't found anymore
nIndex++; nIndex++;
} }
while( pErrItem->nErrorVB != 0xFFFF ); // bis End-Marke while( pErrItem->nErrorVB != 0xFFFF ); // up to end mark
return nRet; return nRet;
} }
// Error- / Break-Daten setzen // set Error- / Break-data
void StarBASIC::SetErrorData void StarBASIC::SetErrorData
( SbError nCode, USHORT nLine, USHORT nCol1, USHORT nCol2 ) ( SbError nCode, USHORT nLine, USHORT nCol1, USHORT nCol2 )
{ {
...@@ -1518,8 +1518,8 @@ void StarBASIC::SetErrorData ...@@ -1518,8 +1518,8 @@ void StarBASIC::SetErrorData
} }
//---------------------------------------------------------------- //----------------------------------------------------------------
// Hilfsklasse zum Zugriff auf String SubResourcen einer Resource. // help class for access to string SubResource of a Resource.
// Quelle: sfx2\source\doc\docfile.cxx (TLX) // Source: sfx2\source\doc\docfile.cxx (TLX)
struct BasicStringList_Impl : private Resource struct BasicStringList_Impl : private Resource
{ {
ResId aResId; ResId aResId;
...@@ -1534,7 +1534,7 @@ struct BasicStringList_Impl : private Resource ...@@ -1534,7 +1534,7 @@ struct BasicStringList_Impl : private Resource
}; };
//---------------------------------------------------------------- //----------------------------------------------------------------
// #60175 Flag, das bei Basic-Fehlern das Anziehen der SFX-Resourcen verhindert // Flag, that prevent the activation of the SFX-Resources at a Basic error
static BOOL bStaticSuppressSfxResource = FALSE; static BOOL bStaticSuppressSfxResource = FALSE;
void StarBASIC::StaticSuppressSfxResource( BOOL bSuppress ) void StarBASIC::StaticSuppressSfxResource( BOOL bSuppress )
...@@ -1561,15 +1561,15 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg ) ...@@ -1561,15 +1561,15 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg )
USHORT nOldID = GetVBErrorCode( nId ); USHORT nOldID = GetVBErrorCode( nId );
// Hilfsklasse instanzieren // intantiate the help class
BasResId aId( RID_BASIC_START ); BasResId aId( RID_BASIC_START );
BasicStringList_Impl aMyStringList( aId, USHORT(nId & ERRCODE_RES_MASK) ); BasicStringList_Impl aMyStringList( aId, USHORT(nId & ERRCODE_RES_MASK) );
if( aMyStringList.IsErrorTextAvailable() ) if( aMyStringList.IsErrorTextAvailable() )
{ {
// Merge Message mit Zusatztext // merge message with additional text
String aMsg1 = aMyStringList.GetString(); String aMsg1 = aMyStringList.GetString();
// Argument-Platzhalter durch %s ersetzen // replace argument placeholder with %s
String aSrgStr( RTL_CONSTASCII_USTRINGPARAM("$(ARG1)") ); String aSrgStr( RTL_CONSTASCII_USTRINGPARAM("$(ARG1)") );
USHORT nResult = aMsg1.Search( aSrgStr ); USHORT nResult = aMsg1.Search( aSrgStr );
...@@ -1597,7 +1597,7 @@ BOOL StarBASIC::CError ...@@ -1597,7 +1597,7 @@ BOOL StarBASIC::CError
{ {
vos::OGuard aSolarGuard( Application::GetSolarMutex() ); vos::OGuard aSolarGuard( Application::GetSolarMutex() );
// Compiler-Fehler waehrend der Laufzeit -> Programm anhalten // compiler error during runtime -> stop programm
if( IsRunning() ) if( IsRunning() )
{ {
// #109018 Check if running Basic is affected // #109018 Check if running Basic is affected
...@@ -1608,13 +1608,13 @@ BOOL StarBASIC::CError ...@@ -1608,13 +1608,13 @@ BOOL StarBASIC::CError
Stop(); Stop();
} }
// Flag setzen, damit GlobalRunInit den Fehler mitbekommt // set flag, so that GlobalRunInit notice the error
GetSbData()->bGlobalInitErr = TRUE; GetSbData()->bGlobalInitErr = TRUE;
// Fehlertext basteln // tinker the error message
MakeErrorText( code, rMsg ); MakeErrorText( code, rMsg );
// Umsetzung des Codes fuer String-Transport in SFX-Error // Implementation of the code for the string transport to SFX-Error
if( rMsg.Len() ) if( rMsg.Len() )
code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); code = (ULONG)*new StringErrorInfo( code, String(rMsg) );
...@@ -1625,7 +1625,7 @@ BOOL StarBASIC::CError ...@@ -1625,7 +1625,7 @@ BOOL StarBASIC::CError
bRet = (BOOL) GetSbData()->aErrHdl.Call( this ); bRet = (BOOL) GetSbData()->aErrHdl.Call( this );
else else
bRet = ErrorHdl(); bRet = ErrorHdl();
GetSbData()->bCompiler = FALSE; // nur TRUE fuer Error-Handler GetSbData()->bCompiler = FALSE; // only true for error handler
return bRet; return bRet;
} }
...@@ -1644,7 +1644,7 @@ BOOL StarBASIC::RTError( SbError code, const String& rMsg, USHORT l, USHORT c1, ...@@ -1644,7 +1644,7 @@ BOOL StarBASIC::RTError( SbError code, const String& rMsg, USHORT l, USHORT c1,
c = 0; c = 0;
MakeErrorText( c, rMsg ); MakeErrorText( c, rMsg );
// Umsetzung des Codes fuer String-Transport in SFX-Error // Implementation of the code for the string transport to SFX-Error
if( rMsg.Len() ) if( rMsg.Len() )
{ {
// very confusing, even though MakeErrorText sets up the error text // very confusing, even though MakeErrorText sets up the error text
...@@ -1701,7 +1701,7 @@ SbError StarBASIC::GetErrBasic() ...@@ -1701,7 +1701,7 @@ SbError StarBASIC::GetErrBasic()
return 0; return 0;
} }
// #66536 Zusatz-Message fuer RTL-Funktion Error zugreifbar machen // make the additional message for the RTL function error accessible
String StarBASIC::GetErrorMsg() String StarBASIC::GetErrorMsg()
{ {
if( pINST ) if( pINST )
...@@ -1794,7 +1794,7 @@ BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer ) ...@@ -1794,7 +1794,7 @@ BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer )
return FALSE; return FALSE;
else if( pMod->ISA(SbJScriptModule) ) else if( pMod->ISA(SbJScriptModule) )
{ {
// Ref zuweisen, damit pMod deleted wird // assign Ref, so that pMod will be deleted
SbModuleRef xRef = pMod; SbModuleRef xRef = pMod;
} }
else else
...@@ -1803,15 +1803,15 @@ BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer ) ...@@ -1803,15 +1803,15 @@ BOOL StarBASIC::LoadData( SvStream& r, USHORT nVer )
pModules->Put( pMod, i ); pModules->Put( pMod, i );
} }
} }
// HACK fuer SFX-Mist! // HACK for SFX-Bullshit!
SbxVariable* p = Find( String( RTL_CONSTASCII_USTRINGPARAM("FALSE") ), SbxCLASS_PROPERTY ); SbxVariable* p = Find( String( RTL_CONSTASCII_USTRINGPARAM("FALSE") ), SbxCLASS_PROPERTY );
if( p ) if( p )
Remove( p ); Remove( p );
p = Find( String( RTL_CONSTASCII_USTRINGPARAM("TRUE") ), SbxCLASS_PROPERTY ); p = Find( String( RTL_CONSTASCII_USTRINGPARAM("TRUE") ), SbxCLASS_PROPERTY );
if( p ) if( p )
Remove( p ); Remove( p );
// Ende des Hacks! // End of the hacks!
// Suche ueber StarBASIC ist immer global // Search via StarBASIC is at all times global
DBG_ASSERT( IsSet( SBX_GBLSEARCH ), "Basic ohne GBLSEARCH geladen" ); DBG_ASSERT( IsSet( SBX_GBLSEARCH ), "Basic ohne GBLSEARCH geladen" );
SetFlag( SBX_GBLSEARCH ); SetFlag( SBX_GBLSEARCH );
return TRUE; return TRUE;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment