Translated German comments

Reviewed on:
	https://gerrit.libreoffice.org/7303

Change-Id: I6c5f4571ad691d19ca93c39550000114f263da8b
This commit is contained in:
Luc Castermans 2014-01-07 22:48:59 +01:00 committed by Miklos Vajna
parent 561775d5b5
commit ee536e482b
8 changed files with 90 additions and 91 deletions

View File

@ -45,11 +45,11 @@ static const short SinTab[16]=
|* |*
|* ImpMultBig2() |* ImpMultBig2()
|* |*
|* Beschreibung Multiplikation fuer FixPoint-Berechnungen |* Description Multiplier for FixPoint-calculations
|* |*
**************************************************************************/ **************************************************************************/
// first parameter should be the bigger one // first parameter should be the larger one
Fix ImpMultBig2( const Fix& a, const Fix& b ) Fix ImpMultBig2( const Fix& a, const Fix& b )
{ {
@ -62,7 +62,7 @@ Fix ImpMultBig2( const Fix& a, const Fix& b )
|* |*
|* ImpSqrt() |* ImpSqrt()
|* |*
|* Beschreibung Wurzelfunktion fuer FixPoint-Berechnungen |* Description SquareRoot function for FixPoint-calculations
|* |*
**************************************************************************/ **************************************************************************/
@ -80,9 +80,9 @@ sal_uInt16 ImpSqrt( sal_uLong nRadi )
sup >>= 1; sup >>= 1;
inf <<= 1; inf <<= 1;
} }
sqr = (sup+inf) >> 1; // Anfangswert der Iteration sqr = (sup+inf) >> 1; // startvalue for iteration
sqr = (nRadi/sqr + sqr) >> 1; // 2 Newton-Iterationen reichen fuer sqr = (nRadi/sqr + sqr) >> 1; // 2 Newton-Iterations suffice for
sqr = (nRadi/sqr + sqr) >> 1; // +- 1 Digit sqr = (nRadi/sqr + sqr) >> 1; // +- 1 Digit
return sal::static_int_cast< sal_uInt16 >(sqr); return sal::static_int_cast< sal_uInt16 >(sqr);
@ -92,11 +92,11 @@ sal_uInt16 ImpSqrt( sal_uLong nRadi )
|* |*
|* ImpExPI() |* ImpExPI()
|* |*
|* Beschreibung EXPI-Funktion fuer FixPoint-Berechnungen |* Description EXPI funktion or FixPoint-calculations
|* |*
**************************************************************************/ **************************************************************************/
// e**(i*nPhi), Einheit nPhi: 2**16 == 360 Grad // e**(i*nPhi), unit nPhi: 2**16 == 360 degrees
FixCpx ImpExPI( sal_uInt16 nPhi ) FixCpx ImpExPI( sal_uInt16 nPhi )
{ {

View File

@ -559,7 +559,7 @@ SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nL
if( nLen>=sizeof(aNToABuf) ) if( nLen>=sizeof(aNToABuf) )
nLen = (sizeof(aNToABuf)-1); nLen = (sizeof(aNToABuf)-1);
// Pointer an das Bufferende setzen // set pointer to end of buffer
sal_Char *pStr = aNToABuf + (sizeof(aNToABuf)-1); sal_Char *pStr = aNToABuf + (sizeof(aNToABuf)-1);
for( sal_uInt8 n = 0; n < nLen; ++n ) for( sal_uInt8 n = 0; n < nLen; ++n )
{ {
@ -788,7 +788,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
if( RTL_TEXTENCODING_DONTKNOW == eDestEnc ) if( RTL_TEXTENCODING_DONTKNOW == eDestEnc )
eDestEnc = osl_getThreadTextEncoding(); eDestEnc = osl_getThreadTextEncoding();
// Script wird komplett nicht eingerueckt! // script is not indented!
OStringBuffer sOut; OStringBuffer sOut;
sOut.append('<') sOut.append('<')
.append(OOO_STRING_SVTOOLS_HTML_script); .append(OOO_STRING_SVTOOLS_HTML_script);
@ -866,8 +866,8 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
if( !rSource.isEmpty() ) if( !rSource.isEmpty() )
{ {
// Wir schreiben das Modul mm ANSI-Zeichensatz, aber mit // we write the module in ANSI-charset, but with
// System-Zeilenumbruechen raus. // the system new line.
const OString sSource(OUStringToOString(rSource, eDestEnc)); const OString sSource(OUStringToOString(rSource, eDestEnc));
rStrm << sSource.getStr() << SAL_NEWLINE_STRING; rStrm << sSource.getStr() << SAL_NEWLINE_STRING;
} }
@ -875,9 +875,8 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
if( JAVASCRIPT != eScriptType ) if( JAVASCRIPT != eScriptType )
{ {
// MIB/MM: Wenn es kein StarBasic ist, kann ein // natuerlich // MIB/MM: if it is not StarBasic, a // could be wrong.
// falsch sein. Da der Kommentar aber beim Einlesen wider // As the comment is removed during reading, it is not helping us....
// entfernt wird, schickt uns das nicht weiter ...
rStrm << (STARBASIC == eScriptType ? "' -->" : "// -->") rStrm << (STARBASIC == eScriptType ? "' -->" : "// -->")
<< SAL_NEWLINE_STRING; << SAL_NEWLINE_STRING;
} }
@ -933,7 +932,7 @@ OString HTMLOutFuncs::CreateTableDataOptionsValNum(
if ( bValue ) if ( bValue )
{ {
// printf / scanf ist zu ungenau // printf / scanf is not precise enough
OUString aValStr; OUString aValStr;
rFormatter.GetInputLineString( fVal, 0, aValStr ); rFormatter.GetInputLineString( fVal, 0, aValStr );
OString sTmp(OUStringToOString(aValStr, eDestEnc)); OString sTmp(OUStringToOString(aValStr, eDestEnc));
@ -949,7 +948,7 @@ OString HTMLOutFuncs::CreateTableDataOptionsValNum(
append("=\""). append("=\"").
append(static_cast<sal_Int32>( append(static_cast<sal_Int32>(
Application::GetSettings().GetLanguageTag().getLanguageType())). Application::GetSettings().GetLanguageTag().getLanguageType())).
append(';'); // Language fuer Format 0 append(';'); // Language for Format 0
if ( nFormat ) if ( nFormat )
{ {
OString aNumStr; OString aNumStr;

View File

@ -740,7 +740,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
case '\t': case '\t':
if( '\t'==nNextCh && bReadPRE && '>'!=cBreak ) if( '\t'==nNextCh && bReadPRE && '>'!=cBreak )
{ {
// In <PRE>: Tabs nach oben durchreichen // Pass Tabs up in <PRE>
bContinue = false; bContinue = false;
break; break;
} }

View File

@ -59,13 +59,13 @@ int SvRTFParser::_GetNextToken()
{ {
case '\\': case '\\':
{ {
// Steuerzeichen // control charaters
switch( nNextCh = GetNextChar() ) switch( nNextCh = GetNextChar() )
{ {
case '{': case '{':
case '}': case '}':
case '\\': case '\\':
case '+': // habe ich in einem RTF-File gefunden case '+': // I found it in a RTF-file
case '~': // nonbreaking space case '~': // nonbreaking space
case '-': // optional hyphen case '-': // optional hyphen
case '_': // nonbreaking hyphen case '_': // nonbreaking hyphen
@ -83,7 +83,7 @@ int SvRTFParser::_GetNextToken()
case ':': // subentry in an index entry case ':': // subentry in an index entry
nRet = RTF_SUBENTRYINDEX; nRet = RTF_SUBENTRYINDEX;
break; break;
case '|': // formula-charakter case '|': // formula-character
nRet = RTF_FORMULA; nRet = RTF_FORMULA;
break; break;
@ -115,7 +115,7 @@ int SvRTFParser::_GetNextToken()
} }
} }
// Minus fuer numerischen Parameter // minus before numeric parameters
int bNegValue = false; int bNegValue = false;
if( '-' == nNextCh ) if( '-' == nNextCh )
{ {
@ -123,7 +123,7 @@ int SvRTFParser::_GetNextToken()
nNextCh = GetNextChar(); nNextCh = GetNextChar();
} }
// evt. Numerischer Parameter // possible numeric parameter
if( RTF_ISDIGIT( nNextCh ) ) if( RTF_ISDIGIT( nNextCh ) )
{ {
nTokenValue = 0; nTokenValue = 0;
@ -136,15 +136,15 @@ int SvRTFParser::_GetNextToken()
nTokenValue = -nTokenValue; nTokenValue = -nTokenValue;
bTokenHasValue=true; bTokenHasValue=true;
} }
else if( bNegValue ) // das Minus wieder zurueck else if( bNegValue ) // restore minus
{ {
nNextCh = '-'; nNextCh = '-';
rInput.SeekRel( -1 ); rInput.SeekRel( -1 );
} }
if( ' ' == nNextCh ) // Blank gehoert zum Token! if( ' ' == nNextCh ) // blank is part of token!
nNextCh = GetNextChar(); nNextCh = GetNextChar();
// suche das Token in der Tabelle: // search for the token in the table:
if( 0 == (nRet = GetRTFToken( aToken )) ) if( 0 == (nRet = GetRTFToken( aToken )) )
// Unknown Control // Unknown Control
nRet = RTF_UNKNOWNCONTROL; nRet = RTF_UNKNOWNCONTROL;
@ -196,7 +196,7 @@ int SvRTFParser::_GetNextToken()
if( '\\' == cAnsi && if( '\\' == cAnsi &&
'\'' == ( cAnsi = GetNextChar() )) '\'' == ( cAnsi = GetNextChar() ))
// HexValue ueberlesen // read on HexValue
cAnsi = GetHexValue(); cAnsi = GetHexValue();
nNextCh = GetNextChar(); nNextCh = GetNextChar();
} }
@ -208,7 +208,7 @@ int SvRTFParser::_GetNextToken()
} }
else if( SVPAR_PENDING != eState ) else if( SVPAR_PENDING != eState )
{ {
// Bug 34631 - "\ " ueberlesen - Blank als Zeichen // Bug 34631 - "\ " read on - Blank as character
// eState = SVPAR_ERROR; // eState = SVPAR_ERROR;
bNextCh = false; bNextCh = false;
} }
@ -266,7 +266,7 @@ int SvRTFParser::_GetNextToken()
break; break;
default: default:
// es folgt normaler Text // now normal text follows
ScanText(); ScanText();
nRet = RTF_TEXTTOKEN; nRet = RTF_TEXTTOKEN;
bNextCh = 0 == nNextCh; bNextCh = 0 == nNextCh;
@ -283,7 +283,7 @@ int SvRTFParser::_GetNextToken()
sal_Unicode SvRTFParser::GetHexValue() sal_Unicode SvRTFParser::GetHexValue()
{ {
// Hex-Wert sammeln // collect Hex values
int n; int n;
sal_Unicode nHexVal = 0; sal_Unicode nHexVal = 0;
@ -377,7 +377,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
case '\\': case '\\':
case '}': case '}':
case '{': case '{':
case '+': // habe ich in einem RTF-File gefunden case '+': // I found in a RTF file
aStrBuffer.append(nNextCh); aStrBuffer.append(nNextCh);
break; break;
case '~': // nonbreaking space case '~': // nonbreaking space
@ -391,7 +391,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
break; break;
case 'u': case 'u':
// UNI-Code Zeichen lesen // read UNI-Code characters
{ {
nNextCh = GetNextChar(); nNextCh = GetNextChar();
rInput.SeekRel( -2 ); rInput.SeekRel( -2 );
@ -433,7 +433,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
else else
{ {
nNextCh = '\\'; nNextCh = '\\';
bContinue = false; // Abbrechen, String zusammen bContinue = false; // abort, string together
} }
} }
break; break;
@ -441,7 +441,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
default: default:
rInput.SeekRel( -1 ); rInput.SeekRel( -1 );
nNextCh = '\\'; nNextCh = '\\';
bContinue = false; // Abbrechen, String zusammen bContinue = false; // abort, string together
break; break;
} }
} }
@ -449,7 +449,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
case sal_Unicode(EOF): case sal_Unicode(EOF):
eState = SVPAR_ERROR; eState = SVPAR_ERROR;
// weiter // continue
case '{': case '{':
case '}': case '}':
bContinue = false; bContinue = false;
@ -465,7 +465,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
else else
{ {
do { do {
// alle anderen Zeichen kommen in den Text // all other characters end up in the text
aStrBuffer.append(nNextCh); aStrBuffer.append(nNextCh);
if (sal_Unicode(EOF) == (nNextCh = GetNextChar())) if (sal_Unicode(EOF) == (nNextCh = GetNextChar()))
@ -546,15 +546,15 @@ SvParserState SvRTFParser::CallParser()
eState = SVPAR_WORKING; eState = SVPAR_WORKING;
nOpenBrakets = 0; nOpenBrakets = 0;
SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 ); SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 );
eUNICodeSet = RTL_TEXTENCODING_MS_1252; // default ist ANSI-CodeSet eUNICodeSet = RTL_TEXTENCODING_MS_1252; // default is ANSI-CodeSet
// die 1. beiden Token muessen '{' und \\rtf sein !! // the first two tokens should be '{' and \\rtf !!
if( '{' == GetNextToken() && RTF_RTF == GetNextToken() ) if( '{' == GetNextToken() && RTF_RTF == GetNextToken() )
{ {
AddRef(); AddRef();
Continue( 0 ); Continue( 0 );
if( SVPAR_PENDING != eState ) if( SVPAR_PENDING != eState )
ReleaseRef(); // dann brauchen wir den Parser nicht mehr! ReleaseRef(); // now parser is not needed anymore
} }
else else
eState = SVPAR_ERROR; eState = SVPAR_ERROR;
@ -565,7 +565,7 @@ SvParserState SvRTFParser::CallParser()
void SvRTFParser::Continue( int nToken ) void SvRTFParser::Continue( int nToken )
{ {
// DBG_ASSERT( SVPAR_CS_DONTKNOW == GetCharSet(), // DBG_ASSERT( SVPAR_CS_DONTKNOW == GetCharSet(),
// "Zeichensatz wurde geaendert." ); // "Characterset was changed." );
if( !nToken ) if( !nToken )
nToken = GetNextToken(); nToken = GetNextToken();
@ -582,7 +582,7 @@ void SvRTFParser::Continue( int nToken )
break; break;
case '{': case '{':
// eine unbekannte Gruppe ? // a unknown group ?
{ {
if( RTF_IGNOREFLAG != GetNextToken() ) if( RTF_IGNOREFLAG != GetNextToken() )
nToken = SkipToken( -1 ); nToken = SkipToken( -1 );
@ -590,18 +590,18 @@ void SvRTFParser::Continue( int nToken )
nToken = SkipToken( -2 ); nToken = SkipToken( -2 );
else else
{ {
// gleich herausfiltern // filter immediately
ReadUnknownData(); ReadUnknownData();
nToken = GetNextToken(); nToken = GetNextToken();
if( '}' != nToken ) if( '}' != nToken )
eState = SVPAR_ERROR; eState = SVPAR_ERROR;
break; // auf zum naechsten Token!! break; // move to next token!!
} }
} }
goto NEXTTOKEN; goto NEXTTOKEN;
case RTF_UNKNOWNCONTROL: case RTF_UNKNOWNCONTROL:
break; // unbekannte Token ueberspringen break; // skip unknown token
case RTF_NEXTTYPE: case RTF_NEXTTYPE:
case RTF_ANSITYPE: case RTF_ANSITYPE:
SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 ); SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 );
@ -625,8 +625,8 @@ NEXTTOKEN:
break; break;
} }
if( IsParserWorking() ) if( IsParserWorking() )
SaveState( 0 ); // bis hierhin abgearbeitet, SaveState( 0 ); // processed till here,
// weiter mit neuem Token! // continue with new token!
nToken = GetNextToken(); nToken = GetNextToken();
} }
if( SVPAR_ACCEPTED == eState && 0 < nOpenBrakets ) if( SVPAR_ACCEPTED == eState && 0 < nOpenBrakets )

View File

@ -25,7 +25,7 @@
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
// die Tabelle muss noch sortiert werden // the table is still to be sorted
struct RTF_TokenEntry struct RTF_TokenEntry
{ {
union{ union{
@ -35,7 +35,7 @@ struct RTF_TokenEntry
int nToken; int nToken;
}; };
// Flag: RTF-Token Tabelle wurde schon sortiert // Flag: RTF-token table has been sorted
static int bSortKeyWords = sal_False; static int bSortKeyWords = sal_False;
static RTF_TokenEntry aRTFTokenTab[] = { static RTF_TokenEntry aRTFTokenTab[] = {
@ -1077,7 +1077,7 @@ static RTF_TokenEntry aRTFTokenTab[] = {
{{OOO_STRING_SVTOOLS_RTF_NOOVERFLOW}, RTF_NOOVERFLOW}, {{OOO_STRING_SVTOOLS_RTF_NOOVERFLOW}, RTF_NOOVERFLOW},
{{OOO_STRING_SVTOOLS_RTF_ASPALPHA}, RTF_ASPALPHA}, {{OOO_STRING_SVTOOLS_RTF_ASPALPHA}, RTF_ASPALPHA},
// SWG spezifische Attribute // SWG specific attributes
{{OOO_STRING_SVTOOLS_RTF_GRFALIGNV}, RTF_GRF_ALIGNV}, {{OOO_STRING_SVTOOLS_RTF_GRFALIGNV}, RTF_GRF_ALIGNV},
{{OOO_STRING_SVTOOLS_RTF_GRFALIGNH}, RTF_GRF_ALIGNH}, {{OOO_STRING_SVTOOLS_RTF_GRFALIGNH}, RTF_GRF_ALIGNH},
{{OOO_STRING_SVTOOLS_RTF_GRFMIRROR}, RTF_GRF_MIRROR}, {{OOO_STRING_SVTOOLS_RTF_GRFMIRROR}, RTF_GRF_MIRROR},
@ -1094,7 +1094,7 @@ static RTF_TokenEntry aRTFTokenTab[] = {
{{OOO_STRING_SVTOOLS_RTF_PRTDATA}, RTF_SWG_PRTDATA}, {{OOO_STRING_SVTOOLS_RTF_PRTDATA}, RTF_SWG_PRTDATA},
{{OOO_STRING_SVTOOLS_RTF_BKMKKEY}, RTF_BKMK_KEY}, {{OOO_STRING_SVTOOLS_RTF_BKMKKEY}, RTF_BKMK_KEY},
// Attribute fuer die freifliegenden Rahmen // Attributes for fly frames
{{OOO_STRING_SVTOOLS_RTF_FLYPRINT}, RTF_FLYPRINT}, {{OOO_STRING_SVTOOLS_RTF_FLYPRINT}, RTF_FLYPRINT},
{{OOO_STRING_SVTOOLS_RTF_FLYOPAQUE}, RTF_FLYOPAQUE}, {{OOO_STRING_SVTOOLS_RTF_FLYOPAQUE}, RTF_FLYOPAQUE},
{{OOO_STRING_SVTOOLS_RTF_FLYPRTCTD}, RTF_FLYPRTCTD}, {{OOO_STRING_SVTOOLS_RTF_FLYPRTCTD}, RTF_FLYPRTCTD},

View File

@ -166,7 +166,7 @@ SvStream& RTFOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLe
if( nLen >= sizeof(aNToABuf) ) if( nLen >= sizeof(aNToABuf) )
nLen = (sizeof(aNToABuf)-1); nLen = (sizeof(aNToABuf)-1);
// Pointer an das Bufferende setzen // set pointer to end of buffer
sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-1); sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-1);
for( sal_uInt8 n = 0; n < nLen; ++n ) for( sal_uInt8 n = 0; n < nLen; ++n )
{ {

View File

@ -24,19 +24,18 @@
#include <rtl/textcvt.h> #include <rtl/textcvt.h>
#include <rtl/tencinfo.h> #include <rtl/tencinfo.h>
// Struktur, um sich die akt. Daten zumerken // structure to store the actuel data
struct SvParser_Impl struct SvParser_Impl
{ {
OUString aToken; // gescanntes Token OUString aToken; // gescanntes Token
sal_uLong nFilePos; // akt. Position im Stream sal_uLong nFilePos; // actual position in stream
sal_uLong nlLineNr; // akt. Zeilen Nummer sal_uLong nlLineNr; // actual line number
sal_uLong nlLinePos; // akt. Spalten Nummer sal_uLong nlLinePos; // actual column number
long nTokenValue; // zusaetzlicher Wert (RTF) long nTokenValue; // extra value (RTF)
sal_Bool bTokenHasValue; // indicates whether nTokenValue is valid sal_Bool bTokenHasValue; // indicates whether nTokenValue is valid
int nToken; // akt. Token int nToken; // actual Token
sal_Unicode nNextCh; // akt. Zeichen sal_Unicode nNextCh; // actual character
int nSaveToken; // the token from Continue
int nSaveToken; // das Token vom Continue
rtl_TextToUnicodeConverter hConv; rtl_TextToUnicodeConverter hConv;
rtl_TextToUnicodeContext hContext; rtl_TextToUnicodeContext hContext;
@ -50,7 +49,7 @@ struct SvParser_Impl
// Konstruktor // Construktor
SvParser::SvParser( SvStream& rIn, sal_uInt8 nStackSize ) SvParser::SvParser( SvStream& rIn, sal_uInt8 nStackSize )
: rInput( rIn ) : rInput( rIn )
, nlLineNr( 1 ) , nlLineNr( 1 )
@ -382,8 +381,8 @@ int SvParser::GetNextToken()
if( !nTokenStackPos ) if( !nTokenStackPos )
{ {
aToken = ""; // Token-Buffer loeschen aToken = ""; // empty token buffer
nTokenValue = -1; // Kennzeichen fuer kein Value gelesen nTokenValue = -1; // marker for no value read
bTokenHasValue = false; bTokenHasValue = false;
nRet = _GetNextToken(); nRet = _GetNextToken();
@ -395,7 +394,7 @@ int SvParser::GetNextToken()
if( pTokenStackPos == pTokenStack + nTokenStackSize ) if( pTokenStackPos == pTokenStack + nTokenStackSize )
pTokenStackPos = pTokenStack; pTokenStackPos = pTokenStack;
// vom Stack holen ?? // pop from stack ??
if( nTokenStackPos ) if( nTokenStackPos )
{ {
--nTokenStackPos; --nTokenStackPos;
@ -404,7 +403,7 @@ int SvParser::GetNextToken()
aToken = pTokenStackPos->sToken; aToken = pTokenStackPos->sToken;
nRet = pTokenStackPos->nTokenId; nRet = pTokenStackPos->nTokenId;
} }
// nein, dann das aktuelle auf den Stack // no, now push actual value on stack
else if( SVPAR_WORKING == eState ) else if( SVPAR_WORKING == eState )
{ {
pTokenStackPos->sToken = aToken; pTokenStackPos->sToken = aToken;
@ -413,12 +412,12 @@ int SvParser::GetNextToken()
pTokenStackPos->nTokenId = nRet; pTokenStackPos->nTokenId = nRet;
} }
else if( SVPAR_ACCEPTED != eState && SVPAR_PENDING != eState ) else if( SVPAR_ACCEPTED != eState && SVPAR_PENDING != eState )
eState = SVPAR_ERROR; // irgend ein Fehler eState = SVPAR_ERROR; // an error occured
return nRet; return nRet;
} }
int SvParser::SkipToken( short nCnt ) // n Tokens zurueck "skippen" int SvParser::SkipToken( short nCnt ) // "skip" n Tokens backward
{ {
pTokenStackPos = GetStackPtr( nCnt ); pTokenStackPos = GetStackPtr( nCnt );
short nTmp = nTokenStackPos - nCnt; short nTmp = nTokenStackPos - nCnt;
@ -428,7 +427,7 @@ int SvParser::SkipToken( short nCnt ) // n Tokens zurueck "skippen"
nTmp = nTokenStackSize; nTmp = nTokenStackSize;
nTokenStackPos = sal_uInt8(nTmp); nTokenStackPos = sal_uInt8(nTmp);
// und die Werte zurueck // restore values
aToken = pTokenStackPos->sToken; aToken = pTokenStackPos->sToken;
nTokenValue = pTokenStackPos->nTokenValue; nTokenValue = pTokenStackPos->nTokenValue;
bTokenHasValue = pTokenStackPos->bTokenHasValue; bTokenHasValue = pTokenStackPos->bTokenHasValue;
@ -462,13 +461,13 @@ SvParser::TokenStackType* SvParser::GetStackPtr( short nCnt )
return pTokenStack + nAktPos; return pTokenStack + nAktPos;
} }
// wird fuer jedes Token gerufen, das in CallParser erkannt wird // is called for each token which is recognised by CallParser
void SvParser::NextToken( int ) void SvParser::NextToken( int )
{ {
} }
// fuers asynchrone lesen aus dem SvStream // to read asynchronous from SvStream
int SvParser::GetSaveToken() const int SvParser::GetSaveToken() const
{ {
@ -477,7 +476,7 @@ int SvParser::GetSaveToken() const
void SvParser::SaveState( int nToken ) void SvParser::SaveState( int nToken )
{ {
// aktuellen Status merken // save actual status
if( !pImplData ) if( !pImplData )
{ {
pImplData = new SvParser_Impl; pImplData = new SvParser_Impl;
@ -497,7 +496,7 @@ void SvParser::SaveState( int nToken )
void SvParser::RestoreState() void SvParser::RestoreState()
{ {
// alten Status wieder zurueck setzen // restore old status
if( pImplData ) if( pImplData )
{ {
if( ERRCODE_IO_PENDING == rInput.GetError() ) if( ERRCODE_IO_PENDING == rInput.GetError() )
@ -531,19 +530,19 @@ void SvParser::BuildWhichTbl( std::vector<sal_uInt16> &rWhichMap,
aNewRange[0] = aNewRange[1] = *pWhichIds; aNewRange[0] = aNewRange[1] = *pWhichIds;
sal_Bool bIns = sal_True; sal_Bool bIns = sal_True;
// Position suchen // search position
for ( sal_uInt16 nOfs = 0; rWhichMap[nOfs]; nOfs += 2 ) for ( sal_uInt16 nOfs = 0; rWhichMap[nOfs]; nOfs += 2 )
{ {
if( *pWhichIds < rWhichMap[nOfs] - 1 ) if( *pWhichIds < rWhichMap[nOfs] - 1 )
{ {
// neuen Range davor // new range before
rWhichMap.insert( rWhichMap.begin() + nOfs, aNewRange, aNewRange + 2 ); rWhichMap.insert( rWhichMap.begin() + nOfs, aNewRange, aNewRange + 2 );
bIns = sal_False; bIns = sal_False;
break; break;
} }
else if( *pWhichIds == rWhichMap[nOfs] - 1 ) else if( *pWhichIds == rWhichMap[nOfs] - 1 )
{ {
// diesen Range nach unten erweitern // extend range downwards
rWhichMap[nOfs] = *pWhichIds; rWhichMap[nOfs] = *pWhichIds;
bIns = sal_False; bIns = sal_False;
break; break;
@ -552,20 +551,20 @@ void SvParser::BuildWhichTbl( std::vector<sal_uInt16> &rWhichMap,
{ {
if( rWhichMap[nOfs+2] != 0 && rWhichMap[nOfs+2] == *pWhichIds + 1 ) if( rWhichMap[nOfs+2] != 0 && rWhichMap[nOfs+2] == *pWhichIds + 1 )
{ {
// mit dem naechsten Bereich mergen // merge with next field
rWhichMap[nOfs+1] = rWhichMap[nOfs+3]; rWhichMap[nOfs+1] = rWhichMap[nOfs+3];
rWhichMap.erase( rWhichMap.begin() + nOfs + 2, rWhichMap.erase( rWhichMap.begin() + nOfs + 2,
rWhichMap.begin() + nOfs + 4 ); rWhichMap.begin() + nOfs + 4 );
} }
else else
// diesen Range nach oben erweitern // extend range upwards
rWhichMap[nOfs+1] = *pWhichIds; rWhichMap[nOfs+1] = *pWhichIds;
bIns = sal_False; bIns = sal_False;
break; break;
} }
} }
// einen Range hinten anhaengen // append range
if( bIns ) if( bIns )
{ {
rWhichMap.insert( rWhichMap.begin() + rWhichMap.size() - 1, rWhichMap.insert( rWhichMap.begin() + rWhichMap.size() - 1,
@ -580,8 +579,8 @@ IMPL_STATIC_LINK( SvParser, NewDataRead, void*, EMPTYARG )
switch( pThis->eState ) switch( pThis->eState )
{ {
case SVPAR_PENDING: case SVPAR_PENDING:
// Wenn gerade ein File geladen wird duerfen wir nicht weiterlaufen, // if file is loaded we are not allowed to continue
// sondern muessen den Aufruf ignorieren. // instead should ignore the call.
if( pThis->IsDownloadingFile() ) if( pThis->IsDownloadingFile() )
break; break;
@ -594,7 +593,7 @@ IMPL_STATIC_LINK( SvParser, NewDataRead, void*, EMPTYARG )
pThis->rInput.ResetError(); pThis->rInput.ResetError();
if( SVPAR_PENDING != pThis->eState ) if( SVPAR_PENDING != pThis->eState )
pThis->ReleaseRef(); // ansonsten sind wir fertig! pThis->ReleaseRef(); // ready otherwise!
break; break;
case SVPAR_WAITFORDATA: case SVPAR_WAITFORDATA:
@ -606,7 +605,7 @@ IMPL_STATIC_LINK( SvParser, NewDataRead, void*, EMPTYARG )
break; break;
default: default:
pThis->ReleaseRef(); // ansonsten sind wir fertig! pThis->ReleaseRef(); // ready otherwise!
break; break;
} }

View File

@ -621,8 +621,8 @@ void VCLXFileControl::setText( const OUString& aText ) throw(::com::sun::star::u
{ {
pWindow->SetText( aText ); pWindow->SetText( aText );
// In JAVA wird auch ein textChanged ausgeloest, in VCL nicht. // also in Java a textChanged is triggered, not in VCL.
// ::com::sun::star::awt::Toolkit soll JAVA-komform sein... // ::com::sun::star::awt::Toolkit should be JAVA-compliant...
ModifyHdl( NULL ); ModifyHdl( NULL );
} }
} }
@ -1245,7 +1245,7 @@ void SVTXFormattedField::SetTreatAsNumber(sal_Bool bSet)
} }
else else
{ {
if (!pField->GetText().isEmpty()) // empty wird erst mal standardmaessig als void nach draussen gereicht if (!pField->GetText().isEmpty()) // empty is returned as void by default
aReturn <<= pField->GetValue(); aReturn <<= pField->GetValue();
} }
@ -1313,7 +1313,7 @@ void SVTXFormattedField::setFormatsSupplier(const ::com::sun::star::uno::Referen
} }
if (!pNew) if (!pNew)
return; // TODO : wie das behandeln ? return; // TODO : how to process ?
if (m_pCurrentSupplier) if (m_pCurrentSupplier)
m_pCurrentSupplier->release(); m_pCurrentSupplier->release();
@ -1321,7 +1321,7 @@ void SVTXFormattedField::setFormatsSupplier(const ::com::sun::star::uno::Referen
m_pCurrentSupplier->acquire(); m_pCurrentSupplier->acquire();
if (pField) if (pField)
{ {
// den aktuellen Value mit hinueberretten // save the actual value
::com::sun::star::uno::Any aCurrent = GetValue(); ::com::sun::star::uno::Any aCurrent = GetValue();
pField->SetFormatter(m_pCurrentSupplier->GetNumberFormatter(), sal_False); pField->SetFormatter(m_pCurrentSupplier->GetNumberFormatter(), sal_False);
if (nKeyToSetDelayed != -1) if (nKeyToSetDelayed != -1)
@ -1350,9 +1350,10 @@ void SVTXFormattedField::setFormatKey(sal_Int32 nKey)
if (pField->GetFormatter()) if (pField->GetFormatter())
pField->SetFormatKey(nKey); pField->SetFormatKey(nKey);
else else
{ // Wahrscheinlich bin ich gerade in einem Block, in dem erst der Key und dann der Formatter gesetzt {
// wird, das passiert initial mit ziemlicher Sicherheit, da die Properties in alphabetischer Reihenfolge // probably I am in a block, in which first the key and next the formatter will be set,
// gesetzt werden, und der FormatsSupplier nun mal vor dem FormatKey kommt // initially this happens quite certain, as the properties are set in alphabettic sequence,
// and the FormatsSupplier is processed before the FormatKey
nKeyToSetDelayed = nKey; nKeyToSetDelayed = nKey;
} }
NotifyTextListeners(); NotifyTextListeners();