[Libreoffice-commits] .: 2 commits - sw/source

Philipp Weissenbacher p.weissenbacher at kemper.freedesktop.org
Tue Jun 12 06:18:27 PDT 2012


 sw/source/core/tox/tox.cxx        |   30 ++++++++--------
 sw/source/core/tox/toxhlp.cxx     |   12 +++---
 sw/source/core/tox/txmsrt.cxx     |   70 +++++++++++++++++---------------------
 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 -
 7 files changed, 96 insertions(+), 104 deletions(-)

New commits:
commit ad68e47b740498a80c5802e1672022221f196c22
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date:   Tue Jun 12 15:18:03 2012 +0200

    Translate German comments, fix some spelling errors
    
    Change-Id: I2a4cc2c903f469898df9c739658ce25523199fbb

diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 9682ada..5ca0aa8 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -46,8 +46,8 @@
 #include <ftninfo.hxx>
 
 /*
- * 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 807f78b..40ff5d7 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -45,7 +45,7 @@
 #include <pagedesc.hxx>
 #include <breakit.hxx>
 #include <swerror.h>
-#include <statstr.hrc>          // ResId fuer Statusleiste
+#include <statstr.hrc>          // ResId for the status bar
 #include <mdiexp.hxx>           // ...Percent()
 #include <poolfmt.hxx>
 
@@ -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 5699f66..f56406e 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -38,7 +38,7 @@
 #include <frmfmt.hxx>
 #include <wrtasc.hxx>
 
-#include <statstr.hrc>          // ResId fuer Statusleiste
+#include <statstr.hrc>          // 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 c073ddd..be09d35 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
 {
commit 5836cd33b60c574489fe0b46a671db76d3ca547b
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date:   Thu Jun 7 13:33:49 2012 +0200

    Translate German comments
    
    Change-Id: I96606cc97afb4fab6af45b116c265b1b3c584e00

diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 06a3ef8..3731435 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -155,7 +155,7 @@ SwFormTokens lcl_GetAuthPattern(sal_uInt16 nTypeId)
     return aRet;
 }
 /*--------------------------------------------------------------------
-     Beschreibung:  Verzeichnis-Markierungen D/Ctor
+     TOX dtor and ctor
  --------------------------------------------------------------------*/
 
 
@@ -211,7 +211,7 @@ void SwTOXMark::RegisterToTOXType( SwTOXType& rMark )
 
 int SwTOXMark::operator==( const SfxPoolItem& rAttr ) const
 {
-    OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
+    OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "Attributes are not the same" );
     return GetRegisteredIn() == ((SwTOXMark&)rAttr).GetRegisteredIn();
 }
 
@@ -246,7 +246,7 @@ String SwTOXMark::GetText() const
     else if( pTxtAttr && pTxtAttr->GetpTxtNd() )
     {
         xub_StrLen* pEndIdx = pTxtAttr->GetEnd();
-        OSL_ENSURE( pEndIdx, "TOXMark ohne Mark!!");
+        OSL_ENSURE( pEndIdx, "TOXMark without mark!");
         if( pEndIdx )
         {
             const xub_StrLen nStt = *pTxtAttr->GetStart();
@@ -269,7 +269,7 @@ void SwTOXMark::InsertTOXMarks( SwTOXMarks& aMarks, const SwTOXType& rType )
 }
 
 /*--------------------------------------------------------------------
-     Beschreibung: Typen von Verzeichnissen verwalten
+  Manage types of TOX
  --------------------------------------------------------------------*/
 
 SwTOXType::SwTOXType( TOXTypes eTyp, const String& rName )
@@ -288,7 +288,7 @@ SwTOXType::SwTOXType(const SwTOXType& rCopy)
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung: Formen bearbeiten
+    Edit forms
   --------------------------------------------------------------------*/
 
 SwForm::SwForm( TOXTypes eTyp ) // #i21237#
@@ -300,10 +300,10 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
     bGenerateTabPos = sal_False;
     bIsRelTabPos = sal_True;
 
-    // Inhaltsverzeichnis hat entsprechend Anzahl Headlines + Ueberschrift
-    // Benutzer hat 10 Ebenen + Ueberschrift
-    // Stichwort hat 3 Ebenen + Ueberschrift + Trenner
-    // indexes of tables, objects illustrations and authorities consist of a heading and one level
+    // The table of contents has a certain number of headlines + headings
+    // The user has 10 levels + headings
+    // Keyword has 3 levels + headings Ueberschrift + seperator
+    // Indexes of tables, object illustrations and authorities consist of a heading and one level
 
     sal_uInt16 nPoolId;
     switch( eType )
@@ -316,7 +316,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
     case TOX_TABLES       : nPoolId = STR_POOLCOLL_TOX_TABLESH; break;
     case TOX_AUTHORITIES  : nPoolId = STR_POOLCOLL_TOX_AUTHORITIESH;    break;
     default:
-        OSL_ENSURE( !this, "ungueltiger TOXTyp");
+        OSL_ENSURE( !this, "invalid TOXTyp");
         return ;
     }
 
@@ -371,7 +371,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
         }
     }
     else
-        for( sal_uInt16 i = 1; i < GetFormMax(); ++i, ++nPoolId )    // Nr 0 ist der Titel
+        for( sal_uInt16 i = 1; i < GetFormMax(); ++i, ++nPoolId )    // Number 0 is the title
         {
             if(TOX_AUTHORITIES == eType)
                 SetPattern(i, lcl_GetAuthPattern(i));
@@ -510,7 +510,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237
     }
 }
 /*--------------------------------------------------------------------
-     Beschreibung: Ctor TOXBase
+  Ctor TOXBase
  --------------------------------------------------------------------*/
 
 
@@ -597,7 +597,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
 }
 
 /*--------------------------------------------------------------------
-     Beschreibung: Verzeichnisspezifische Funktionen
+  TOX specific functions
  --------------------------------------------------------------------*/
 
 SwTOXBase::~SwTOXBase()
@@ -703,7 +703,7 @@ String SwFormToken::GetString() const
     else if(TOKEN_CHAPTER_INFO == eTokenType)
     {
         sRet += String::CreateFromInt32( nChapterFormat );
-//add maximum permetted level
+        // add maximum permitted level
         sRet += ',';
         sRet += String::CreateFromInt32( nOutlineLevel );
     }
@@ -723,7 +723,7 @@ String SwFormToken::GetString() const
     else if(TOKEN_ENTRY_NO == eTokenType)
     {
         sRet += String::CreateFromInt32( nChapterFormat );
-//add maximum permitted level
+        // add maximum permitted level
         sRet += ',';
         sRet += String::CreateFromInt32( nOutlineLevel );
     }
diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index 970cb29..e1a3140 100644
--- a/sw/source/core/tox/toxhlp.cxx
+++ b/sw/source/core/tox/toxhlp.cxx
@@ -60,7 +60,7 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper()
         )
     {
 #if OSL_DEBUG_LEVEL > 0
-        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("IndexEntrySupplierWrapper: Exception caught\n"));
+        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("IndexEntrySupplierWrapper: Caught exception\n"));
         aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
         OSL_FAIL( aMsg.getStr() );
 #endif
@@ -86,7 +86,7 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String& rTxt,
         )
     {
 #if OSL_DEBUG_LEVEL > 0
-        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("getIndexKey: Exception caught\n"));
+        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("getIndexKey: Caught exception\n"));
         aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
         OSL_FAIL( aMsg.getStr() );
 #endif
@@ -107,7 +107,7 @@ String IndexEntrySupplierWrapper::GetFollowingText( sal_Bool bMorePages ) const
         )
     {
 #if OSL_DEBUG_LEVEL > 0
-        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("getIndexFollowPageWord: Exception caught\n"));
+        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("getIndexFollowPageWord: Caught exception\n"));
         aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
         OSL_FAIL( aMsg.getStr() );
 #endif
@@ -130,7 +130,7 @@ IndexEntrySupplierWrapper::GetAlgorithmList( const ::com::sun::star::lang::Local
         )
     {
 #if OSL_DEBUG_LEVEL > 0
-        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("getAlgorithmList: Exception caught\n"));
+        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("getAlgorithmList: Caught exception\n"));
         aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
         OSL_FAIL( aMsg.getStr() );
 #endif
@@ -153,7 +153,7 @@ sal_Bool IndexEntrySupplierWrapper::LoadAlgorithm(
         )
     {
 #if OSL_DEBUG_LEVEL > 0
-        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("loadAlgorithm: Exception caught\n"));
+        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("loadAlgorithm: Caught exception\n"));
         aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
         OSL_FAIL( aMsg.getStr() );
 #endif
@@ -179,7 +179,7 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry(
         )
     {
 #if OSL_DEBUG_LEVEL > 0
-        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("compareIndexEntry: Exception caught\n"));
+        rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("compareIndexEntry: Caught exception\n"));
         aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
         OSL_FAIL( aMsg.getStr() );
 #endif
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index e6f18c1..a515b16 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using ::rtl::OUString;
 /*--------------------------------------------------------------------
-    Beschreibung: Strings initialisieren
+  Initialize strings
  --------------------------------------------------------------------*/
 
 sal_uInt16 SwTOXSortTabBase::nOpt = 0;
@@ -140,7 +140,7 @@ String SwTOXInternational::GetFollowingText( sal_Bool bMorePages ) const
 }
 
 /*--------------------------------------------------------------------
-     Beschreibung:  SortierElement fuer Verzeichniseintraege
+  SortElement for TOX entries
  --------------------------------------------------------------------*/
 
 
@@ -170,11 +170,11 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
         case TOX_SORT_CONTENT:
         case TOX_SORT_PARA:
         case TOX_SORT_TABLE:
-            // falls sie in Sonderbereichen stehen, sollte man die
-            // Position im Body besorgen
+            // If they are in a special areas, we should get the position at the
+            // body
             if( nPos < pNd->GetNodes().GetEndOfExtras().GetIndex() )
             {
-                // dann die "Anker" (Body) Position holen.
+                // Then get the 'anchor' (body) position
                 Point aPt;
                 const SwCntntFrm* pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), &aPt, 0, sal_False );
                 if( pFrm )
@@ -226,8 +226,8 @@ sal_Bool SwTOXSortTabBase::operator==( const SwTOXSortTabBase& rCmp )
 
         if( bRet )
         {
-            // beide Pointer vorhanden -> vergleiche Text
-            // beide Pointer nicht vorhanden -> vergleiche AlternativText
+            // Both pointers exist -> compare text
+            // else -> compare AlternativeText
             const xub_StrLen *pEnd  = pTxtMark->GetEnd(),
                                 *pEndCmp = rCmp.pTxtMark->GetEnd();
 
@@ -282,8 +282,8 @@ sal_Bool SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
                         String sOtherTxtReading;
                         rCmp.GetTxt( sOtherTxt, sOtherTxtReading );
 
-                        // beide Pointer vorhanden -> vergleiche Text
-                        // beide Pointer nicht vorhanden -> vergleiche AlternativText
+                        // Both pointers exist -> compare text
+                        // else -> compare AlternativeText
                         if( ( pEnd && pEndCmp ) || ( !pEnd && !pEndCmp ) )
                             pTOXIntl->IsEqual( sMyTxt, sMyTxtReading, GetLocale(),
                                                sOtherTxt, sOtherTxtReading, rCmp.GetLocale() );
@@ -303,7 +303,7 @@ sal_Bool SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
 }
 
 /*--------------------------------------------------------------------
-     Beschreibung: sortierter Stichworteintrag
+   Sorted keyword entry
  --------------------------------------------------------------------*/
 
 
@@ -320,7 +320,7 @@ SwTOXIndex::SwTOXIndex( const SwTxtNode& rNd,
 }
 
 //
-// Stichworte vergleichen. Bezieht sich nur auf den Text
+// Compare keywords. Only relates to the text.
 //
 
 
@@ -328,11 +328,11 @@ sal_Bool SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
 {
     SwTOXIndex& rCmp = (SwTOXIndex&)rCmpBase;
 
-    // In Abhaengigkeit von den Optionen Grosskleinschreibung beachten
+    // Respect case taking dependencies into account
     if(GetLevel() != rCmp.GetLevel() || nKeyLevel != rCmp.nKeyLevel)
         return sal_False;
 
-    OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
+    OSL_ENSURE(pTxtMark, "pTxtMark == 0, No keyword");
 
     String sMyTxt;
     String sMyTxtReading;
@@ -345,7 +345,7 @@ sal_Bool SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
     sal_Bool bRet = pTOXIntl->IsEqual( sMyTxt, sMyTxtReading, GetLocale(),
                                    sOtherTxt, sOtherTxtReading, rCmp.GetLocale() );
 
-    // Wenn nicht zusammengefasst wird muss die Pos aus gewertet werden
+    // If we don't summarize we need to evaluate the Pos
     if(bRet && !(GetOptions() & nsSwTOIOptions::TOI_SAME_ENTRY))
         bRet = nPos == rCmp.nPos;
 
@@ -353,13 +353,13 @@ sal_Bool SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
 }
 
 //
-// kleiner haengt nur vom Text ab
+// operator, only depends on the text
 
 sal_Bool SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
 {
     SwTOXIndex& rCmp = (SwTOXIndex&)rCmpBase;
 
-    OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
+    OSL_ENSURE(pTxtMark, "pTxtMark == 0, No keyword");
 
     String sMyTxt;
     String sMyTxtReading;
@@ -373,7 +373,7 @@ sal_Bool SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
                 pTOXIntl->IsLess( sMyTxt, sMyTxtReading, GetLocale(),
                                   sOtherTxt, sOtherTxtReading, rCmp.GetLocale() );
 
-    // Wenn nicht zusammengefasst wird muss die Pos aus gewertet werden
+    // If we don't summarize we need to evaluate the Pos
     if( !bRet && !(GetOptions() & nsSwTOIOptions::TOI_SAME_ENTRY) )
     {
         bRet = pTOXIntl->IsEqual( sMyTxt, sMyTxtReading, GetLocale(),
@@ -385,11 +385,11 @@ sal_Bool SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
 }
 
 //
-// Das Stichwort selbst
+// The keyword itself
 
 void SwTOXIndex::GetText_Impl( String& rTxt, String& rTxtReading ) const
 {
-    OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
+    OSL_ENSURE(pTxtMark, "pTxtMark == 0, No keyword");
     const SwTOXMark& rTOXMark = pTxtMark->GetTOXMark();
     switch(nKeyLevel)
     {
@@ -447,7 +447,7 @@ void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 )
 
 sal_uInt16 SwTOXIndex::GetLevel() const
 {
-    OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
+    OSL_ENSURE(pTxtMark, "pTxtMark == 0, No keyword");
 
     sal_uInt16 nForm = FORM_PRIMARY_KEY;
 
@@ -462,7 +462,7 @@ sal_uInt16 SwTOXIndex::GetLevel() const
 }
 
 /*--------------------------------------------------------------------
-     Beschreibung: Schluessel und Trennzeichen
+  Key and separator
  --------------------------------------------------------------------*/
 
 
@@ -522,7 +522,7 @@ void SwTOXCustom::GetText_Impl( String& rTxt, String &rTxtReading ) const
 
 
 /*--------------------------------------------------------------------
-     Beschreibung: sortierter Inhaltsverz. Eintrag
+   Sorts the TOX entries
  --------------------------------------------------------------------*/
 
 
@@ -533,8 +533,7 @@ SwTOXContent::SwTOXContent( const SwTxtNode& rNd, const SwTxtTOXMark* pMark,
 }
 
 
-//  Der Text des Inhalts
-//
+// The content's text
 
 void SwTOXContent::GetText_Impl( String& rTxt, String& rTxtReading ) const
 {
@@ -567,7 +566,7 @@ void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16
 }
 
 //
-// Die Ebene fuer Anzeige
+// The level for displaying it
 //
 
 
@@ -577,14 +576,11 @@ sal_uInt16 SwTOXContent::GetLevel() const
 }
 
 /*--------------------------------------------------------------------
-     Beschreibung: Verzeichnis aus Absaetzen zusammengesammelt
+   TOX assembled from paragraphs
+   Watch out for OLE/graphics when sorting!
+   The position must not come from the document, but from the "anchor"!
  --------------------------------------------------------------------*/
 
-// bei Sortierung von OLE/Grafiken aufpassen !!!
-// Die Position darf nicht die im Dokument,
-// sondern muss die vom "Henkel" sein  !!
-
-
 SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, sal_uInt16 nLevel )
     : SwTOXSortTabBase( TOX_SORT_PARA, &rNd, 0, 0 ),
     eType( eT ),
@@ -615,13 +611,13 @@ void SwTOXPara::GetText_Impl( String& rTxt, String& ) const
     case nsSwTOXElement::TOX_GRAPHIC:
     case nsSwTOXElement::TOX_FRAME:
         {
-            // suche das FlyFormat, dort steht der Object/Grafik-Name
+            // Find the FlyFormat; the object/graphic name is there
             SwFrmFmt* pFly = pNd->GetFlyFmt();
             if( pFly )
                 rTxt = pFly->GetName();
             else
             {
-                OSL_ENSURE( !this, "Grafik/Object ohne Namen" );
+                OSL_ENSURE( !this, "Graphic/object without name" );
                 sal_uInt16 nId = nsSwTOXElement::TOX_OLE == eType
                                 ? STR_OBJECT_DEFNAME
                                 : nsSwTOXElement::TOX_GRAPHIC == eType
@@ -662,7 +658,7 @@ sal_uInt16 SwTOXPara::GetLevel() const
 
     if( nsSwTOXElement::TOX_OUTLINELEVEL == eType && pNd->GetTxtNode() )
     {
-        const int nTmp = ((SwTxtNode*)pNd)->GetAttrOutlineLevel();//#outline level,zhaojianwei????
+        const int nTmp = ((SwTxtNode*)pNd)->GetAttrOutlineLevel();
         if(nTmp != 0 )
             nRet = static_cast<sal_uInt16>(nTmp);
     }
@@ -695,7 +691,7 @@ String SwTOXPara::GetURL() const
     case nsSwTOXElement::TOX_GRAPHIC:
     case nsSwTOXElement::TOX_FRAME:
         {
-            // suche das FlyFormat, dort steht der Object/Grafik-Name
+            // Find the FlyFormat; the object/graphic name is there
             SwFrmFmt* pFly = pNd->GetFlyFmt();
             if( pFly )
             {
@@ -720,7 +716,7 @@ String SwTOXPara::GetURL() const
 
 
 /*--------------------------------------------------------------------
-    Beschreibung: Tabelle
+  Table
  --------------------------------------------------------------------*/
 
 
@@ -740,7 +736,7 @@ void SwTOXTable::GetText_Impl( String& rTxt, String& ) const
     }
     else
     {
-        OSL_ENSURE( !this, "Wo ist meine Tabelle geblieben?" );
+        OSL_ENSURE( !this, "Where's my table?" );
         rTxt = SW_RESSTR( STR_TABLE_DEFNAME );
     }
 }


More information about the Libreoffice-commits mailing list