[Libreoffice-commits] .: editeng/source

Christina Rossmanith crossmanith at kemper.freedesktop.org
Tue Mar 15 13:57:24 PDT 2011


 editeng/source/editeng/edtspell.cxx |    3 
 editeng/source/editeng/eehtml.cxx   |    4 
 editeng/source/editeng/impedit3.cxx |  942 +++++++++++++++---------------------
 3 files changed, 400 insertions(+), 549 deletions(-)

New commits:
commit bc47c8a46607896b1099d6a78d80a57bcd2e9ce7
Author: Albert Thuswaldner <albert.thuswaldner at gmail.com>
Date:   Tue Mar 15 21:49:18 2011 +0100

    Additional translations of Germancomments in libs-core/editeng

diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index 4863a8d..54ddb4c 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -110,9 +110,6 @@ void EditSpellWrapper::SpellStart( SvxSpellArea eArea )
     else if ( eArea == SVX_SPELL_BODY )
     {
         ;	// Is handled by the App through SpellNextDocument
-
-        // pSpellInfo->bSpellToEnd = sal_True;
-        // pSpellInfo->aSpellTo = pImpEE->CreateEPaM( pImpEE->GetEditDoc().GetEndPaM() );
     }
     else
     {
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 6c0ec4f..bdef019 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -197,8 +197,6 @@ void EditHTMLParser::NextToken( int nToken )
             if ( !bInPara )
                 StartPara( FALSE );
 
-            // if ( bInPara || pCurAnchor )
-
             String aText = aToken;
             if ( aText.Len() && ( aText.GetChar( 0 ) == ' ' )
                     && ThrowAwayBlank() && !IsReadPRE() )
@@ -567,6 +565,7 @@ void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSe
     USHORT nEndNode = pImpEditEngine->GetEditDoc().GetPos( pEN );
     DBG_ASSERT( nStartNode == nEndNode, "ImpSetAttribs: Several paragraphs?" );
 #endif
+
     if ( ( aStartPaM.GetIndex() == 0 ) && ( aEndPaM.GetIndex() == aEndPaM.GetNode()->Len() ) )
     {
         // Has to be merged:
@@ -591,7 +590,6 @@ void EditHTMLParser::ImpSetStyleSheet( USHORT nHLevel )
     // in a different engine still are here ...
 
     USHORT nNode = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() );
-
     SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() );
 
     aItems.ClearItem( EE_PARA_ULSPACE );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 5ba6d36..2f68e69 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -92,23 +92,23 @@ using namespace ::com::sun::star::linguistic2;
 SV_DECL_VARARR_SORT( SortedPositions, sal_uInt32, 16, 8 )
 SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 );
 
-#define CH_HYPH		'-'
+#define CH_HYPH     '-'
 
-#define RESDIFF		10
+#define RESDIFF     10
 
-#define WRONG_SHOW_MIN 		 5
-#define WRONG_SHOW_SMALL 	11
-#define WRONG_SHOW_MEDIUM 	15
+#define WRONG_SHOW_MIN       5
+#define WRONG_SHOW_SMALL    11
+#define WRONG_SHOW_MEDIUM   15
 
 struct TabInfo
 {
-    BOOL		bValid;
+    BOOL        bValid;
 
-    SvxTabStop	aTabStop;
-    xub_StrLen	nCharPos;
-    USHORT		nTabPortion;
-    long		nStartPosX;
-    long		nTabPos;
+    SvxTabStop  aTabStop;
+    xub_StrLen  nCharPos;
+    USHORT      nTabPortion;
+    long        nStartPosX;
+    long        nTabPos;
 
     TabInfo() { bValid = FALSE; }
 };
@@ -159,20 +159,20 @@ BYTE GetCharTypeForCompression( xub_Unicode cChar )
     }
 }
 
-void lcl_DrawRedLines( 
-    OutputDevice* pOutDev, 
-    long nFontHeight, 
-    const Point& rPnt, 
-    sal_uInt16 nIndex, 
-    sal_uInt16 nMaxEnd, 
-    const sal_Int32* pDXArray, 
-    WrongList* pWrongs, 
-    short nOrientation, 
-    const Point& rOrigin, 
+void lcl_DrawRedLines(
+    OutputDevice* pOutDev,
+    long nFontHeight,
+    const Point& rPnt,
+    sal_uInt16 nIndex,
+    sal_uInt16 nMaxEnd,
+    const sal_Int32* pDXArray,
+    WrongList* pWrongs,
+    short nOrientation,
+    const Point& rOrigin,
     BOOL bVertical,
     BOOL bIsRightToLeft )
 {
-    // Aber nur, wenn Font nicht zu klein...
+    // But only if font is not too small ...
     long nHght = pOutDev->LogicToPixel( Size( 0, nFontHeight ) ).Height();
     if( WRONG_SHOW_MIN < nHght )
     {
@@ -191,7 +191,7 @@ void lcl_DrawRedLines(
             if ( nStart >= nMaxEnd )
                 break;
 
-            if ( nStart < nIndex ) 	// Wurde korrigiert
+            if ( nStart < nIndex )  // Corrected
                 nStart = nIndex;
             if ( nEnd > nMaxEnd )
                 nEnd = nMaxEnd;
@@ -284,14 +284,14 @@ sal_Bool lcl_ConnectToPrev( xub_Unicode cCh, xub_Unicode cPrevCh )  // For Kashi
 
 
 //  ----------------------------------------------------------------------
-//	class ImpEditEngine
-//	----------------------------------------------------------------------
+//  class ImpEditEngine
+//  ----------------------------------------------------------------------
 void ImpEditEngine::UpdateViews( EditView* pCurView )
 {
     if ( !GetUpdateMode() || IsFormatting() || aInvalidRec.IsEmpty() )
         return;
 
-    DBG_ASSERT( IsFormatted(), "UpdateViews: Doc nicht formatiert!" );
+    DBG_ASSERT( IsFormatted(), "UpdateViews: Doc not formatted!" );
 
     for ( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
     {
@@ -305,7 +305,7 @@ void ImpEditEngine::UpdateViews( EditView* pCurView )
 
         if ( !aClipRec.IsEmpty() )
         {
-            // in Fensterkoordinaten umwandeln....
+            // convert to window coordinates ....
             aClipRec = pView->pImpEditView->GetWindowPos( aClipRec );
 
             if ( ( pView == pCurView )  )
@@ -342,7 +342,7 @@ IMPL_LINK_INLINE_START( ImpEditEngine, IdleFormatHdl, Timer *, EMPTYARG )
     // #i97146# check if that view is still available
     // else probably the idle format timer fired while we're already
     // downing
-    EditView* pView = aIdleFormatter.GetView();    
+    EditView* pView = aIdleFormatter.GetView();
     for( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ )
     {
         if( aEditViews[nView] == pView )
@@ -358,7 +358,7 @@ IMPL_LINK_INLINE_END( ImpEditEngine, IdleFormatHdl, Timer *, EMPTYARG )
 void ImpEditEngine::CheckIdleFormatter()
 {
     aIdleFormatter.ForceTimeout();
-    // Falls kein Idle, aber trotzdem nicht formatiert:
+    // If not idle, but still not formatted:
     if ( !IsFormatted() )
         FormatDoc();
 }
@@ -379,7 +379,7 @@ void ImpEditEngine::FormatDoc()
 
     bIsFormatting = sal_True;
 
-    // Dann kann ich auch den Spell-Timer starten...
+    // Then I can also start the spell-timer ...
     if ( GetStatus().DoOnlineSpelling() )
         StartOnlineSpellTimer();
 
@@ -388,10 +388,10 @@ void ImpEditEngine::FormatDoc()
 
     Font aOldFont( GetRefDevice()->GetFont() );
 
-    // Hier schon, damit nicht jedesmal in CreateLines...
+    // Here already, so that not always in CreateLines...
     sal_Bool bMapChanged = ImpCheckRefMapMode();
 
-    aInvalidRec = Rectangle();	// leermachen
+    aInvalidRec = Rectangle();  // make empty
     for ( sal_uInt16 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
     {
         ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
@@ -406,17 +406,13 @@ void ImpEditEngine::FormatDoc()
                     pParaPortion->MarkSelectionInvalid( 0, pParaPortion->GetNode()->Len() );
                 }
             }
-            // bei MustRepaint() sollte keine Formatierung noetig sein!
-            // 23.1.95: Evtl. ist sie durch eine andere Aktion aber doch
-            // ungueltig geworden!
-//			if ( pParaPortion->MustRepaint() || CreateLines( nPara ) )
+            // No formatting should be necessary for MustRepaint()!
             if ( ( pParaPortion->MustRepaint() && !pParaPortion->IsInvalid() )
                     || CreateLines( nPara, nY ) )
             {
                 if ( !bGrow && GetTextRanger() )
                 {
-                    // Bei einer Aenderung der Hoehe muss alles weiter unten
-                    // neu formatiert werden...
+                    // For a change in height all below must be reformatted ...
                     for ( sal_uInt16 n = nPara+1; n < GetParaPortions().Count(); n++ )
                     {
                         ParaPortion* pPP = GetParaPortions().GetObject( n );
@@ -430,10 +426,10 @@ void ImpEditEngine::FormatDoc()
                 pParaPortion->SetMustRepaint( sal_False );
             }
 
-            // InvalidRec nur einmal setzen...
+            // InvalidRec set only once...
             if ( aInvalidRec.IsEmpty() )
             {
-                // Bei Paperwidth 0 (AutoPageSize) bleibt es sonst Empty()...
+                // For Paperwidth 0 (AutoPageSize) it would otherwise be Empty()...
                 long nWidth = Max( (long)1, ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) );
                 Range aInvRange( GetInvalidYOffsets( pParaPortion ) );
                 aInvalidRec = Rectangle( Point( 0, nY+aInvRange.Min() ),
@@ -451,9 +447,8 @@ void ImpEditEngine::FormatDoc()
         nY += pParaPortion->GetHeight();
     }
 
-    // Man kann auch durch UpdateMode An=>AUS=>AN in die Formatierung gelangen...
-    // Optimierung erst nach Vobis-Auslieferung aktivieren...
-//	if ( !aInvalidRec.IsEmpty() )
+    // One can also get into the formatting through UpdateMode ON=>OFF=>ON...
+    // enable optimization first after Vobis delivery ...
     {
         sal_uInt32 nNewHeight = CalcTextHeight();
         long nDiff = nNewHeight - nCurTextHeight;
@@ -465,7 +460,7 @@ void ImpEditEngine::FormatDoc()
             if ( aInvalidRec.IsEmpty() )
             {
                 aInvalidRec.Top() = 0;
-                // Left und Right werden nicht ausgewertet, aber wegen IsEmpty gesetzt.
+                // Left and Right are not evaluated, are however set due to IsEmpty.
                 aInvalidRec.Left() = 0;
                 aInvalidRec.Right() = !IsVertical() ? aPaperSize.Width() : aPaperSize.Height();
             }
@@ -503,7 +498,7 @@ void ImpEditEngine::FormatDoc()
     if ( bMapChanged )
         GetRefDevice()->Pop();
 
-    CallStatusHdl();	// Falls Modified...
+    CallStatusHdl();    // If Modified...
 
     LeaveBlockNotifications();
 }
@@ -541,27 +536,26 @@ void ImpEditEngine::CheckAutoPageSize()
     if ( GetStatus().AutoPageHeight() )
         aPaperSize.Height() = (long) !IsVertical() ? GetTextHeight() : CalcTextWidth( TRUE );
 
-    SetValidPaperSize( aPaperSize );	//Min, Max beruecksichtigen
+    SetValidPaperSize( aPaperSize );    // consider Min, Max
 
     if ( aPaperSize != aPrevPaperSize )
     {
         if ( ( !IsVertical() && ( aPaperSize.Width() != aPrevPaperSize.Width() ) )
              || ( IsVertical() && ( aPaperSize.Height() != aPrevPaperSize.Height() ) ) )
         {
-            // Falls davor zentriert/rechts oder Tabs...
+            // If ahead is centered / right or tabs ...
             aStatus.GetStatusWord() |= !IsVertical() ? EE_STAT_TEXTWIDTHCHANGED : EE_STAT_TEXTHEIGHTCHANGED;
             for ( sal_uInt16 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
             {
-                // Es brauchen nur Absaetze neu formatiert werden,
-                // die nicht linksbuendig sind.
-                // Die Hoehe kann sich hier nicht mehr aendern.
+                // Only paragraphs which are not aligned to the left need to be
+                // reformatted, the height can not be changed here anymore.
                 ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
                 ContentNode* pNode = pParaPortion->GetNode();
                 SvxAdjust eJustification = GetJustification( nPara );
                 if ( eJustification != SVX_ADJUST_LEFT )
                 {
                     pParaPortion->MarkSelectionInvalid( 0, pNode->Len() );
-                    CreateLines( nPara, 0 );	// 0: Bei AutoPageSize kein TextRange!
+                    CreateLines( nPara, 0 );  // 0: For AutoPageSize no TextRange!
                 }
             }
         }
@@ -591,27 +585,27 @@ void ImpEditEngine::CheckAutoPageSize()
 
 static sal_Int32 ImplCalculateFontIndependentLineSpacing( const sal_Int32 nFontHeight )
 {
-    return ( nFontHeight * 12 ) / 10;	// + 20%
+    return ( nFontHeight * 12 ) / 10;   // + 20%
 }
 
 sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
 {
     ParaPortion* pParaPortion = GetParaPortions().GetObject( nPara );
 
-    // sal_Bool: Aenderung der Hoehe des Absatzes Ja/Nein - sal_True/sal_False
-    DBG_ASSERT( pParaPortion->GetNode(), "Portion ohne Node in CreateLines" );
-    DBG_ASSERT( pParaPortion->IsVisible(), "Unsichtbare Absaetze nicht formatieren!" );
-    DBG_ASSERT( pParaPortion->IsInvalid(), "CreateLines: Portion nicht invalid!" );
+    // sal_Bool: Changes in the height of paragraph Yes / No - sal_True/sal_False
+    DBG_ASSERT( pParaPortion->GetNode(), "Portion without Node in CreateLines" );
+    DBG_ASSERT( pParaPortion->IsVisible(), "Invisible paragraphs not formatted!" );
+    DBG_ASSERT( pParaPortion->IsInvalid(), "CreateLines: Portion not invalid!" );
 
     BOOL bProcessingEmptyLine = ( pParaPortion->GetNode()->Len() == 0 );
     BOOL bEmptyNodeWithPolygon = ( pParaPortion->GetNode()->Len() == 0 ) && GetTextRanger();
 
     // ---------------------------------------------------------------
-    // Schnelle Sonderbehandlung fuer leere Absaetze...
+    // Fast special treatment for empty paragraphs ...
     // ---------------------------------------------------------------
     if ( ( pParaPortion->GetNode()->Len() == 0 ) && !GetTextRanger() )
     {
-        // schnelle Sonderbehandlung...
+        // fast special treatment ...
         if ( pParaPortion->GetTextPortions().Count() )
             pParaPortion->GetTextPortions().Reset();
         if ( pParaPortion->GetLines().Count() )
@@ -621,10 +615,10 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
     }
 
     // ---------------------------------------------------------------
-    // Initialisierung......
+    // Initialization ......
     // ---------------------------------------------------------------
 
-    // Immer fuer 100% formatieren:
+    // Always format for 100%:
     sal_Bool bMapChanged = ImpCheckRefMapMode();
 
     if ( pParaPortion->GetLines().Count() == 0 )
@@ -634,7 +628,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
     }
 
     // ---------------------------------------------------------------
-    // Absatzattribute holen......
+    // Get Paragraph attributes  ......
     // ---------------------------------------------------------------
     ContentNode* const pNode = pParaPortion->GetNode();
 
@@ -649,9 +643,6 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
     const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&) pNode->GetContentAttribs().GetItem( EE_PARA_SBL );
     const BOOL bScriptSpace = ((const SvxScriptSpaceItem&) pNode->GetContentAttribs().GetItem( EE_PARA_ASIANCJKSPACING )).GetValue();
 
-//	const sal_uInt16 nInvalidEnd = ( pParaPortion->GetInvalidDiff() > 0 )
-//		? pParaPortion->GetInvalidPosStart() + pParaPortion->GetInvalidDiff()
-//		: pNode->Len();
     const short nInvalidDiff = pParaPortion->GetInvalidDiff();
     const sal_uInt16 nInvalidStart = pParaPortion->GetInvalidPosStart();
     const sal_uInt16 nInvalidEnd =  nInvalidStart + Abs( nInvalidDiff );
@@ -666,15 +657,15 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
         }
         else if ( ( pParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff < 0 ) )
         {
-            // pruefen, ob loeschen ueber Portiongrenzen erfolgte...
-            sal_uInt16 nStart = nInvalidStart;	// DOPPELT !!!!!!!!!!!!!!!
-            sal_uInt16 nEnd = nStart - nInvalidDiff;  // neg.
+            // check if delete over the portion boundaries was done ...
+            sal_uInt16 nStart = nInvalidStart;  // DOUBLE !!!!!!!!!!!!!!!
+            sal_uInt16 nEnd = nStart - nInvalidDiff;  // negative
             bQuickFormat = sal_True;
             sal_uInt16 nPos = 0;
             sal_uInt16 nPortions = pParaPortion->GetTextPortions().Count();
             for ( sal_uInt16 nTP = 0; nTP < nPortions; nTP++ )
             {
-                // Es darf kein Start/Ende im geloeschten Bereich liegen.
+                // There must be no start / end in the deleted area.
                 TextPortion* const pTP = pParaPortion->GetTextPortions()[ nTP ];
                 nPos = nPos + pTP->GetLen();
                 if ( ( nPos > nStart ) && ( nPos < nEnd ) )
@@ -688,9 +679,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
 
     // SW disables TEXT_LAYOUT_COMPLEX_DISABLED, so maybe I have to enable it...
 
-    // #114278# Saving both layout mode and language (since I'm
-    // potentially changing both)
-
+    // Saving both layout mode and language (since I'm potentially changing both)
     GetRefDevice()->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
 
     ImplInitLayoutMode( GetRefDevice(), nPara, 0xFFFF );
@@ -705,33 +694,33 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
     }
     else if ( bQuickFormat )
     {
-        // schnellere Methode:
+        // faster Method:
         RecalcTextPortion( pParaPortion, nInvalidStart, nInvalidDiff );
     }
-    else	// nRealInvalidStart kann vor InvalidStart liegen, weil Portions geloescht....
+    else    // nRealInvalidStart can be before InvalidStart, since Portions were deleted....
     {
         CreateTextPortions( pParaPortion, nRealInvalidStart );
     }
 
 
     // ---------------------------------------------------------------
-    // Zeile mit InvalidPos suchen, eine Zeile davor beginnen...
-    // Zeilen flaggen => nicht removen !
+    // Search for line with InvalidPos, start one line before
+    // Flag the line => do not remove it !
     // ---------------------------------------------------------------
 
     sal_uInt16 nLine = pParaPortion->GetLines().Count()-1;
     for ( sal_uInt16 nL = 0; nL <= nLine; nL++ )
     {
         EditLine* pLine = pParaPortion->GetLines().GetObject( nL );
-        if ( pLine->GetEnd() > nRealInvalidStart )	// nicht nInvalidStart!
+        if ( pLine->GetEnd() > nRealInvalidStart )  // not nInvalidStart!
         {
             nLine = nL;
             break;
         }
         pLine->SetValid();
     }
-    // Eine Zeile davor beginnen...
-    // Wenn ganz hinten getippt wird, kann sich die Zeile davor nicht aendern.
+    // Begin one line before...
+    // If it is typed at the end, the line in front cannot change.
     if ( nLine && ( !pParaPortion->IsSimpleInvalid() || ( nInvalidEnd < pNode->Len() ) || ( nInvalidDiff <= 0 ) ) )
         nLine--;
 
@@ -745,11 +734,11 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
         if ( aBulletArea.Right() > 0 )
             pParaPortion->SetBulletX( (sal_uInt16) GetXValue( aBulletArea.Right() ) );
         else
-            pParaPortion->SetBulletX( 0 ); // Falls Bullet falsch eingestellt.
+            pParaPortion->SetBulletX( 0 ); // if Bullet is set incorrectly
     }
 
     // ---------------------------------------------------------------
-    // Ab hier alle Zeilen durchformatieren...
+    // Reformat all lines from here ...
     // ---------------------------------------------------------------
     sal_uInt16 nDelFromLine = 0xFFFF;
     sal_Bool bLineBreak = sal_False;
@@ -761,7 +750,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
     sal_Bool bCalcCharPositions = sal_True;
     sal_Int32* pBuf = new sal_Int32[ pNode->Len() ];
 
-    sal_Bool bSameLineAgain = sal_False;	// Fuer TextRanger, wenn sich die Hoehe aendert.
+    sal_Bool bSameLineAgain = sal_False;    // For TextRanger, if the height changes.
     TabInfo aCurrentTab;
 
     BOOL bForceOneRun = bEmptyNodeWithPolygon;
@@ -784,8 +773,6 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
 
             if ( !nLine && ( pParaPortion->GetBulletX() > nStartX ) )
             {
-// TL_NFLR				nStartX += nFI;	// Vielleicht reicht der LI?
-// TL_NFLR				if ( pParaPortion->GetBulletX() > nStartX )
                     nStartX = pParaPortion->GetBulletX();
             }
         }
@@ -799,20 +786,20 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
         nMaxLineWidth -= GetXValue( rLRItem.GetRight() );
         nMaxLineWidth -= nStartX;
 
-        // Wenn PaperSize == long_max, kann ich keinen neg. Erstzeileneinzug
-        // abziehen (Overflow)
+        // If PaperSize == long_max, one cannot take away any negative
+        // first line indent. (Overflow)
         if ( ( nMaxLineWidth < 0 ) && ( nStartX < 0 ) )
             nMaxLineWidth = ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) - GetXValue( rLRItem.GetRight() );
 
-        // Wenn jetzt noch kleiner 0, kann es nur der rechte Rand sein.
+        // If still less than 0, it may be just the right edge.
         if ( nMaxLineWidth <= 0 )
             nMaxLineWidth = 1;
 
-        // Problem: Da eine Zeile _vor_ der ungueltigen Position mit der
-        // Formatierung begonnen wird, werden hier leider auch die Positionen
-        // neu bestimmt...
-        // Loesungsansatz:
-        // Die Zeile davor kann nur groesser werden, nicht kleiner
+        // Problem:
+        // Since formatting starts a line _before_ the invalid position,
+     // the positions unfortunately have to be redefined ...
+        // Solution:
+        // The line before can only become longer, not smaller
         // => ...
         if ( bCalcCharPositions )
             pLine->GetCharPosArray().Remove( 0, pLine->GetCharPosArray().Count() );
@@ -821,7 +808,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
         sal_uInt16 nTmpPortion = pLine->GetStartPortion();
         long nTmpWidth = 0;
         long nXWidth = nMaxLineWidth;
-        if ( nXWidth <= nTmpWidth )	// while muss 1x durchlaufen werden
+        if ( nXWidth <= nTmpWidth ) // while has to be looped once
             nXWidth = nTmpWidth+1;
 
         LongDqPtr pTextRanges = 0;
@@ -843,7 +830,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                     nTextLineHeight = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetHeight() );
                 else
                     nTextLineHeight = aTmpFont.GetPhysTxtSize( GetRefDevice(), String() ).Height();
-                // Metriken koennen groesser sein
+                // Metrics can be greater
                 FormatterFontMetric aTempFormatterMetrics;
                 RecalcFormatterFontMetrics( aTempFormatterMetrics, aTmpFont );
                 sal_uInt16 nLineHeight = aTempFormatterMetrics.GetHeight();
@@ -867,16 +854,15 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                 pTextRanges = GetTextRanger()->GetTextRanges( Range( nYOff, nYOff + nYDiff ) );
                 DBG_ASSERT( pTextRanges, "GetTextRanges?!" );
                 long nMaxRangeWidth = 0;
-                // Den breitesten Bereich verwenden...
-                // Der breiteste Bereich koennte etwas verwirren, also
-                // generell den ersten. Am besten mal richtig mit Luecken.
-//				for ( sal_uInt16 n = 0; n < pTextRanges->size(); )
+                // Use the widest range ...
+                // The widest range could be a bit confusing, so normally it
+                // is the first one. Best with gaps.
                 if ( pTextRanges->size() )
                 {
                     sal_uInt16 n = 0;
                     long nA = pTextRanges->at(n++);
                     long nB = pTextRanges->at(n++);
-                    DBG_ASSERT( nA <= nB, "TextRange verdreht?" );
+                    DBG_ASSERT( nA <= nB, "TextRange distorted?" );
                     long nW = nB - nA;
                     if ( nW > nMaxRangeWidth )
                     {
@@ -889,20 +875,20 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                     nMaxLineWidth = nXWidth - nStartX - GetXValue( rLRItem.GetRight() );
                 else
                 {
-                    // Weiter unten im Polygon versuchen.
-                    // Unterhalb des Polygons die Paperbreite verwenden.
+                    // Try further down in the polygon.
+                    // Below the polygon use the Paper Width.
                     nTextExtraYOffset += Max( (long)(nTextLineHeight / 10), (long)1 );
                     if ( ( nTextY + nTextExtraYOffset  ) > GetTextRanger()->GetBoundRect().Bottom() )
                     {
                         nXWidth = !IsVertical() ? GetPaperSize().Width() : GetPaperSize().Height();
-                        if ( !nXWidth )	// AutoPaperSize
+                        if ( !nXWidth ) // AutoPaperSize
                             nXWidth = 0x7FFFFFFF;
                     }
                 }
             }
         }
 
-        // Portion suchen, die nicht mehr in Zeile passt....
+        // search for Portion that no longer fits in line ....
         TextPortion* pPortion = 0;
         sal_Bool bBrokenLine = sal_False;
         bLineBreak = sal_False;
@@ -913,8 +899,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             pPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
             if ( pPortion->GetKind() == PORTIONKIND_HYPHENATOR )
             {
-                // Portion wegschmeissen, ggf. die davor korrigieren, wenn
-                // die Hyph-Portion ein Zeichen geschluckt hat...
+                // Throw away a Portion, if necessary correct the one before,
+                // if the Hyph portion has swallowed a character ...
                 pParaPortion->GetTextPortions().Remove( nTmpPortion );
                 if ( nTmpPortion && pPortion->GetLen() )
                 {
@@ -927,11 +913,11 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                     pPrev->GetSize().Width() = (-1);
                 }
                 delete pPortion;
-                DBG_ASSERT( nTmpPortion < pParaPortion->GetTextPortions().Count(), "Keine Portion mehr da!" );
+                DBG_ASSERT( nTmpPortion < pParaPortion->GetTextPortions().Count(), "No more Portions left!" );
                 pPortion = pParaPortion->GetTextPortions().GetObject( nTmpPortion );
             }
             DBG_ASSERT( pPortion->GetKind() != PORTIONKIND_HYPHENATOR, "CreateLines: Hyphenator-Portion!" );
-            DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Leere Portion in CreateLines ?!" );
+            DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Empty Portion in CreateLines ?!" );
             (void)bProcessingEmptyLine;
             if ( pNextFeature && ( pNextFeature->GetStart() == nTmpPos ) )
             {
@@ -942,10 +928,9 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                     {
                         long nOldTmpWidth = nTmpWidth;
 
-                        // Tab-Pos suchen...
+                        // Search for Tab-Pos...
                         long nCurPos = nTmpWidth+nStartX;
-//						nCurPos -= rLRItem.GetTxtLeft();	// Tabs relativ zu LI
-                        // Skalierung rausrechnen
+                        // consider scaling
                         if ( aStatus.DoStretch() && ( nStretchX != 100 ) )
                             nCurPos = nCurPos*100/nStretchX;
 
@@ -967,7 +952,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                              ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_CENTER ) ||
                              ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL ) )
                         {
-                            // Bei LEFT/DEFAULT wird dieses Tab nicht mehr betrachtet.
+                            // For LEFT / DEFAULT this tab is not considered.
                             aCurrentTab.bValid = TRUE;
                             aCurrentTab.nStartPosX = nTmpWidth;
                             aCurrentTab.nCharPos = nTmpPos;
@@ -978,21 +963,20 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                         pPortion->SetExtraValue( aCurrentTab.aTabStop.GetFill() );
                         pPortion->GetSize().Width() = aCurrentTab.nTabPos - (nTmpWidth+nStartX);
 
-                        // #90520# Height needed...
+                        // Height needed...
                         SeekCursor( pNode, nTmpPos+1, aTmpFont );
                         pPortion->GetSize().Height() = aTmpFont.QuickGetTextSize( GetRefDevice(), String(), 0, 0, NULL ).Height();
 
-                        DBG_ASSERT( pPortion->GetSize().Width() >= 0, "Tab falsch berechnet!" );
+                        DBG_ASSERT( pPortion->GetSize().Width() >= 0, "Tab incorrectly calculated!" );
 
                         nTmpWidth = aCurrentTab.nTabPos-nStartX;
 
-                        // Wenn dies das erste Token in der Zeile ist,
-                        // und nTmpWidth > aPaperSize.Width, habe ich eine
-                        // Endlos-Schleife!
+                        // If this is the first token on the line,
+                        // and nTmpWidth > aPaperSize.Width, => infinite loop!
                         if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->GetStartPortion() ) )
                         {
-                            // Aber was jetzt ?
-                            // Tab passend machen
+                            // What now?
+                            // make the tab fitting
                             pPortion->GetSize().Width() = nXWidth-nOldTmpWidth;
                             nTmpWidth = nXWidth-1;
                             bEOL = sal_True;
@@ -1015,9 +999,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                     break;
                     case EE_FEATURE_FIELD:
                     {
-//						long nCurWidth = nTmpWidth;
                         SeekCursor( pNode, nTmpPos+1, aTmpFont );
-                        sal_Unicode cChar = 0;	// later: NBS?
+                        sal_Unicode cChar = 0;  // later: NBS?
                         aTmpFont.SetPhysFont( GetRefDevice() );
                         ImplInitDigitMode( GetRefDevice(), 0, 0, 0, aTmpFont.GetLanguage() );
 
@@ -1025,16 +1008,15 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                         if ( bCalcCharPositions || !pPortion->HasValidSize() )
                         {
                             pPortion->GetSize() = aTmpFont.QuickGetTextSize( GetRefDevice(), aFieldValue, 0, aFieldValue.Len(), 0 );
-                            // Damit kein Scrollen bei ueberlangen Feldern
+                            // So no scrolling for oversized fields
                             if ( pPortion->GetSize().Width() > nXWidth )
                                 pPortion->GetSize().Width() = nXWidth;
                         }
                         nTmpWidth += pPortion->GetSize().Width();
                         pLine->GetCharPosArray().Insert( pPortion->GetSize().Width(), nTmpPos-pLine->GetStart() );
                         pPortion->GetKind() = cChar ? PORTIONKIND_TEXT : PORTIONKIND_FIELD;
-                        // Wenn dies das erste Token in der Zeile ist,
-                        // und nTmpWidth > aPaperSize.Width, habe ich eine
-                        // Endlos-Schleife!
+                        // If this is the first token on the line,
+                        // and nTmpWidth > aPaperSize.Width, => infinite loop!
                         if ( ( nTmpWidth >= nXWidth ) && ( nTmpPortion == pLine->GetStartPortion() ) )
                         {
                             nTmpWidth = nXWidth-1;
@@ -1046,7 +1028,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                         bCompressedChars = FALSE;
                     }
                     break;
-                    default:	OSL_FAIL( "Was fuer ein Feature ?" );
+                    default:    OSL_FAIL( "What feature?" );
                 }
                 pNextFeature = pNode->GetCharAttribs().FindFeature( pNextFeature->GetStart() + 1  );
             }
@@ -1071,8 +1053,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                 if ( bCalcCharPositions )
                 {
                     sal_uInt16 nLen = pPortion->GetLen();
-                    // Es wird am Anfang generell das Array geplaettet
-                    // => Immer einfach schnelles insert.
+                    // The array is  generally flattened at the beginning
+                    // => Always simply quick inserts.
                     sal_uInt16 nPos = nTmpPos - pLine->GetStart();
                     pLine->GetCharPosArray().Insert( pBuf, nLen, nPos );
                 }
@@ -1113,10 +1095,9 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                     TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( n );
                     nWidthAfterTab += pTP->GetSize().Width();
                 }
-                long nW = nWidthAfterTab;	// Length before tab position
+                long nW = nWidthAfterTab;   // Length before tab position
                 if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_RIGHT )
                 {
-//					nW = nWidthAfterTab;
                 }
                 else if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_CENTER )
                 {
@@ -1124,7 +1105,6 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                 }
                 else if ( aCurrentTab.aTabStop.GetAdjustment() == SVX_TAB_ADJUST_DECIMAL )
                 {
-//					nW = nWidthAfterTab;
                     String aText = GetSelected( EditSelection(  EditPaM( pParaPortion->GetNode(), nTmpPos ),
                                                                 EditPaM( pParaPortion->GetNode(), nTmpPos + pPortion->GetLen() ) ) );
                     USHORT nDecPos = aText.Search( aCurrentTab.aTabStop.GetDecimal() );
@@ -1161,11 +1141,11 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
 
         aCurrentTab.bValid = FALSE;
 
-        // das war evtl. eine Portion zu weit:
+        // this was possibly a portion too far:
         sal_Bool bFixedEnd = sal_False;
         if ( aStatus.OneCharPerLine() )
         {
-            // Zustand vor Portion: ( bis auf nTmpWidth )
+            // State before Portion (apart from nTmpWidth):
             nPortionEnd = nTmpPos;
             nTmpPos -= pPortion ? pPortion->GetLen() : 0;
             nPortionStart = nTmpPos;
@@ -1174,14 +1154,14 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             bEOL = sal_True;
             bEOC = sal_False;
 
-            // Und jetzt genau ein Zeichen:
+            // And now just one character:
             nTmpPos++;
             nTmpPortion++;
             nPortionEnd = nTmpPortion;
-            // Eine Nicht-Feature-Portion muss gebrochen werden
+            // one Non-Feature-Portion has to be wrapped
             if ( pPortion->GetLen() > 1 )
             {
-                DBG_ASSERT( pPortion && (pPortion->GetKind() == PORTIONKIND_TEXT), "Len>1, aber keine TextPortion?" );
+                DBG_ASSERT( pPortion && (pPortion->GetKind() == PORTIONKIND_TEXT), "Len>1, but no TextPortion?" );
                 nTmpWidth -= pPortion ? pPortion->GetSize().Width() : 0;
                 sal_uInt16 nP = SplitTextPortion( pParaPortion, nTmpPos, pLine );
                 TextPortion* p = pParaPortion->GetTextPortions().GetObject( nP );
@@ -1214,8 +1194,8 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                 break;
                 default:
                 {
-                    // Ein Feature wird nicht umgebrochen:
-                    DBG_ASSERT( ( pPortion->GetKind() == PORTIONKIND_LINEBREAK ), "Was fuer ein Feature ?" );
+                    //  A feature is not wrapped:
+                    DBG_ASSERT( ( pPortion->GetKind() == PORTIONKIND_LINEBREAK ), "What Feature ?" );
                     bEOL = sal_True;
                     bFixedEnd = sal_True;
                 }
@@ -1226,7 +1206,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             bEOL = sal_True;
             bEOC = sal_True;
             pLine->SetEnd( nPortionEnd );
-            DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine TextPortions?" );
+            DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "No TextPortions?" );
             pLine->SetEndPortion( (sal_uInt16)pParaPortion->GetTextPortions().Count() - 1 );
         }
 
@@ -1244,11 +1224,11 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
         {
             pLine->SetEnd( nPortionStart+1 );
             pLine->SetEndPortion( nTmpPortion-1 );
-            bEOC = sal_False; // wurde oben gesetzt, vielleich mal die if's umstellen?
+            bEOC = sal_False; // was set above, maybe change the sequence of the if's?
         }
         else if ( !bEOL )
         {
-            DBG_ASSERT( pPortion && ((nPortionEnd-nPortionStart) == pPortion->GetLen()), "Doch eine andere Portion?!" );
+            DBG_ASSERT( pPortion && ((nPortionEnd-nPortionStart) == pPortion->GetLen()), "However, another portion?!" );
             long nRemainingWidth = nMaxLineWidth - nTmpWidth;
             sal_Bool bCanHyphenate = ( aTmpFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL );
             if ( bCompressedChars && pPortion && ( pPortion->GetLen() > 1 ) && pPortion->GetExtraInfos() && pPortion->GetExtraInfos()->bCompressed )
@@ -1262,11 +1242,10 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
         }
 
         // ------------------------------------------------------------------
-        // Zeile fertig => justieren
+        // Line finished => adjust
         // ------------------------------------------------------------------
 
-        // CalcTextSize sollte besser durch ein kontinuierliches
-        // Registrieren ersetzt werden !
+        // CalcTextSize should be replaced by a continuous registering!
         Size aTextSize = pLine->CalcTextSize( *pParaPortion );
 
         if ( aTextSize.Height() == 0 )
@@ -1282,16 +1261,15 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             pLine->SetHeight( (sal_uInt16)aTextSize.Height() );
         }
 
-        // Die Fontmetriken koennen nicht kontinuierlich berechnet werden,
-        // wenn der Font sowieso eingestellt ist, weil ggf. ein grosser Font
-        // erst nach dem Umbrechen ploetzlich in der naechsten Zeile landet
-        // => Font-Metriken zu gross.
+        // The font metrics can not be calculated continuously, if the font is
+        // set anyway, because a large font only after wrapping suddenly ends
+        // up in the next line => Font metrics too big.
         FormatterFontMetric aFormatterMetrics;
         sal_uInt16 nTPos = pLine->GetStart();
         for ( sal_uInt16 nP = pLine->GetStartPortion(); nP <= pLine->GetEndPortion(); nP++ )
         {
             TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( nP );
-            // #95819# problem with hard font height attribute, when everthing but the line break has this attribute
+            // problem with hard font height attribute, when everthing but the line break has this attribute
             if ( pTP->GetKind() != PORTIONKIND_LINEBREAK )
             {
                 SeekCursor( pNode, nTPos+1, aTmpFont );
@@ -1309,7 +1287,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
         bSameLineAgain = sal_False;
         if ( GetTextRanger() && ( pLine->GetHeight() > nTextLineHeight ) )
         {
-            // Nochmal mit der anderen Groesse aufsetzen!
+            // put down with the other size!
             bSameLineAgain = sal_True;
         }
 
@@ -1322,7 +1300,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                 sal_uInt16 nTxtHeight = pLine->GetHeight();
                 if ( nTxtHeight < nMinHeight )
                 {
-                    // Der Ascent muss um die Differenz angepasst werden:
+                    // The Ascent has to be adjusted for the difference:
                     long nDiff = nMinHeight - nTxtHeight;
                     pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() + nDiff) );
                     pLine->SetHeight( nMinHeight, nTxtHeight );
@@ -1330,9 +1308,9 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             }
             else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
             {
-                if ( nPara || IsFixedCellHeight() || pLine->GetStartPortion() ) // Nicht die aller erste Zeile
+                if ( nPara || IsFixedCellHeight() || pLine->GetStartPortion() ) // Not the very first line
                 {
-                    // #100508# There are documents with PropLineSpace 0, why?
+                    // There are documents with PropLineSpace 0, why?
                     // (cmc: re above question :-) such documents can be seen by importing a .ppt
                     if ( rLSItem.GetPropLineSpace() && ( rLSItem.GetPropLineSpace() != 100 ) )
                     {
@@ -1340,7 +1318,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                         sal_Int32 nH = nTxtHeight;
                         nH *= rLSItem.GetPropLineSpace();
                         nH /= 100;
-                        // Der Ascent muss um die Differenz angepasst werden:
+                        // The Ascent has to be adjusted for the difference:
                         long nDiff = pLine->GetHeight() - nH;
                         if ( nDiff > pLine->GetMaxAscent() )
                             nDiff = pLine->GetMaxAscent();
@@ -1351,27 +1329,13 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             }
         }
 
-
-        // #80582# - Bullet should not influence line height
-//		if ( !nLine )
-//		{
-//			long nBulletHeight = aBulletArea.GetHeight();
-//			if ( nBulletHeight > (long)pLine->GetHeight() )
-//			{
-//				long nDiff =  nBulletHeight - (long)pLine->GetHeight();
-//				// nDiff auf oben und unten verteilen.
-//				pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() + nDiff/2) );
-//				pLine->SetHeight( (sal_uInt16)nBulletHeight );
-//			}
-//		}
-
         if ( ( !IsVertical() && aStatus.AutoPageWidth() ) ||
              ( IsVertical() && aStatus.AutoPageHeight() ) )
         {
-            // Wenn die Zeile in die aktuelle Papierbreite passt, muss
-            // diese Breite fuer die Ausrichting verwendet werden.
-            // Wenn sie nicht passt oder sie die Papierbreite aendert,
-            // wird bei Justification != LEFT sowieso noch mal formatiert.
+            // If the row fits within the current paper width, then this width
+            // has to be used for the Alignment. If it does not fit or if it
+            // will change the paper width, it will be formatted again for
+            // Justification! = LEFT anyway.
             long nMaxLineWidthFix = ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() )
                                         - GetXValue( rLRItem.GetRight() ) - nStartX;
             if ( aTextSize.Width() < nMaxLineWidthFix )
@@ -1406,7 +1370,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             case SVX_ADJUST_CENTER:
             {
                 long n = ( nMaxLineWidth - aTextSize.Width() ) / 2;
-                n += nStartX;  // Einrueckung bleibt erhalten.
+                n += nStartX;  // Indentation is kept.
                 if ( n > 0 )
                     pLine->SetStartPosX( (sal_uInt16)n );
                 else
@@ -1416,11 +1380,10 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             break;
             case SVX_ADJUST_RIGHT:
             {
-                // Bei automatisch umgebrochenen Zeilen, die ein Blank
-                // am Ende enthalten, darf das Blank nicht ausgegeben werden!
-
+                // For automatically wrapped lines, which has a blank at the end
+                // the blank must not be displayed!
                 long n = nMaxLineWidth - aTextSize.Width();
-                n += nStartX;  // Einrueckung bleibt erhalten.
+                n += nStartX;  // Indentation is kept.
                 if ( n > 0 )
                     pLine->SetStartPosX( (sal_uInt16)n );
                 else
@@ -1444,12 +1407,12 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
         }
 
         // -----------------------------------------------------------------
-        // pruefen, ob die Zeile neu ausgegeben werden muss...
+        // Check whether the line must be re-issued ...
         // -----------------------------------------------------------------
         pLine->SetInvalid();
 
-        // Wenn eine Portion umgebrochen wurde sind ggf. viel zu viele Positionen
-        // im CharPosArray:
+        // If a portion was wrapped there may be far too many positions in
+        // CharPosArray:
         if ( bCalcCharPositions )
         {
             sal_uInt16 nLen = pLine->GetLen();
@@ -1469,14 +1432,13 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             }
         }
 
-        // Fuer kleiner 0 noch ueberlegen!
-        if ( pParaPortion->IsSimpleInvalid() /* && ( nInvalidDiff > 0 ) */ )
+        // for <0 think over !
+        if ( pParaPortion->IsSimpleInvalid() )
         {
-            // Aenderung durch einfache Textaenderung...
-            // Formatierung nicht abbrechen, da Portions evtl. wieder
-            // gesplittet werden muessen!
-            // Wenn irgendwann mal abbrechbar, dann fogende Zeilen Validieren!
-            // Aber ggf. als Valid markieren, damit weniger Ausgabe...
+            // Change through simple Text changes ...
+            // Do mot cancel formatting since Portions possibly have to be split
+            // again! If at some point cancelable, then validate the following
+            // line! But if applicable, mark as valid, so there is less output...
             if ( pLine->GetEnd() < nInvalidStart )
             {
                 if ( *pLine == aSaveLine )
@@ -1506,10 +1468,9 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                 }
                 else if ( bCalcCharPositions && bQuickFormat && ( nEnd > nInvalidEnd) )
                 {
-                    // Wenn die ungueltige Zeile so endet, dass die naechste an
-                    // der 'gleichen' Textstelle wie vorher beginnt, also nicht
-                    // anders umgebrochen wird, brauche ich dort auch nicht die
-                    // textbreiten neu bestimmen:
+                    // If the invalid line ends so that the next begins on the
+                    // 'same' passage as before, i.e. not wrapped differently,
+                    //  then the text width does not have to be determined anew:
                     if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
                     {
                         bCalcCharPositions = sal_False;
@@ -1523,12 +1484,12 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
 
         if ( !bSameLineAgain )
         {
-            nIndex = pLine->GetEnd();	// naechste Zeile Start = letzte Zeile Ende
-                                        // weil nEnd hinter das letzte Zeichen zeigt!
+            nIndex = pLine->GetEnd();   // next line start = last line end
+                                        // as nEnd points to the last charecter!
 
             sal_uInt16 nEndPortion = pLine->GetEndPortion();
 
-            // Naechste Zeile oder ggf. neue Zeile....
+            // Next line or maybe a new line....
             pLine = 0;
             if ( nLine < pParaPortion->GetLines().Count()-1 )
                 pLine = pParaPortion->GetLines().GetObject( ++nLine );
@@ -1565,12 +1526,12 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
                 pLine->SetEndPortion( nEndPortion+1 );
             }
         }
-    }	// while ( Index < Len )
+    }   // while ( Index < Len )
 
     if ( nDelFromLine != 0xFFFF )
         pParaPortion->GetLines().DeleteFromLine( nDelFromLine );
 
-    DBG_ASSERT( pParaPortion->GetLines().Count(), "Keine Zeile nach CreateLines!" );
+    DBG_ASSERT( pParaPortion->GetLines().Count(), "No line after CreateLines!" );
 
     if ( bLineBreak == sal_True )
         CreateAndInsertEmptyLine( pParaPortion, nStartPosY );
@@ -1614,7 +1575,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
         if ( aBulletArea.Right() > 0 )
             pParaPortion->SetBulletX( (sal_uInt16) GetXValue( aBulletArea.Right() ) );
         else
-            pParaPortion->SetBulletX( 0 ); // Falls Bullet falsch eingestellt.
+            pParaPortion->SetBulletX( 0 ); // If Bullet set incorrectly.
         if ( pParaPortion->GetBulletX() > nStartX )
         {
             nStartX = (short)GetXValue( rLRItem.GetTxtLeft() + rLRItem.GetTxtFirstLineOfst() + nSpaceBeforeAndMinLabelWidth );
@@ -1667,7 +1628,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
             sal_uInt16 nTxtHeight = pTmpLine->GetHeight();
             if ( nTxtHeight < nMinHeight )
             {
-                // Der Ascent muss um die Differenz angepasst werden:
+                // The Ascent has to be adjusted for the difference:
                 long nDiff = nMinHeight - nTxtHeight;
                 pTmpLine->SetMaxAscent( (sal_uInt16)(pTmpLine->GetMaxAscent() + nDiff) );
                 pTmpLine->SetHeight( nMinHeight, nTxtHeight );
@@ -1676,9 +1637,9 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
         else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
         {
             USHORT nPara = GetParaPortions().GetPos( pParaPortion );
-            if ( nPara || IsFixedCellHeight() || pTmpLine->GetStartPortion() ) // Nicht die aller erste Zeile
+            if ( nPara || IsFixedCellHeight() || pTmpLine->GetStartPortion() ) // Not the very first line
             {
-                // #100508# There are documents with PropLineSpace 0, why?
+                // There are documents with PropLineSpace 0, why?
                 // (cmc: re above question :-) such documents can be seen by importing a .ppt
                 if ( rLSItem.GetPropLineSpace() && ( rLSItem.GetPropLineSpace() != 100 ) )
                 {
@@ -1686,7 +1647,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
                     sal_Int32 nH = nTxtHeight;
                     nH *= rLSItem.GetPropLineSpace();
                     nH /= 100;
-                    // Der Ascent muss um die Differenz angepasst werden:
+                    // The Ascent has to be adjusted for the difference:
                     long nDiff = pTmpLine->GetHeight() - nH;
                     if ( nDiff > pTmpLine->GetMaxAscent() )
                         nDiff = pTmpLine->GetMaxAscent();
@@ -1703,21 +1664,19 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
         if ( nMinHeight > (long)pTmpLine->GetHeight() )
         {
             long nDiff = nMinHeight - (long)pTmpLine->GetHeight();
-            // nDiff auf oben und unten verteilen.
+            // distribute nDiff upwards and downwards
             pTmpLine->SetMaxAscent( (sal_uInt16)(pTmpLine->GetMaxAscent() + nDiff/2) );
             pTmpLine->SetHeight( (sal_uInt16)nMinHeight );
         }
     }
     else
     {
-        // -2: Die neue ist bereits eingefuegt.
+        // -2: The new one is already inserted.
 #ifdef DBG_UTIL
         EditLine* pLastLine = pParaPortion->GetLines().GetObject( pParaPortion->GetLines().Count()-2 );
-        DBG_ASSERT( pLastLine, "Weicher Umbruch, keine Zeile ?!" );
-        DBG_ASSERT( pLastLine->GetEnd() == pParaPortion->GetNode()->Len(), "Doch anders?" );
+        DBG_ASSERT( pLastLine, "soft wrap no line?!" );
+        DBG_ASSERT( pLastLine->GetEnd() == pParaPortion->GetNode()->Len(), "different anyway?" );
 #endif
-//		pTmpLine->SetStart( pLastLine->GetEnd() );
-//		pTmpLine->SetEnd( pLastLine->GetEnd() );
         sal_uInt16 nPos = (sal_uInt16) pParaPortion->GetTextPortions().Count() - 1 ;
         pTmpLine->SetStartPortion( nPos );
         pTmpLine->SetEndPortion( nPos );
@@ -1726,15 +1685,12 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
 
 sal_Bool ImpEditEngine::FinishCreateLines( ParaPortion* pParaPortion )
 {
-//	CalcCharPositions( pParaPortion );
+//  CalcCharPositions( pParaPortion );
     pParaPortion->SetValid();
     long nOldHeight = pParaPortion->GetHeight();
-//	sal_uInt16 nPos = GetParaPortions().GetPos( pParaPortion );
-//	DBG_ASSERT( nPos != USHRT_MAX, "FinishCreateLines: Portion nicht in Liste!" );
-//	ParaPortion* pPrev = nPos ? GetParaPortions().GetObject( nPos-1 ) : 0;
     CalcHeight( pParaPortion );
 
-    DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "FinishCreateLines: Keine Text-Portion?" );
+    DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "FinishCreateLines: No Text-Portion?" );
     sal_Bool bRet = ( pParaPortion->GetHeight() != nOldHeight );
     return bRet;
 }
@@ -1808,12 +1764,12 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
             nBreakPos = nMaxBreakPos;
         }
 
-        // #101795# nBreakPos can never be outside the portion, even not with hangig punctuation
+        // nBreakPos can never be outside the portion, even not with hangig punctuation
         if ( nBreakPos > nMaxBreakPos )
             nBreakPos = nMaxBreakPos;
 
         // BUG in I18N - the japanese dot is in the next line!
-        // !!!	Testen!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+        // !!!  Test!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
         if ( (nBreakPos + ( aUserOptions.allowPunctuationOutsideMargin ? 0 : 1 ) ) <= nMaxBreakPos )
         {
             sal_Unicode cFirstInNextLine = ( (nBreakPos+1) < pNode->Len() ) ? pNode->GetChar( nBreakPos ) : 0;
@@ -1824,17 +1780,14 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
         bHangingPunctuation = ( nBreakPos > nMaxBreakPos ) ? sal_True : sal_False;
         pLine->SetHangingPunctuation( bHangingPunctuation );
 
-        // Egal ob Trenner oder nicht: Das Wort nach dem Trenner durch
-        // die Silbentrennung jagen...
-        // nMaxBreakPos ist das letzte Zeichen was in die Zeile passt,
-        // nBreakPos ist der Wort-Anfang
-        // Ein Problem gibt es, wenn das Dok so schmal ist, dass ein Wort
-        // auf mehr als Zwei Zeilen gebrochen wird...
+        // Whether a separator or not, push the word after the separator through
+        // hyphenation ... NMaxBreakPos is the last character that fits into
+        // the line, nBreakPos is the beginning of the word.
+        // There is a problem if the Doc is so narrow that a word is broken
+        // into more than two lines ...
         if ( !bHangingPunctuation && bCanHyphenate && GetHyphenator().is() )
         {
             i18n::Boundary aBoundary = _xBI->getWordBoundary( *pNode, nBreakPos, GetLocale( EditPaM( pNode, nBreakPos ) ), ::com::sun::star::i18n::WordType::DICTIONARY_WORD, sal_True );
-//		    sal_uInt16 nWordStart = nBreakPos;
-//		    sal_uInt16 nBreakPos_OLD = nBreakPos;
             sal_uInt16 nWordStart = nBreakPos;
             sal_uInt16 nWordEnd = (USHORT) aBoundary.endPos;
             DBG_ASSERT( nWordEnd > nWordStart, "ImpBreakLine: Start >= End?" );
@@ -1842,10 +1795,9 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
             USHORT nWordLen = nWordEnd - nWordStart;
             if ( ( nWordEnd >= nMaxBreakPos ) && ( nWordLen > 3 ) )
             {
-                // #104415# May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
-                // DBG_ASSERT( nWordEnd >= nMaxBreakPos, "Hyph: Break?" );
+                // May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
                 String aWord( *pNode, nWordStart, nWordLen );
-                sal_uInt16 nMinTrail = nWordEnd-nMaxBreakPos+1; 	//+1: Vor dem angeknacksten Buchstaben
+                sal_uInt16 nMinTrail = nWordEnd-nMaxBreakPos+1; //+1: Before the dickey letter
                 Reference< XHyphenatedWord > xHyphWord;
                 if (xHyphenator.is())
                     xHyphWord = xHyphenator->hyphenate( aWord, aLocale, aWord.Len() - nMinTrail, Sequence< PropertyValue >() );
@@ -1865,27 +1817,25 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
                         {
                             String aAlt( xHyphWord->getHyphenatedWord() );
 
-                            // Wir gehen von zwei Faellen aus, die nun
-                            // vorliegen koennen:
-                            // 1) packen wird zu pak-ken
-                            // 2) Schiffahrt wird zu Schiff-fahrt
-                            // In Fall 1 muss ein Zeichen ersetzt werden,
-                            // in Fall 2 wird ein Zeichen hinzugefuegt.
-                            // Die Identifikation wird erschwert durch Worte wie
-                            // "Schiffahrtsbrennesseln", da der Hyphenator alle
-                            // Position des Wortes auftrennt und "Schifffahrtsbrennnesseln"
-                            // ermittelt. Wir koennen also eigentlich nicht unmittelbar vom
-                            // Index des AlternativWord auf aWord schliessen.
-
-                            // Das ganze geraffel wird durch eine Funktion am
-                            // Hyphenator vereinfacht werden, sobald AMA sie einbaut...
+                            // We expect the two cases, which might exist now:
+                            // 1) packen becomes pak-ken
+                            // 2) Schiffahrt becomes Schiff-fahrt
+                            // In case 1, a character has to be replaced
+                            // in case 2 a character is added.
+                            // The identification is complicated by long
+                            // compound words because the Hyphenator separates
+                            // all position of the word.
+                            // "Schiffahrtsbrennesseln" -> "Schifffahrtsbrennnesseln"
+                 // We can thus actually not directly connect the index of the
+                            // AlternativeWord to aWord. The whole issue will be simplified
+                            // by a function in the  Hyphenator as soon as AMA builds this in...
                             sal_uInt16 nAltStart = _nWordLen - 1;
                             sal_uInt16 nTxtStart = nAltStart - (aAlt.Len() - aWord.Len());
                             sal_uInt16 nTxtEnd = nTxtStart;
                             sal_uInt16 nAltEnd = nAltStart;
 
-                            // Die Bereiche zwischen den nStart und nEnd ist
-                            // die Differenz zwischen Alternativ- und OriginalString.
+                            // The regions between the nStart and nEnd is the
+                            // difference between alternative and original string.
                             while( nTxtEnd < aWord.Len() && nAltEnd < aAlt.Len() &&
                                    aWord.GetChar(nTxtEnd) != aAlt.GetChar(nAltEnd) )
                             {
@@ -1893,7 +1843,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
                                 ++nAltEnd;
                             }
 
-                            // Wenn ein Zeichen hinzugekommen ist, dann bemerken wir es jetzt:
+                            // If a character is added, then we notice it now:
                             if( nAltEnd > nTxtEnd && nAltStart == nAltEnd &&
                                 aWord.GetChar( nTxtEnd ) == aAlt.GetChar(nAltEnd) )
                             {
@@ -1902,7 +1852,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
                                 ++nTxtEnd;
                             }
 
-                            DBG_ASSERT( ( nAltEnd - nAltStart ) == 1, "Alternate: Falsche Annahme!" );
+                            DBG_ASSERT( ( nAltEnd - nAltStart ) == 1, "Alternate: Wrong assumption!" );
 
                             if ( nTxtEnd > nTxtStart )
                                 cAlternateReplChar = aAlt.GetChar( nAltStart );
@@ -1921,22 +1871,22 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
 
         if ( nBreakPos <= pLine->GetStart() )
         {
-            // keine Trenner in Zeile => abhacken !
+            // No separator in line => Chop!
             nBreakPos = nMaxBreakPos;
-            // MT: I18N nextCharacters !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+            // I18N nextCharacters !
             if ( nBreakPos <= pLine->GetStart() )
-                nBreakPos = pLine->GetStart() + 1; 	// Sonst Endlosschleife!
+                nBreakPos = pLine->GetStart() + 1;  // Otherwise infinite loop!
         }
     }
 
-    // die angeknackste Portion ist die End-Portion
+    // the dickey portion is the end portion
     pLine->SetEnd( nBreakPos );
 
     sal_uInt16 nEndPortion = SplitTextPortion( pParaPortion, nBreakPos, pLine );
 
     if ( !bCompressBlank && !bHangingPunctuation )
     {
-        // #96187# When justification is not SVX_ADJUST_LEFT, it's important to compress
+        // When justification is not SVX_ADJUST_LEFT, it's important to compress
         // the trailing space even if there is enough room for the space...
         // Don't check for SVX_ADJUST_LEFT, doesn't matter to compress in this case too...
         DBG_ASSERT( nBreakPos > pLine->GetStart(), "ImpBreakLines - BreakPos not expected!" );
@@ -1947,15 +1897,15 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
     if ( bCompressBlank || bHangingPunctuation )
     {
         TextPortion* pTP = pParaPortion->GetTextPortions().GetObject( nEndPortion );
-        DBG_ASSERT( pTP->GetKind() == PORTIONKIND_TEXT, "BlankRubber: Keine TextPortion!" );
-        DBG_ASSERT( nBreakPos > pLine->GetStart(), "SplitTextPortion am Anfang der Zeile?" );
+        DBG_ASSERT( pTP->GetKind() == PORTIONKIND_TEXT, "BlankRubber: No TextPortion!" );
+        DBG_ASSERT( nBreakPos > pLine->GetStart(), "SplitTextPortion at the beginning of the line?" );
         sal_uInt16 nPosInArray = nBreakPos - 1 - pLine->GetStart();
         pTP->GetSize().Width() = ( nPosInArray && ( pTP->GetLen() > 1 ) ) ? pLine->GetCharPosArray()[ nPosInArray-1 ] : 0;
         pLine->GetCharPosArray()[ nPosInArray ] = pTP->GetSize().Width();
     }
     else if ( bHyphenated )
     {
-        // Eine Portion fuer den Trenner einbauen...
+        // A portion for inserting the separator ...
         TextPortion* pHyphPortion = new TextPortion( 0 );
         pHyphPortion->GetKind() = PORTIONKIND_HYPHENATOR;
         String aHyphText( CH_HYPH );
@@ -1966,7 +1916,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
             pPrev->SetLen( pPrev->GetLen() - 1 );
             pHyphPortion->SetLen( 1 );
             pHyphPortion->SetExtraValue( cAlternateReplChar );
-            // Breite der Portion davor korrigieren:
+            // Correct width of the portion above:
             pPrev->GetSize().Width() =
                 pLine->GetCharPosArray()[ nBreakPos-1 - pLine->GetStart() - 1 ];
         }
@@ -1976,7 +1926,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
             aHyphText.Insert( cAlternateExtraChar, 0 );
         }
 
-        // Breite der Hyph-Portion ermitteln:
+        // Determine the width of the Hyph-Portion:
         SvxFont aFont;
         SeekCursor( pParaPortion->GetNode(), nBreakPos, aFont );
         aFont.SetPhysFont( GetRefDevice() );
@@ -1990,13 +1940,13 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
 
 void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine, long nRemainingSpace )
 {
-    DBG_ASSERT( nRemainingSpace > 0, "AdjustBlocks: Etwas zuwenig..." );
-    DBG_ASSERT( pLine, "AdjustBlocks: Zeile ?!" );
+    DBG_ASSERT( nRemainingSpace > 0, "AdjustBlocks: Somewhat too little..." );
+    DBG_ASSERT( pLine, "AdjustBlocks: Line ?!" );
     if ( ( nRemainingSpace < 0 ) || pLine->IsEmpty() )
         return ;
 
     const USHORT nFirstChar = pLine->GetStart();
-    const USHORT nLastChar = pLine->GetEnd() -1;	// Last zeigt dahinter
+    const USHORT nLastChar = pLine->GetEnd() -1;    // Last points behind
     ContentNode* pNode = pParaPortion->GetNode();
 
     DBG_ASSERT( nLastChar < pNode->Len(), "AdjustBlocks: Out of range!" );
@@ -2042,9 +1992,9 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
     if ( !aPositions.Count() )
         return;
 
-    // Wenn das letzte Zeichen ein Blank ist, will ich es nicht haben!
-    // Die Breite muss auf die Blocker davor verteilt werden...
-    // Aber nicht, wenn es das einzige ist
+    // If the last character is a blank, it is rejected!
+    // The width must be distributed to the blockers in front...
+    // But not if it is the only one.
     if ( ( pNode->GetChar( nLastChar ) == ' ' ) && ( aPositions.Count() > 1 ) && ( MsLangId::getPrimaryLanguage( GetLanguage( EditPaM( pNode, nLastChar ) ) ) != LANGUAGE_ARABIC_PRIMARY_ONLY ) )
     {
         aPositions.Remove( aPositions.Count()-1, 1 );
@@ -2055,12 +2005,12 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
         long nBlankWidth = nRealWidth;
         if ( nLastChar > nPortionStart )
             nBlankWidth -= pLine->GetCharPosArray()[nLastChar-nFirstChar-1];
-        // Evtl. ist das Blank schon in ImpBreakLine abgezogen worden:
+        // Possibly the blank has already been deducted in ImpBreakLine:
         if ( nRealWidth == pLastPortion->GetSize().Width() )
         {
-            // Beim letzten Zeichen muss die Portion hinter dem Blank aufhoeren
-            // => Korrektur vereinfachen:
-            DBG_ASSERT( ( nPortionStart + pLastPortion->GetLen() ) == ( nLastChar+1 ), "Blank doch nicht am Portion-Ende?!" );
+            // For the last character the portion must stop behind the blank
+            // => Simplify correction:
+            DBG_ASSERT( ( nPortionStart + pLastPortion->GetLen() ) == ( nLastChar+1 ), "Blank actually not at the end of the portion!?");
             pLastPortion->GetSize().Width() -= nBlankWidth;
             nRemainingSpace += nBlankWidth;
         }
@@ -2071,11 +2021,11 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
     const long nMore4Everyone = nRemainingSpace / nGaps;
     long nSomeExtraSpace = nRemainingSpace - nMore4Everyone*nGaps;
 
-    DBG_ASSERT( nSomeExtraSpace < (long)nGaps, "AdjustBlocks: ExtraSpace zu gross" );
+    DBG_ASSERT( nSomeExtraSpace < (long)nGaps, "AdjustBlocks: ExtraSpace too large" );
     DBG_ASSERT( nSomeExtraSpace >= 0, "AdjustBlocks: ExtraSpace < 0 " );
 
-    // Die Positionen im Array und die Portion-Breiten korrigieren:
-    // Letztes Zeichen wird schon nicht mehr beachtet...
+    // Correct the positions in the Array and the portion widths:
+    // Last character won't be considered ...
     for ( USHORT n = 0; n < aPositions.Count(); n++ )
     {
         USHORT nChar = aPositions[n];
@@ -2086,7 +2036,7 @@ void ImpEditEngine::ImpAdjustBlocks( ParaPortion* pParaPortion, EditLine* pLine,
             TextPortion* pLastPortion = pParaPortion->GetTextPortions()[ nPortion ];
             USHORT nPortionEnd = nPortionStart + pLastPortion->GetLen();
 
-            // Die Breite der Portion:
+            // The width of the portion:
             pLastPortion->GetSize().Width() += nMore4Everyone;
             if ( nSomeExtraSpace )
                 pLastPortion->GetSize().Width()++;
@@ -2229,10 +2179,9 @@ void ImpEditEngine::ImpFindKashidas( ContentNode* pNode, USHORT nStart, USHORT n
 
 sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nPos, EditLine* pCurLine )
 {
-    DBG_ASSERT( pPortion, "SplitTextPortion: Welche ?" );
+    DBG_ASSERT( pPortion, "SplitTextPortion: Which ?" );
 
-    // Die Portion bei nPos wird geplittet, wenn bei nPos nicht
-    // sowieso ein Wechsel ist
+    // The portion at nPos is split, if there is not a transition at nPos anyway
     if ( nPos == 0 )
         return 0;
 
@@ -2246,12 +2195,8 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nP
         nTmpPos = nTmpPos + pTP->GetLen();
         if ( nTmpPos >= nPos )
         {
-            if ( nTmpPos == nPos )	// dann braucht nichts geteilt werden
+            if ( nTmpPos == nPos )  // then nothing needs to be split
             {
-                // Skip Portions with ExtraSpace
-//				while ( ( (nSplitPortion+1) < nPortions ) && (pPortion->GetTextPortions().GetObject(nSplitPortion+1)->GetKind() == PORTIONKIND_EXTRASPACE ) )
-//					nSplitPortion++;
-
                 return nSplitPortion;
             }
             pTextPortion = pTP;
@@ -2259,18 +2204,18 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_uInt16 nP
         }
     }
 
-    DBG_ASSERT( pTextPortion, "Position ausserhalb des Bereichs!" );
-    DBG_ASSERT( pTextPortion->GetKind() == PORTIONKIND_TEXT, "SplitTextPortion: Keine TextPortion!" );
+    DBG_ASSERT( pTextPortion, "Position outside the area!" );
+    DBG_ASSERT( pTextPortion->GetKind() == PORTIONKIND_TEXT, "SplitTextPortion: No TextPortion!" );
 
     sal_uInt16 nOverlapp = nTmpPos - nPos;
     pTextPortion->GetLen() = pTextPortion->GetLen() - nOverlapp;
     TextPortion* pNewPortion = new TextPortion( nOverlapp );
     pPortion->GetTextPortions().Insert( pNewPortion, nSplitPortion+1 );
-    // Groessen setzen:
+    // Set sizes
     if ( pCurLine )
     {
-        // Kein neues GetTextSize, sondern Werte aus Array verwenden:
-        DBG_ASSERT( nPos > pCurLine->GetStart(), "SplitTextPortion am Anfang der Zeile?" );
+        // No new GetTextSize, instead use values from the Array:
+        DBG_ASSERT( nPos > pCurLine->GetStart(), "SplitTextPortion at the beginning of the line?" );
         pTextPortion->GetSize().Width() = pCurLine->GetCharPosArray()[ nPos-pCurLine->GetStart()-1 ];
 
         if ( pTextPortion->GetExtraInfos() && pTextPortion->GetExtraInfos()->bCompressed )
@@ -2297,7 +2242,7 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
 {
     sal_uInt16 nStartPos = rStart;
     ContentNode* pNode = pParaPortion->GetNode();
-    DBG_ASSERT( pNode->Len(), "CreateTextPortions sollte nicht fuer leere Absaetze verwendet werden!" );
+    DBG_ASSERT( pNode->Len(), "CreateTextPortions should not be used for empty paragraphs!" );
 
     SortedPositions aPositions;
     aPositions.Insert( (sal_uInt32) 0 );
@@ -2306,8 +2251,8 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
     EditCharAttrib* pAttrib = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
     while ( pAttrib )
     {
-        // Start und Ende in das Array eintragen...
-        // Die InsertMethode laesst keine doppelten Werte zu....
+        // Insert Start and End into the Array...
+        // The Insert method does not allow for duplicate values....
         aPositions.Insert( pAttrib->GetStart() );
         aPositions.Insert( pAttrib->GetEnd() );
         nAttr++;
@@ -2340,9 +2285,9 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
         aPositions.Insert( mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen );
     }
 
-    // Ab ... loeschen:
-    // Leider muss die Anzahl der TextPortions mit aPositions.Count()
-    // nicht uebereinstimmen, da evtl. Zeilenumbrueche...
+    // From ... Delete:
+    // Unfortunately, the number of text portions does not have to match
+    // aPositions.Count(), since there might be line breaks...
     sal_uInt16 nPortionStart = 0;
     sal_uInt16 nInvPortion = 0;
     sal_uInt16 nP;
@@ -2358,18 +2303,18 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
             break;
         }
     }
-    DBG_ASSERT( nP < pParaPortion->GetTextPortions().Count() || !pParaPortion->GetTextPortions().Count(), "Nichts zum loeschen: CreateTextPortions" );
+    DBG_ASSERT( nP < pParaPortion->GetTextPortions().Count() || !pParaPortion->GetTextPortions().Count(), "Nothing to delete: CreateTextPortions" );
     if ( nInvPortion && ( nPortionStart+pParaPortion->GetTextPortions().GetObject(nInvPortion)->GetLen() > nStartPos ) )
     {
-        // lieber eine davor...
-        // Aber nur wenn es mitten in der Portion war, sonst ist es evtl.
-        // die einzige in der Zeile davor !
+        // prefer one in front ...
+        // But only if it was in the middle of the portion of, otherwise it
+        // might be the only one in the row in front!
         nInvPortion--;
         nPortionStart = nPortionStart - pParaPortion->GetTextPortions().GetObject(nInvPortion)->GetLen();
     }
     pParaPortion->GetTextPortions().DeleteFromPortion( nInvPortion );
 
-    // Eine Portion kann auch durch einen Zeilenumbruch entstanden sein:
+    // A portion may also have been formed by a line break:
     aPositions.Insert( nPortionStart );
 
     sal_uInt16 nInvPos;
@@ -2385,35 +2330,34 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16& r
         pParaPortion->GetTextPortions().Insert( pNew, pParaPortion->GetTextPortions().Count());
     }
 
-    DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine Portions?!" );
+    DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "No Portions?!" );
 #ifdef EDITDEBUG
-    DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions kaputt?" );
+    DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portion is broken?" );
 #endif
 }
 
 void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nStartPos, short nNewChars )
 {
-    DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "Keine Portions!" );
-    DBG_ASSERT( nNewChars, "RecalcTextPortion mit Diff == 0" );
+    DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "No Portions!" );
+    DBG_ASSERT( nNewChars, "RecalcTextPortion with Diff == 0" );
 
     ContentNode* const pNode = pParaPortion->GetNode();
     if ( nNewChars > 0 )
     {
-        // Wenn an nStartPos ein Attribut beginnt/endet, faengt eine neue Portion
-        // an, ansonsten wird die Portion an nStartPos erweitert.
-
+        // If an Attribute begins/ends at nStartPos, then a new portion starts
+        // otherwise the portion is extended at nStartPos.
         if ( pNode->GetCharAttribs().HasBoundingAttrib( nStartPos ) || IsScriptChange( EditPaM( pNode, nStartPos ) ) )
         {
             sal_uInt16 nNewPortionPos = 0;
             if ( nStartPos )
                 nNewPortionPos = SplitTextPortion( pParaPortion, nStartPos ) + 1;
 
-            // Eine leere Portion kann hier stehen, wenn der Absatz leer war,
-            // oder eine Zeile durch einen harten Zeilenumbruch entstanden ist.
+            // A blank portion may be here, if the paragraph was empty,
+            // or if a line was created by a hard line break.
             if ( ( nNewPortionPos < pParaPortion->GetTextPortions().Count() ) &&
                     !pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() )
             {
-                DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "Leere Portion war keine TextPortion!" );
+                DBG_ASSERT( pParaPortion->GetTextPortions()[nNewPortionPos]->GetKind() == PORTIONKIND_TEXT, "the empty portion was no TextPortion!" );
                 USHORT & r =
                     pParaPortion->GetTextPortions()[nNewPortionPos]->GetLen();
                 r = r + nNewChars;
@@ -2430,19 +2374,20 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
             const sal_uInt16 nTP = pParaPortion->GetTextPortions().
                 FindPortion( nStartPos, nPortionStart );
             TextPortion* const pTP = pParaPortion->GetTextPortions()[ nTP ];
-            DBG_ASSERT( pTP, "RecalcTextPortion: Portion nicht gefunden"  );
+            DBG_ASSERT( pTP, "RecalcTextPortion: Portion not found"  );
             pTP->GetLen() = pTP->GetLen() + nNewChars;
             pTP->GetSize().Width() = (-1);
         }
     }
     else
     {
-        // Portion schrumpfen oder ggf. entfernen.
-        // Vor Aufruf dieser Methode muss sichergestellt sein, dass
-        // keine Portions in dem geloeschten Bereich lagen!
+        // Shrink or remove portion if necessary.
+        // Before calling this method it must be ensured that no portions were
+        // in the deleted area!
 
-        // Es darf keine reinragende oder im Bereich startende Portion geben,
-        // also muss nStartPos <= nPos <= nStartPos - nNewChars(neg.) sein
+        // There must be no portions extending into the area or portions starting in
+        // the area, so it must be:
+        //    nStartPos <= nPos <= nStartPos - nNewChars(neg.)
         sal_uInt16 nPortion = 0;
         sal_uInt16 nPos = 0;
         sal_uInt16 nEnd = nStartPos-nNewChars;
@@ -2453,16 +2398,16 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
             pTP = pParaPortion->GetTextPortions()[ nPortion ];
             if ( ( nPos+pTP->GetLen() ) > nStartPos )
             {
-                DBG_ASSERT( nPos <= nStartPos, "Start falsch!" );
-                DBG_ASSERT( nPos+pTP->GetLen() >= nEnd, "End falsch!" );
+                DBG_ASSERT( nPos <= nStartPos, "Wrong Start!" );
+                DBG_ASSERT( nPos+pTP->GetLen() >= nEnd, "Wrong End!" );
                 break;
             }
             nPos = nPos + pTP->GetLen();
         }
-        DBG_ASSERT( pTP, "RecalcTextPortion: Portion nicht gefunden" );
+        DBG_ASSERT( pTP, "RecalcTextPortion: Portion not found" );
         if ( ( nPos == nStartPos ) && ( (nPos+pTP->GetLen()) == nEnd ) )
         {
-            // Portion entfernen;
+            // Remove portion;
             BYTE nType = pTP->GetKind();
             pParaPortion->GetTextPortions().Remove( nPortion );
             delete pTP;
@@ -2471,7 +2416,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
                 TextPortion* pNext = pParaPortion->GetTextPortions()[ nPortion ];
                 if ( pNext && !pNext->GetLen() )
                 {
-                    // Dummy-Portion entfernen
+                    // Remove dummy portion
                     pParaPortion->GetTextPortions().Remove( nPortion );
                     delete pNext;
                 }
@@ -2479,18 +2424,18 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
         }
         else
         {
-            DBG_ASSERT( pTP->GetLen() > (-nNewChars), "Portion zu klein zum schrumpfen!" );
+            DBG_ASSERT( pTP->GetLen() > (-nNewChars), "Portion too small to shrink! ");
             pTP->GetLen() = pTP->GetLen() + nNewChars;
         }
 
-        // ganz am Schluss darf keine HYPHENATOR-Portion stehen bleiben...
-        DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "RecalcTextPortions: Keine mehr da!" );
+        // No HYPHENATOR portion is allowed to get stuck right at the end...
+        DBG_ASSERT( pParaPortion->GetTextPortions().Count(), "RecalcTextPortions: Nothing left! ");
         sal_uInt16 nLastPortion = pParaPortion->GetTextPortions().Count() - 1;
         pTP = pParaPortion->GetTextPortions().GetObject( nLastPortion );
         if ( pTP->GetKind() == PORTIONKIND_HYPHENATOR )
         {
-            // Portion wegschmeissen, ggf. die davor korrigieren, wenn
-            // die Hyph-Portion ein Zeichen geschluckt hat...
+            // Discard portion; if possible, correct the ones before,
+            // if the Hyphenator portion has swallowed one character...
             pParaPortion->GetTextPortions().Remove( nLastPortion );
             if ( nLastPortion && pTP->GetLen() )
             {
@@ -2503,7 +2448,7 @@ void ImpEditEngine::RecalcTextPortion( ParaPortion* pParaPortion, sal_uInt16 nSt
         }
     }
 #ifdef EDITDEBUG
-    DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions kaputt?" );
+    DBG_ASSERT( pParaPortion->DbgCheckTextPortions(), "Portions are broken?" );
 #endif
 }
 
@@ -2558,9 +2503,9 @@ void ImpEditEngine::SetFixedCellHeight( BOOL bUseFixedCellHeight )
 
 void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rFont, OutputDevice* pOut, sal_uInt16 nIgnoreWhich )
 {
-    // Es war mal geplant, SeekCursor( nStartPos, nEndPos, ... ), damit nur
-    // ab der StartPosition neu gesucht wird.
-    // Problem: Es mussten zwei Listen beruecksichtigt/gefuehrt werden:
+    // It was planned, SeekCursor( nStartPos, nEndPos, ... ), so that it would
+    // only be searched anew at the StartPosition.
+    // Problem: There would be two lists to consider/handle:
     // OrderedByStart,OrderedByEnd.
 
     if ( nPos > pNode->Len() )
@@ -2613,17 +2558,15 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
         EditCharAttrib* pAttrib = GetAttrib( rAttribs, nAttr );
         while ( pAttrib && ( pAttrib->GetStart() <= nPos ) )
         {
-            // Beim Seeken nicht die Attr beruecksichtigen, die dort beginnen!
-            // Leere Attribute werden beruecksichtigt( verwendet), da diese
-            // gerade eingestellt wurden.
-            // 12.4.95: Doch keine Leeren Attribute verwenden:
-            // - Wenn gerade eingestellt und leer => keine Auswirkung auf Font
-            // In einem leeren Absatz eingestellte Zeichen werden sofort wirksam.
+            // when seeking, ignore attributes which start there! Empty attributes
+            // are considered (used) as these are just set. But do not use empty
+            // attributes: When just set and empty => no effect on font
+            // In a blank paragraph, set characters take effect immediately.
             if ( ( pAttrib->Which() != nIgnoreWhich ) &&
                  ( ( ( pAttrib->GetStart() < nPos ) && ( pAttrib->GetEnd() >= nPos ) )
                      || ( !pNode->Len() ) ) )
             {
-                DBG_ASSERT( ( pAttrib->Which() >= EE_CHAR_START ) && ( pAttrib->Which() <= EE_FEATURE_END ), "Unglueltiges Attribut in Seek() " );
+                DBG_ASSERT( ( pAttrib->Which() >= EE_CHAR_START ) && ( pAttrib->Which() <= EE_FEATURE_END ), "Invalid Attribute in Seek() " );
                 if ( IsScriptItemValid( pAttrib->Which(), nScriptType ) )
                 {
                     pAttrib->SetFont( rFont, pOut );
@@ -2654,20 +2597,18 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
 
     if ( aStatus.DoNotUseColors() )
     {
-        // Hack fuer DL,weil JOE staendig die Pooldefaults verbiegt!
-        // const SvxColorItem& rColorItem = (const SvxColorItem&)aEditDoc.GetItemPool().GetDefaultItem( EE_CHAR_COLOR );
         rFont.SetColor( /* rColorItem.GetValue() */ COL_BLACK );
     }
 
     if ( aStatus.DoStretch() || ( nRelWidth != 100 ) )
     {
-        // Fuer das aktuelle Ausgabegeraet, weil es sonst bei einem
-        // Drucker als RefDev auf dem Bildschirm #?!@' aussieht!
+        // For the current Output device, because otherwise if RefDev=Printer its looks
+        // ugly on the screen!
         OutputDevice* pDev = pOut ? pOut : GetRefDevice();
         rFont.SetPhysFont( pDev );
         FontMetric aMetric( pDev->GetFontMetric() );
-        // Fuer die Hoehe nicht die Metriken nehmen, da das bei
-        // Hoch-/Tiefgestellt schief geht.
+        // For the height do not consider the metrics, because it will go
+        // wrong at Superscript/Subscript.
         Size aRealSz( aMetric.GetSize().Width(), rFont.GetSize().Height() );
         if ( aStatus.DoStretch() )
         {
@@ -2688,23 +2629,22 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
                     aRealSz.Width() *= nStretchX;
                     aRealSz.Width() /= 100;
 
-                    // Auch das Kerning: (long wegen Zwischenergebnis)
+                    // Also the Kerning: (long due to handle Interim results)
                     long nKerning = rFont.GetFixKerning();
 /*
-  Die Ueberlegung war: Wenn neg. Kerning, aber StretchX = 200
-  => Nicht das Kerning verdoppelt, also die Buchstaben weiter
-  zusammenziehen
+  The consideration was: If negative kerning, but StretchX = 200
+  => Do not double the kerning, thus pull the letters closer together
   ---------------------------
-  Kern	StretchX	=>Kern
+  Kern  StretchX    =>Kern
   ---------------------------
-  >0		<100		< (Proportional)
-  <0		<100		< (Proportional)
-  >0		>100		> (Proportional)
-  <0		>100		< (Der Betrag, also Antiprop)
+  >0        <100        < (Proportional)
+  <0        <100        < (Proportional)
+  >0        >100        > (Proportional)
+  <0        >100        < (The amount, thus disproportional)
 */
                     if ( ( nKerning < 0  ) && ( nStretchX > 100 ) )
                     {
-                        // Antiproportional
+                        // disproportional
                         nKerning *= 100;
                         nKerning /= nStretchX;
                     }
@@ -2724,7 +2664,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
             aRealSz.Width() /= 100;
         }
         rFont.SetSize( aRealSz );
-        // Font wird nicht restauriert...
+        // Font is not restored ...
     }
 
     if ( ( ( rFont.GetColor() == COL_AUTO ) || ( IsForceAutoColor() ) ) && pOut )
@@ -2781,9 +2721,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
 
 void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics, SvxFont& rFont )
 {
-    // Fuer Zeilenhoehe bei Hoch/Tief erstmal ohne Propr!
+    // for line height at high / low first without Propr!
     sal_uInt16 nPropr = rFont.GetPropr();
-    DBG_ASSERT( ( nPropr == 100 ) || rFont.GetEscapement(), "Propr ohne Escape?!" );
+    DBG_ASSERT( ( nPropr == 100 ) || rFont.GetEscapement(), "Propr without Escape?!" );
     if ( nPropr != 100 )
     {
         rFont.SetPropr( 100 );
@@ -2800,52 +2740,35 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
 
     if ( IsFixedCellHeight() )
     {
-/*	creating correct proportional ascent and descent values lead to problems if different fonts are used
-    in the same portion, it results in a bigger linespacing.
-        sal_Int32 f = nAscent + nDescent;
-        if ( f )
-        {
-            sal_Int32 nHeight = ImplCalculateFontIndependentLineSpacing( rFont.GetHeight() );
-            nAscent  = (sal_Int16)(( nHeight * nAscent ) / f );
-            nDescent = (sal_Int16)(nHeight - nAscent);
-        }
-*/
         nAscent = sal::static_int_cast< sal_uInt16 >( rFont.GetHeight() );
         nDescent= sal::static_int_cast< sal_uInt16 >( ImplCalculateFontIndependentLineSpacing( rFont.GetHeight() ) - nAscent );
     }
     else
     {
         sal_uInt16 nIntLeading = ( aMetric.GetIntLeading() > 0 ) ? (sal_uInt16)aMetric.GetIntLeading() : 0;
-        // Fonts ohne Leading bereiten Probleme
+        // Fonts without leading cause problems
         if ( ( nIntLeading == 0 ) && ( pRefDev->GetOutDevType() == OUTDEV_PRINTER ) )
         {
-            // Da schaun wir mal, was fuer eine Leading ich auf dem
-            // Bildschirm erhalte
+            // Lets see what Leading one gets on the screen
             VirtualDevice* pVDev = GetVirtualDevice( pRefDev->GetMapMode(), pRefDev->GetDrawMode() );
             rFont.SetPhysFont( pVDev );
             aMetric = pVDev->GetFontMetric();
 
-            // Damit sich die Leading nicht wieder rausrechnet,
-            // wenn die ganze Zeile den Font hat, nTmpLeading.
-
-            // 4/96: Kommt bei HP Laserjet 4V auch nicht hin
-            // => Werte komplett vom Bildschirm holen.
-    //		sal_uInt16 nTmpLeading = (sal_uInt16)aMetric.GetLeading();
-    //		nAscent += nTmpLeading;
+            // This is so that the Leading does not count itself out again,
+            // if the whole line has the font, nTmpLeading.
             nAscent = (sal_uInt16)aMetric.GetAscent();
             nDescent = (sal_uInt16)aMetric.GetDescent();
-    //		nLeading = (sal_uInt16)aMetric.GetLeading();
         }
     }
     if ( nAscent > rCurMetrics.nMaxAscent )
         rCurMetrics.nMaxAscent = nAscent;
     if ( nDescent > rCurMetrics.nMaxDescent )
         rCurMetrics.nMaxDescent= nDescent;
-    // Sonderbehandlung Hoch/Tief:
+    // Special treatment of high/low:
     if ( rFont.GetEscapement() )
     {
-        // Jetzt unter Beruecksichtigung von Escape/Propr
-        // Ascent oder Descent ggf vergroessern
+        // Now in consideration of Escape/Propr
+        // possibly enlarge Ascent or Descent
         short nDiff = (short)(rFont.GetSize().Height()*rFont.GetEscapement()/100L);
         if ( rFont.GetEscapement() > 0 )
         {
@@ -2853,7 +2776,7 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
             if ( nAscent > rCurMetrics.nMaxAscent )
                 rCurMetrics.nMaxAscent = nAscent;
         }
-        else	// muss < 0 sein
+        else    // has to be < 0
         {
             nDescent = (sal_uInt16) (((long)nDescent)*nPropr/100 - nDiff);
             if ( nDescent > rCurMetrics.nMaxDescent )
@@ -2876,15 +2799,15 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
     EditLine* pLine;
     Point aTmpPos;
     Point aRedLineTmpPos;
-    DBG_ASSERT( GetParaPortions().Count(), "Keine ParaPortion?!" );
+    DBG_ASSERT( GetParaPortions().Count(), "No ParaPortion?!" );
     SvxFont aTmpFont( GetParaPortions()[0]->GetNode()->GetCharAttribs().GetDefFont() );
     Font aOldFont( pOutDev->GetFont() );
     vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOutDev->GetExtOutDevData() );
 
-    // Bei gedrehtem Text wird aStartPos als TopLeft angesehen, da andere
-    // Informationen fehlen, und sowieso das ganze Object ungescrollt
-    // dargestellt wird.
-    // Das Rechteck ist unendlich gross.
+    // In the case of rotated text is aStartPos considered TopLeft because
+    // other information is missing, and since the whole object is shown anyway
+    // un-scrolled.
+    // The rectangle is infinite.
     Point aOrigin( aStartPos );
     double nCos = 0.0, nSin = 0.0;
     if ( nOrientation )
@@ -2899,22 +2822,17 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
     GDIMetaFile* pMtf = pOutDev->GetConnectMetaFile();
     const bool bMetafileValid( pMtf != NULL );
 
-    // Fuer OnlineSpelling:
-//	EditPaM aCursorPos;
-//	if( GetStatus().DoOnlineSpelling() && pActiveView )
-//		aCurPos = pActiveView->pImpEditView->GetEditSelections().Max();
-
     long nVertLineSpacing = CalcVertLineSpacing(aStartPos);
 
     // --------------------------------------------------
-    // Ueber alle Absaetze...
+    // Over all the paragraphs ...
     // --------------------------------------------------
     for ( sal_uInt16 n = 0; n < GetParaPortions().Count(); n++ )
     {
         ParaPortion* pPortion = GetParaPortions().GetObject( n );
         DBG_ASSERT( pPortion, "NULL-Pointer in TokenList in Paint" );
-        // falls beim Tippen Idle-Formatierung, asynchrones Paint.
-        // Unsichtbare Portions koennen ungueltig sein.
+        // if when typing idle formatting,  asynchronous Paint.
+        // Invisible Portions may be invalid.
         if ( pPortion->IsVisible() && pPortion->IsInvalid() )
             return;
 
@@ -2929,7 +2847,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
 
         {
             // --------------------------------------------------
-            // Ueber die Zeilen des Absatzes...
+            // Over the lines of the paragraph ...
             // --------------------------------------------------
             sal_uInt16 nLines = pPortion->GetLines().Count();
             sal_uInt16 nLastLine = nLines-1;
@@ -2947,7 +2865,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
             for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
             {
                 pLine = pPortion->GetLines().GetObject(nLine);
-                DBG_ASSERT( pLine, "NULL-Pointer im Zeileniterator in UpdateViews" );
+                DBG_ASSERT( pLine, "NULL-Pointer in the line iterator in UpdateViews" );
                 aTmpPos = aStartPos;
                 if ( !IsVertical() )
                 {
@@ -2975,46 +2893,33 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
                     // does, too. No change for not-layouting (painting).
                     if(0 == nLine) // && !bStripOnly)
                     {
-                        // VERT???
                         GetEditEnginePtr()->PaintingFirstLine( n, aParaStart, aTmpPos.Y(), aOrigin, nOrientation, pOutDev );
                     }
 
                     // --------------------------------------------------
-                    // Ueber die Portions der Zeile...
+                    // Over the Portions of the line ...
                     // --------------------------------------------------
                     nIndex = pLine->GetStart();
                     for ( sal_uInt16 y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ )
                     {
-                        DBG_ASSERT( pPortion->GetTextPortions().Count(), "Zeile ohne Textportion im Paint!" );
+                        DBG_ASSERT( pPortion->GetTextPortions().Count(), "Line without Textportion in Paint!" );
                         TextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( y );
-                        DBG_ASSERT( pTextPortion, "NULL-Pointer im Portioniterator in UpdateViews" );
+                        DBG_ASSERT( pTextPortion, "NULL-Pointer in Portion iterator in UpdateViews" );
 
                         long nPortionXOffset = GetPortionXOffset( pPortion, pLine, y );
                         if ( !IsVertical() )
                         {
                             aTmpPos.X() = aStartPos.X() + nPortionXOffset;
                             if ( aTmpPos.X() > aClipRec.Right() )
-                                break;	// Keine weitere Ausgabe in Zeile noetig
+                                break;  // No further output in line necessary
                         }
                         else
                         {
                             aTmpPos.Y() = aStartPos.Y() + nPortionXOffset;
                             if ( aTmpPos.Y() > aClipRec.Bottom() )
-                                break;	// Keine weitere Ausgabe in Zeile noetig
+                                break;  // No further output in line necessary
                         }
 
-                        // R2L replaces with obove...
-                        // New position after processing R2L text...
-// R2L                        if ( nR2LWidth && !pTextPortion->GetRightToLeft() )
-// R2L                        {
-// R2L							if ( !IsVertical() )
-// R2L								aTmpPos.X() += nR2LWidth;
-// R2L							else
-// R2L								aTmpPos.Y() += nR2LWidth;
-// R2L
-// R2L                            nR2LWidth = 0;
-// R2L                        }
-
                         switch ( pTextPortion->GetKind() )
                         {
                             case PORTIONKIND_TEXT:
@@ -3165,8 +3070,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
                                 else if ( pTextPortion->GetKind() == PORTIONKIND_FIELD )
                                 {
                                     EditCharAttrib* pAttr = pPortion->GetNode()->GetCharAttribs().FindFeature( nIndex );
-                                    DBG_ASSERT( pAttr, "Feld nicht gefunden" );
-                                    DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Feld vom falschen Typ!" );
+                                    DBG_ASSERT( pAttr, "Field not found");
+                                    DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Field of the wrong type! ");
                                     aText = ((EditCharAttribField*)pAttr)->GetFieldValue();
                                     nTextStart = 0;
                                     nTextLen = aText.Len();
@@ -3219,24 +3124,6 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
                                 if (pTextPortion->IsRightToLeft())
                                     aRedLineTmpPos.X() += pTextPortion->GetSize().Width();
 
-//L2R                                if ( pTextPortion->GetRightToLeft() )
-//L2R                                {
-//L2R                                    sal_uInt16 nNextPortion = y+1;
-//L2R                                    while ( nNextPortion <= pLine->GetEndPortion() )
-//L2R                                    {
-//L2R						                TextPortion* pNextTextPortion = pPortion->GetTextPortions().GetObject( nNextPortion );
-//L2R                                        if ( pNextTextPortion->GetRightToLeft() )
-//L2R                                        {
-//L2R			                                if ( !IsVertical() )
-//L2R                                                aOutPos.X() += pNextTextPortion->GetSize().Width();
-//L2R			                                else
-//L2R                                                aOutPos.Y() += pNextTextPortion->GetSize().Width();
-//L2R                                        }
-//L2R                                        else
-//L2R                                            break;
-//L2R                                        nNextPortion++;
-//L2R                                    }
-//L2R                                }
                                 if ( bStripOnly )
                                 {
                                     EEngineData::WrongSpellVector aWrongSpellVector;
@@ -3335,7 +3222,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRec, Point aSta
                                     short nEsc = aTmpFont.GetEscapement();
                                     if ( nOrientation )

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list