From ad68e47b740498a80c5802e1672022221f196c22 Mon Sep 17 00:00:00 2001 From: Philipp Weissenbacher Date: Tue, 12 Jun 2012 15:18:03 +0200 Subject: Translate German comments, fix some spelling errors Change-Id: I2a4cc2c903f469898df9c739658ce25523199fbb --- sw/source/filter/ascii/ascatr.cxx | 18 ++++++++---------- sw/source/filter/ascii/parasc.cxx | 37 ++++++++++++++++++------------------- sw/source/filter/ascii/wrtasc.cxx | 31 +++++++++++++++---------------- sw/source/filter/ascii/wrtasc.hxx | 2 +- 4 files changed, 42 insertions(+), 46 deletions(-) diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 9682ada54edf..5ca0aa8bbfd2 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -46,8 +46,8 @@ #include /* - * Dieses File enthaelt alle Ausgabe-Funktionen des ASCII-Writers; - * fuer alle Nodes, Attribute, Formate und Chars. + * This file contains all output functions of the ASCII-Writer; + * For all nodes, attributes, formats and chars. */ class SwASC_AttrIter @@ -82,9 +82,8 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos ) const SwpHints* pTxtAttrs = rNd.GetpSwpHints(); if( pTxtAttrs ) { -// kann noch optimiert werden, wenn ausgenutzt wird, dass die TxtAttrs -// nach der Anfangsposition geordnet sind. Dann muessten -// allerdings noch 2 Indices gemerkt werden +// TODO: This can be optimized, if we make use of the fact that the TxtAttrs +// are sorted by starting position. We would need to remember two indices, however. for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); i++ ) { const SwTxtAttr* pHt = (*pTxtAttrs)[i]; @@ -151,7 +150,7 @@ sal_Bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos ) //------------------------ -/* Ausgabe der Nodes */ +// Output of the node //------------------------ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) @@ -210,10 +209,9 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) } /* - * lege hier jetzt die Tabellen fuer die ASCII-Funktions-Pointer auf - * die Ausgabe-Funktionen an. - * Es sind lokale Strukturen, die nur innerhalb der ASCII-DLL - * bekannt sein muessen. + * Create the table for the ASCII function pointers to the output + * functon. + * There are local structures that only need to be known to the ASCII DLL. */ SwNodeFnTab aASCNodeFnTab = { diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 807f78b40477..40ff5d7663de 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -45,7 +45,7 @@ #include #include #include -#include // ResId fuer Statusleiste +#include // ResId for the status bar #include // ...Percent() #include @@ -77,17 +77,17 @@ public: }; -// Aufruf fuer die allg. Reader-Schnittstelle +// Call for the general reader interface sal_uLong AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String & ) { if( !pStrm ) { - OSL_ENSURE( !this, "ASCII-Read ohne Stream" ); + OSL_ENSURE( !this, "ASCII read without a stream" ); return ERR_SWG_READ_ERROR; } - // Alle Ueberschriften sind normalerweise ohne Kapitelnummer. - // Darum hier explizit abschalten weil das Default jetzt wieder auf AN ist. + // All headers normally do not have a chapter number. + // We explicitly disable them here, because the default is set back to on. if( !bInsertMode ) Reader::SetNoOutlineNum( rDoc ); @@ -145,7 +145,7 @@ SwASCIIParser::~SwASCIIParser() } -// Aufruf des Parsers +// Calling the parser sal_uLong SwASCIIParser::CallParser() { rInput.Seek(STREAM_SEEK_TO_END); @@ -205,12 +205,12 @@ sal_uLong SwASCIIParser::CallParser() { // Using the pool defaults for the font causes significant // trouble for the HTML filter, because it is not able - // to export the pool defaults (or to be more precice: + // to export the pool defaults (or to be more precise: // the HTML filter is not able to detect whether a pool // default has changed or not. Even a comparison with the // HTMLi template does not work, because the defaults are // not copied when a new doc is created. The result of - // comparing pool defaults therfor would be that the + // comparing pool defaults therefor would be that the // defaults are exported always if the have changed for // text documents in general. That's not sensible, as well // as it is not sensible to export them always. @@ -296,7 +296,7 @@ sal_uLong SwASCIIParser::ReadChars() if( currentCharSet == RTL_TEXTENCODING_DONTKNOW ) currentCharSet = RTL_TEXTENCODING_ASCII_US; hConverter = rtl_createTextToUnicodeConverter( currentCharSet ); - OSL_ENSURE( hConverter, "no string convert avaiable" ); + OSL_ENSURE( hConverter, "no string convert available" ); if (!hConverter) return ERROR_SW_READ_BASE; bSwapUnicode = false; @@ -317,12 +317,12 @@ sal_uLong SwASCIIParser::ReadChars() if( pLastStt != pStt ) InsertText( String( pLastStt )); - // lese einen neuen Block ein + // Read a new block sal_uLong lGCount; if( SVSTREAM_OK != rInput.GetError() || 0 == (lGCount = rInput.Read( pArr + nArrOffset, ASC_BUFFLEN - nArrOffset ))) - break; // aus der WHILE-Schleife heraus + break; // break from the while loop /* If there was some unconverted bytes on the last cycle then they @@ -383,7 +383,7 @@ sal_uLong SwASCIIParser::ReadChars() pLastStt = ++pStt; cLastCR = 0; nLineLen = 0; - // das letze am Ende nehmen wir nicht + // We skip the last one at the end if( !rInput.IsEof() || !(pEnd == pStt || ( !*pEnd && pEnd == pStt+1 ) ) ) pDoc->SplitNode( *pPam->GetPoint(), false ); @@ -400,7 +400,7 @@ sal_uLong SwASCIIParser::ReadChars() *pStt = 0; ++pStt; - // das letze am Ende nehmen wir nicht + // We skip the last one at the end if( !rInput.IsEof() || pEnd != pStt ) bSplitNode = true; } @@ -426,7 +426,7 @@ sal_uLong SwASCIIParser::ReadChars() else bChkSplit = true; - // das letze am Ende nehmen wir nicht + // We skip the last one at the end if( bChkSplit && ( !rInput.IsEof() || pEnd != pStt )) bSplitNode = true; } @@ -434,7 +434,7 @@ sal_uLong SwASCIIParser::ReadChars() case 0x0c: { - // dann mal einen harten Seitenumbruch einfuegen + // Insert a hard page break *pStt++ = 0; if( nLineLen ) { @@ -453,14 +453,14 @@ sal_uLong SwASCIIParser::ReadChars() if( nReadCnt == nFileSize && pStt+1 == pEnd ) *pStt = 0; else - *pStt = '#'; // Ersatzdarstellung + *pStt = '#'; // Replacement visualisation break; case '\t': break; default: if( ' ' > *pStt ) - // Ctrl-Zchn gefunden ersetze durch '#' + // Found control char, replace with '#' *pStt = '#'; break; } @@ -483,8 +483,7 @@ sal_uLong SwASCIIParser::ReadChars() } else if( bSplitNode ) { - // es wurde ein CR/LF erkannt, also speichere den Text - + // We found a CR/LF, thus save the text InsertText( String( pLastStt )); pDoc->SplitNode( *pPam->GetPoint(), false ); pLastStt = pStt; diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index 5699f66b3732..f56406ee06a2 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -38,7 +38,7 @@ #include #include -#include // ResId fuer Statusleiste +#include // ResId for status bar //----------------------------------------------------------------- @@ -98,7 +98,7 @@ sal_uLong SwASCWriter::WriteStream() { sal_Char cLineEnd[ 3 ]; sal_Char* pCEnd = cLineEnd; - if( bASCII_ParaAsCR ) // falls vorgegeben ist. + if( bASCII_ParaAsCR ) // If predefined *pCEnd++ = '\015'; else if( bASCII_ParaAsBlanc ) *pCEnd++ = ' '; @@ -127,7 +127,7 @@ sal_uLong SwASCWriter::WriteStream() rtl_TextEncoding eOld = Strm().GetStreamCharSet(); Strm().SetStreamCharSet( GetAsciiOptions().GetCharSet() ); - // gebe alle Bereich des Pams in das ASC-File aus. + // Output all areas of the pam into the ASC file do { sal_Bool bTstFly = sal_True; while( pCurPam->GetPoint()->nNode.GetIndex() < pCurPam->GetMark()->nNode.GetIndex() || @@ -137,23 +137,22 @@ sal_uLong SwASCWriter::WriteStream() SwTxtNode* pNd = pCurPam->GetPoint()->nNode.GetNode().GetTxtNode(); if( pNd ) { - // sollten nur Rahmen vorhanden sein? - // (Moeglich, wenn Rahmen-Selektion ins Clipboard - // gestellt wurde) + // Should we have frames only? + // That's possible, if we put a frame selection into the clipboard if( bTstFly && bWriteAll && - // keine Laenge + // No length !pNd->GetTxt().Len() && - // Rahmen vorhanden + // Frame exists pDoc->GetSpzFrmFmts()->Count() && - // nur ein Node im Array + // Only one node in the array pDoc->GetNodes().GetEndOfExtras().GetIndex() + 3 == pDoc->GetNodes().GetEndOfContent().GetIndex() && - // und genau der ist selektiert + // And exactly this one is selected pDoc->GetNodes().GetEndOfContent().GetIndex() - 1 == pCurPam->GetPoint()->nNode.GetIndex() ) { - // dann den Inhalt vom Rahmen ausgeben. - // dieser steht immer an Position 0 !! + // Print the frame's content. + // It is always at position 0! SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[ 0 ]; const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); if( pIdx ) @@ -162,7 +161,7 @@ sal_uLong SwASCWriter::WriteStream() pCurPam = NewSwPaM( *pDoc, pIdx->GetIndex(), pIdx->GetNode().EndOfSectionIndex() ); pCurPam->Exchange(); - continue; // while-Schleife neu aufsetzen !! + continue; // reset while loop! } } else @@ -189,7 +188,7 @@ sal_uLong SwASCWriter::WriteStream() } Out( aASCNodeFnTab, *pNd, *this ); } - bTstFly = sal_False; // eimal Testen reicht + bTstFly = sal_False; // Testing once is enough } if( !pCurPam->Move( fnMoveForward, fnGoNode ) ) @@ -197,10 +196,10 @@ sal_uLong SwASCWriter::WriteStream() if( bShowProgress ) ::SetProgressState( pCurPam->GetPoint()->nNode.GetIndex(), - pDoc->GetDocShell() ); // Wie weit ? + pDoc->GetDocShell() ); // How far? } - } while( CopyNextPam( &pPam ) ); // bis alle Pam bearbeitet + } while( CopyNextPam( &pPam ) ); // Until all pams are processed Strm().SetStreamCharSet( eOld ); diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx index c073dddbc337..be09d35ee313 100644 --- a/sw/source/filter/ascii/wrtasc.hxx +++ b/sw/source/filter/ascii/wrtasc.hxx @@ -34,7 +34,7 @@ extern SwNodeFnTab aASCNodeFnTab; -// der ASC-Writer +// The ASC writer class SwASCWriter : public Writer { -- cgit