[Libreoffice-commits] core.git: vcl/source

Luc Castermans luc.castermans at gmail.com
Mon Feb 10 08:46:43 PST 2014


 vcl/source/filter/sgvspln.hxx    |   38 +--
 vcl/source/filter/sgvtext.cxx    |  384 ++++++++++++++++++---------------------
 vcl/source/filter/wmf/enhwmf.cxx |    2 
 vcl/source/filter/wmf/winmtf.hxx |   28 +-
 vcl/source/filter/wmf/winwmf.cxx |   16 -
 vcl/source/filter/wmf/wmfwr.cxx  |   60 +++---
 vcl/source/filter/wmf/wmfwr.hxx  |   52 ++---
 7 files changed, 280 insertions(+), 300 deletions(-)

New commits:
commit 82d05f63fef45ff8d6c35ba15fa743c461314e00
Author: Luc Castermans <luc.castermans at gmail.com>
Date:   Sun Feb 9 13:54:18 2014 +0100

    Translated German comments
    
    Change-Id: Ia21618d8475f02cb0fe9c55ae70d2598435087c5
    Reviewed-on: https://gerrit.libreoffice.org/7951
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/filter/sgvspln.hxx b/vcl/source/filter/sgvspln.hxx
index 910d243..f588916 100644
--- a/vcl/source/filter/sgvspln.hxx
+++ b/vcl/source/filter/sgvspln.hxx
@@ -24,16 +24,14 @@
 |*
 |*    CalcSpline()
 |*
-|*    Beschreibung      Berechnet die Koeffizienten eines parametrischen
-|*                      natrlichen oder periodischen kubischen
-|*                      Polynomsplines. Die Eckpunkte des šbergebenen
-|*                      Polygons werden als Sttzstellen angenommen.
-|*                      n liefert die Anzahl der Teilpolynome.
-|*                      Ist die Berechnung fehlerfrei verlaufen, so
-|*                      liefert die Funktion true. Nur in diesem Fall
-|*                      ist Speicher fr die Koeffizientenarrays
-|*                      allokiert, der dann sp„ter vom Aufrufer mittels
-|*                      delete freizugeben ist.
+|*    Description       Calculates the coefficients of parametrised
+|*                      natural or periodic cubic polynom-splines.
+|*                      The corner points of the polygon passed are used
+|*                      as support points. n returns the number of partial polynoms.
+|*                      This function returns TRUE if no error occured.
+|*                      Only in this case memory for the coefficient array
+|*                      has been allocated, which can be freed by the caller
+|*                      using a delete.
 |*
 *************************************************************************/
 
@@ -43,17 +41,17 @@ bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
 
 /*************************************************************************
 |*
-|*    Poly2Spline()
+|*    Spline2Poly()
 |*
-|*    Beschreibung      Konvertiert einen parametrichen kubischen
-|*                      Polynomspline Spline (natrlich oder periodisch)
-|*                      in ein angen„hertes Polygon.
-|*                      Die Funktion liefert false, wenn ein Fehler bei
-|*                      der Koeffizientenberechnung aufgetreten ist oder
-|*                      das Polygon zu gro?wird (>PolyMax=16380). Im 1.
-|*                      Fall hat das Polygon 0, im 2. Fall PolyMax Punkte.
-|*                      Um Koordinatenberl„ufe zu vermeiden werden diese
-|*                      auf +/-32000 begrenzt.
+|*    Description       converts a parametrised cubic spline (natural
+|*                      or periodic) to an approximate polygon.
+|*                      The function returns false, if an error occured
+|*                      during the calculation of the coefficients or
+|*                      the polygon became too large (>PolyMax=16380).
+|*                      In the first case the polygon has 0, in the
+|*                      second case PolyMax points.
+|*                      To prevent coordinate overflows we limit
+|*                      them to +/-32000.
 |*
 *************************************************************************/
 bool Spline2Poly(Polygon& rSpln, bool Periodic, Polygon& rPoly);
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index be514af..b5355ca 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -38,7 +38,7 @@ extern SgfFontLst* pSgfFonts;
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 //
-//  Einschraenkungen: Schatten nur grau, 2D und mit fixem Abstand.
+//  Limitations:  only grey shadows, 2D and with fixed distance.
 //
 //
 //
@@ -50,66 +50,66 @@ extern SgfFontLst* pSgfFonts;
 /////////////////////////////////////////////////////////////////////////////////
 // AbsBase.Pas
 
-// vvv Sonderzeichen im TextBuffer vvv
-#define  TextEnd        0 /* ^@ Ende der Zeichenkette                           */
-#define  HardSpace      6 /* ^F Hartspace (wird nicht umbrochen) ,' '           */
-#define  SoftTrennK    11 /* ^K Zeichen fuer k-c-Austausch bei Trennung, 'k'    */
-#define  AbsatzEnd     13 /* ^M Neuer Absatz =CR                                */
-#define  HardTrenn     16 /* ^P Hartes Trennzeichen (wird nicht umbrochen), '-' */
-#define  SoftTrennAdd  19 /* ^S Zusatz-Zeichen Trennung von z.b."Schiff-fahrt"  */
-#define  Escape        27 /* ^[ Escapesequenz einleiten                         */
-#define  SoftTrenn     31 /* ^_ Weiches Trennzeichen, '-' nur Zeilenende        */
+// vvv special characters in text buffer vvv
+#define  TextEnd        0 /* ^@ end of character sequence                       */
+#define  HardSpace      6 /* ^F non-breaking space,' '                          */
+#define  SoftTrennK    11 /* ^K character for k-c-switch for separation, 'k'    */
+#define  AbsatzEnd     13 /* ^M new paragraph=CR                                */
+#define  HardTrenn     16 /* ^P hard separator (not wrapped), '-'               */
+#define  SoftTrennAdd  19 /* ^S extra-character, separates e.g. "schiff-fahrt"  */
+#define  Escape        27 /* ^[ start of escape sequence                        */
+#define  SoftTrenn     31 /* ^_ soft separator, '-' only end of line            */
 #define  MaxEscValLen  8
 #define  MaxEscLen     (MaxEscValLen+3)
 
 //==============================================================================
-// Escapesequenzen: [Esc]<Ident><Value>[Esc]  also mind. 4 Char
-// Max. Laenge von Value soll sein: 8 Char (7+Vorzeichen). Demnach max. Laenge
-// einer Escapesequenz: 11 Char.
+// Escape sequences: [Esc]<Ident><Value>[Esc]  at least 4 characters
+// Max length of value should be: 8 chars (7+sign). Therefore max. length
+// of a escape sequence: 11 chars.
 // Identifer:
 
-#define  EscFont   'F' /* FontID, z.B. 92500 fuer CG Times                          */
-#define  EscGrad   'G' /* Schriftgrad 1..255 fuer <<Pt-127<<Pt                      */
-#define  EscBreit  'B' /* Breite 1..255% des Schriftgrades                          */
-#define  EscKaptS  'K' /* Kapitaelchengroesse 1..255% des Schriftgrades             */
-#define  EscLFeed  'L' /* Zeilenabstand 1..32767% vom max. Schriftgrad der Zeile    */
-                        // oder 1..32767 fuer 1..16383<<Pt absolut (Wenn Bit 15=1)
-#define  EscSlant  'S' /* Kursiv(Winkel) 1..8999 fuer 0.01deg..89.99deg             */
-#define  EscVPos   'V' /* Zeichen Vertikal-Position  1..255 fuer <<Pt..127<<Pt      */
-#define  EscZAbst  'Z' /* Zeichenabstand -128..127%                                 */
-#define  EscHJust  'A' /* H-Justify    Absatz: Links, Zentr, Rechts, Block, Austreibend, Gesperrt (0..5)*/
-
-#define  EscFarbe  'C' /* Farbe 0..7                                                */
-#define  EscBFarb  'U' /* BackFarbe 0..7                                            */
-#define  EscInts   'I' /* Farbintensitaet 0..100%                                   */
-#define  EscMustr  'M' /* Muster 0..? inkl. Transp...                               */
-#define  EscMFarb  'O' /* Musterfarbe 0..7                                          */
-#define  EscMBFrb  'P' /* 2. Musterfarbe 0..7                                       */
-#define  EscMInts  'W' /* Musterintensitaet 0..7                                    */
-
-#define  EscSMstr  'E' /* Schattenmuster 0..? inkl. Transp...                       */
-#define  EscSFarb  'R' /* Schattenfarbe 0..7                                        */
-#define  EscSBFrb  'T' /* 2. Schattenfarbe 0..7                                     */
-#define  EscSInts  'Q' /* Schattenintensitaet 0..7                                  */
-
-#define  EscSXDst  'X' /* Schattenversatz X 0..100%                                 */
-#define  EscSYDst  'Y' /* Schattenversatz Y 0..100%                                 */
-#define  EscSDist  'D' /* Schattenversatz X-Y 0..100%                               */
-
-#define  EscBold   'f' /* Fett                                                      */
-#define  EscLSlnt  'l' /* LKursiv                                                   */
-#define  EscRSlnt  'r' /* RKursiv                                                   */
-#define  EscUndln  'u' /* Unterstrichen                                             */
-#define  EscDbUnd  'p' /* doppelt Unterstrichen                                     */
-#define  EscKaptF  'k' /* Kapitaelchenflag                                          */
-#define  EscStrik  'd' /* Durchgestrichen                                           */
-#define  EscDbStk  'e' /* doppelt Durchgestrichen                                   */
-#define  EscSupSc  'h' /* Hochgestellt                                              */
-#define  EscSubSc  't' /* Tiefgestellt                                              */
-#define  Esc2DShd  's' /* 2D-Schatten                                               */
-#define  Esc3DShd  'j' /* 3D-Schatten                                               */
-#define  Esc4DShd  'i' /* 4D-Schatten                                               */
-#define  EscEbShd  'b' /* Embossed                                                  */
+#define  EscFont   'F' /* fontID, e.g. 92500 for CG Times                           */
+#define  EscGrad   'G' /* font angle 1..255 for <<Pt-127<<Pt                        */
+#define  EscBreit  'B' /* width 1..255% of the font angle                           */
+#define  EscKaptS  'K' /* uppercase size 1..255% of the text angle                  */
+#define  EscLFeed  'L' /* character spacing 1..32767% of max. text angle of the line*/
+                        // or 1..32767 for 1..16383<<Pt absolute (if bit 15=1)
+#define  EscSlant  'S' /* italic (angle) 1..8999 for 0.01deg..89.99deg              */
+#define  EscVPos   'V' /* character vercial position 1..255 for <<Pt..127<<Pt       */
+#define  EscZAbst  'Z' /* character spacing -128..127%                              */
+#define  EscHJust  'A' /* H-justify  paragraph: left, cent, right, block, aligned, fixed (0..5)*/
+
+#define  EscFarbe  'C' /* colour 0..7                                               */
+#define  EscBFarb  'U' /* background colour 0..7                                    */
+#define  EscInts   'I' /* colour intensity 0..100%                                  */
+#define  EscMustr  'M' /* pattern 0..? incl. transp...                              */
+#define  EscMFarb  'O' /* pattern colour 0..7                                       */
+#define  EscMBFrb  'P' /* 2nd pattern colour 0..7                                   */
+#define  EscMInts  'W' /* pattern intensity 0..7                                    */
+
+#define  EscSMstr  'E' /* shadow pattern 0..? inkl. Transp...                       */
+#define  EscSFarb  'R' /* shadow colour 0..7                                        */
+#define  EscSBFrb  'T' /* 2nd shadow colour 0..7                                    */
+#define  EscSInts  'Q' /* shadow intensity 0..7                                     */
+
+#define  EscSXDst  'X' /* shadow offset X 0..100%                                   */
+#define  EscSYDst  'Y' /* shadow offset Y 0..100%                                   */
+#define  EscSDist  'D' /* shadow offset X-Y 0..100%                                 */
+
+#define  EscBold   'f' /* bold                                                      */
+#define  EscLSlnt  'l' /* L italic                                                  */
+#define  EscRSlnt  'r' /* R italic                                                  */
+#define  EscUndln  'u' /* underlined                                                */
+#define  EscDbUnd  'p' /* double underlined                                         */
+#define  EscKaptF  'k' /* uppercase flag                                            */
+#define  EscStrik  'd' /* strikethrough                                             */
+#define  EscDbStk  'e' /* double strikethrough                                      */
+#define  EscSupSc  'h' /* superscript                                               */
+#define  EscSubSc  't' /* subscript                                                 */
+#define  Esc2DShd  's' /* 2D-shadow                                                 */
+#define  Esc3DShd  'j' /* 3D-shadow                                                 */
+#define  Esc4DShd  'i' /* 4D-shadow                                                 */
+#define  EscEbShd  'b' /* embossed                                                  */
 
 //  AllEscIdent =[EscFont, EscGrad, EscBreit,EscKaptS,EscLFeed,EscSlant,EscVPos, EscZAbst,EscHJust,
 //                EscFarbe,EscBFarb,EscInts, EscMustr,EscMFarb,EscMBFrb,EscMInts,
@@ -117,19 +117,19 @@ extern SgfFontLst* pSgfFonts;
 //                EscBold, EscLSlnt,EscRSlnt,EscUndln,EscDbUnd,EscKaptF,EscStrik,EscDbStk,
 //                EscSupSc,EscSubSc,Esc2DShd,Esc3DShd,Esc4DShd];
 // Justify muss spaetestens am Anfang des Absatzes stehen
-#define  EscSet    '\x1e' /* Flag setzen                                               */
-#define  EscReset  '\x1f' /* Flag loeschen                                             */
-#define  EscDeflt  '\x11' /* Flag auf default setzen                                */
-#define  EscToggl  '\x1d' /* Flag Toggeln                                              */
+#define  EscSet    '\x1e' /* set flag                                               */
+#define  EscReset  '\x1f' /* reset flag                                             */
+#define  EscDeflt  '\x11' /* set flag to default                                    */
+#define  EscToggl  '\x1d' /* toggle flag                                            */
 #define  EscNoFlg  0
 #define  EscNoVal  -2147483647 /* -MaxLongInt */
 //==============================================================================
-#define  NoTrenn 0xFFFF   /* Wert fuer Parameter 'Rest' von GetTextChar(), wenn auf keinen Fall getrennt werden soll */
-#define  DoTrenn 0xFFFE   /* Wert fuer Parameter 'Rest' von GetTextChar(), wenn getrennt werden soll                 */
+#define  NoTrenn 0xFFFF   /* parameter value for 'Rest' of GetTextChar(), if separation should not occur */
+#define  DoTrenn 0xFFFE   /* parameter value for 'Rest' of GetTextChar(), if separtion should occur      */
 
 #define  MaxLineChars 1024
 
-#define  ChrXPosArrSize (MaxLineChars+1+1)           /* 2k - Beginnt mit 0 im gegensatz zu StarDraw */
+#define  ChrXPosArrSize (MaxLineChars+1+1)           /* 2k - start with 0 opposite to StarDraw */
 #define  CharLineSize   (MaxLineChars+1+1)
 
 #define  MinChar 32
@@ -138,9 +138,9 @@ extern SgfFontLst* pSgfFonts;
 
 //==============================================================================
 
-#define  CharTopToBase     100 /* wegen Apostrophe und Umlaute mehr als 75% */
-#define  CharTopToBtm      120 /* Zeilenhoehe ist groesser als Schriftgrad  */
-                               // bei Avanti-Bold 'ue' eigentlich sogar 130%
+#define  CharTopToBase     100 /* due to quotes more as 75%         */
+#define  CharTopToBtm      120 /* line height larger as text angle  */
+                               // for Avanti-Bold 'ue' actually even 130%
 
 // end of AbsBase.Pas
 /////////////////////////////////////////////////////////////////////////////////
@@ -154,29 +154,29 @@ extern SgfFontLst* pSgfFonts;
 /////////////////////////////////////////////////////////////////////////////////
 // DefBase.Pas
 
-#define  TextBoldBit  0x0001   /* Fett                    */
-#define  TextRSlnBit  0x0002   /* Kursiv                  */
-#define  TextUndlBit  0x0004   /* Unterstrichen           */
-#define  TextStrkBit  0x0008   /* Durchgesteichen         */
-#define  TextSupSBit  0x0010   /* Hocgestellt             */
-#define  TextSubSBit  0x0020   /* Tiefgestellt            */
-#define  TextKaptBit  0x0040   /* Kapitaelchen            */
-#define  TextLSlnBit  0x0080   /* Linkskursiv             */
-#define  TextDbUnBit  0x0100   /* Doppelt unterstrichen   */
-#define  TextDbStBit  0x0200   /* Doppelt durchgestrichen */
-#define  TextSh2DBit  0x0400   /* 2D-Schatten         2.0 */
-#define  TextSh3DBit  0x0800   /* 3D-Schatten         2.0 */
-#define  TextSh4DBit  0x1000   /* 4D-Schatten         2.0 */
-#define  TextShEbBit  0x2000   /* Embossed-Schatten   2.0 */
-
-#define  THJustLeft    0x00
-#define  THJustCenter  0x01
-#define  THJustRight   0x02
-#define  THJustBlock   0x03
-#define  THJustDrvOut  0x04 /* Austreibend          Formatiert */
-#define  THJustLocked  0x05 /* A l s   S p e r r s c h r i f t */
-
-#define  MaxCharSlant  4200 /* Maximal 42deg kursiv ! */
+#define  TextBoldBit  0x0001   /* bold                   */
+#define  TextRSlnBit  0x0002   /* italic                 */
+#define  TextUndlBit  0x0004   /* underline              */
+#define  TextStrkBit  0x0008   /* strikethrough          */
+#define  TextSupSBit  0x0010   /* superscript            */
+#define  TextSubSBit  0x0020   /* subscript              */
+#define  TextKaptBit  0x0040   /* capital                */
+#define  TextLSlnBit  0x0080   /* left italic            */
+#define  TextDbUnBit  0x0100   /* double underline       */
+#define  TextDbStBit  0x0200   /* double strikethrough   */
+#define  TextSh2DBit  0x0400   /* 2D-shadow         2.0  */
+#define  TextSh3DBit  0x0800   /* 3D-shadow         2.0  */
+#define  TextSh4DBit  0x1000   /* 4D-shadow         2.0  */
+#define  TextShEbBit  0x2000   /* embossed-shadow   2.0  */
+
+#define  THJustLeft     0x00
+#define  THJustCenter   0x01
+#define  THJustRight    0x02
+#define  THJustBlock    0x03
+#define  THJustDrvOut   0x04   /* Justified         formated */
+#define  THJustLocked   0x05   /* J u s t   l  o  c  k  e  d */
+
+#define  MaxCharSlant   4200   /* maximum 42deg italic ! */
 
 // end of DefBase.Pas
 /////////////////////////////////////////////////////////////////////////////////
@@ -210,8 +210,8 @@ short hPoint2Sgf(short a)
 // ======================================================================
 // Function GetTopToBaseLine()  Function GetBaseLineToBtm()
 //
-// Abstand von Zeilenoberkante bis BaseLine bzw. von BaseLine bis
-// Unterkante berechnen. Alles in SGF-Units.
+// Calculate distance from ascender of line to baseline or from baseline to
+// descender. All in SGF-units.
 // ======================================================================
 
 sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad)
@@ -224,20 +224,19 @@ sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad)
 // ======================================================================
 // Function GetTextChar()   Function GetTextCharConv()
 //
-// Liest ein Zeichen aus dem Textbuffer, wertet dabei eventuell
-// auftretende Escapesequenzen aus und setzt dementsprechend den
-// Ein-/Ausgabeparameter AktAtr. Index wird entsprechend erhoeht.
-// Der Parameter Rest muss immer die Anzahl der Zeichen beinhalten,
-// den angeforderten Zeichen in der aktuellen Zeile noch folgen.
-// Ansonsten funktioniert die Silbentrennung nicht richtig. Gibt man
-// stattdessen die Konstante NoTrenn an, wird in keinem Fall
-// getrennt, die Konstante DoTrenn bewirkt dagegen, dass ueberall dort
-// getrennt wird, wo ein SoftTrenner vorkommt.
+// Reads a character from textbuffer, in doing so escape sequences
+// are evaluated and accordingly the input/output parameter AktAtr is set.
+// Index is incremented accordingly.
+// Parameter Rest should always contain the number of characters,
+// the number of remaining characters in that line.
+// Otherwise the hyphenation does not work. If the constand NoTrenn
+// is used instaed, no hyphenation is done. To the contrary then
+// constant DoTrenn triggers hyphenation where a soft-break is present.
 //
-// SoftTrenner werden immer in ein Minuszeichen konvertiert.
-// GetTextCharConv() konvertiert zusaetzlich HardSpace und AbsatzEnde
-// in Spaces sowie HardTrenner in Minuszeichen. TextEnde wird immer
-// als Char(0) geliefert.
+// Soft separators are converted to a minus sign.
+// On top GetTextCharConv() converts HardSpace and AbsatzEnde
+// in spaces, including HardTrenner in minus signs. TextEnde is
+// always returned as Char(0).
 // ======================================================================
 
 
@@ -262,9 +261,9 @@ long ChgValue(long Def, long Min, long Max, UCHAR FlgVal, long NumVal)
     long r=0;
 
     if (FlgVal==EscDeflt) {
-        r=Def;                          // zurueck auf Default
+        r=Def;                          // return to default
     } else {
-        if (NumVal!=EscNoVal) r=NumVal; // Hart setzen
+        if (NumVal!=EscNoVal) r=NumVal; // set non-breaking
     }
 
     if (Min!=0 || Max!=0) {
@@ -328,10 +327,10 @@ UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index,
         Ende=(c!=Escape);
         if (!Ende) {
             c=TBuf[Index]; Index++;
-            Ident=c;                          // Identifer merken
+            Ident=c;                          // remember identifier
             FlgVal=EscNoFlg;
             NumVal=EscNoVal;
-            c=TBuf[Index]; Index++;            // Hier faengt der Wert an
+            c=TBuf[Index]; Index++;            // value starts here
             if (c==EscSet || c==EscReset || c==EscDeflt || c==EscToggl) FlgVal=c; else {
                 if (c=='-') Sgn=-1; else Sgn=1;
                 if (c=='+' || c=='-') { c=TBuf[Index]; Index++; }
@@ -389,7 +388,7 @@ UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index,
                 case Esc4DShd: ChgSchnittBit(TextSh4DBit,TextSh2DBit,TextSh3DBit,TextShEbBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break;
                 case EscEbShd: ChgSchnittBit(TextShEbBit,TextSh2DBit,TextSh3DBit,TextSh4DBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break;
             } //endcase
-            if (TBuf[Index]==Escape) Index++;         // zweites Esc weglesen }
+            if (TBuf[Index]==Escape) Index++;         // read 2nd escape }
         }
     } while (!Ende && !ScanEsc);
     if (!Ende) c=Escape;
@@ -409,9 +408,9 @@ UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index,
             if (Rest==0 || Rest==DoTrenn ||
                 nc==' ' || nc==AbsatzEnd || nc==TextEnd) c='-';
             else {
-                c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // den Trenner ueberspringen
+                c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // skip separator
                 if (c0==SoftTrennAdd) {
-                    if (c>=32) c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // und hier noch 'nen Buchstaben ueberspringen
+                    if (c>=32) c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // skip another letter
                 }
             }
         }
@@ -423,13 +422,12 @@ UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index,
     return c;
 }
 
-  // HardSpace und HardTrenn muessen explizit konvertiert werden ! }
+  // HardSpace and HardTrenn should be converted explicitely ! }
   // if AktAtr.Schnitt and TextKaptBit =TextKaptBit then c:=UpCase(c);(explizit) }
 
-  // Bei der Trennmethode SoftTrennAdd wird davon ausgegangen, dass der zu }
-  // trennende Konsonant bereits 3x mal im TextBuf vorhanden ist, z.b.:   }
-  // "Schiff-fahrt". Wenn nicht getrennt, dann wird "-f" entfernt.        }
-
+  // The separationmethod SoftTrennAdd assumes, the separating consonant }
+  // is 3x present in TextBuf, e.g.: "schiff-fahrt".   }
+  // If not separated then, "-f" is removed.        }
 
 
 UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index,
@@ -453,7 +451,7 @@ UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index,
 // ======================================================================
 // Function GetLineFeed()
 //
-// Benoetigter Zeilenabstand in SGF-Units. ChrVPos wird beruecksichtigt.
+// Required line spacing in SGF-Units. ChrVPos is taken into account.
 // ======================================================================
 sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextType AktAtr,
                    sal_uInt16 nChar, sal_uInt16& LF, sal_uInt16& MaxGrad)
@@ -488,7 +486,7 @@ sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextT
         if (!AbsEnd && c!=' ') r=i;
     }
     MaxGrad=hPoint2Sgf(MaxGrad);
-    if (MaxLF100<=4000) {  // sonst Overflowgefahr
+    if (MaxLF100<=4000) {  // otherwise overflow could occur
         LF=sal_uInt16(hPoint2Sgf(short(MaxLF100)) /100);
     } else {
         LF=sal_uInt16(hPoint2Sgf(short(MaxLF100) /100));
@@ -509,19 +507,19 @@ sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextT
 /////////////////////////////////////////////////////////////////////////////////
 // iFont.Pas
 
-#define SuperSubFact 60     /* SuperScript/SubScript: 60% vom Schriftgrad */
-#define DefaultSpace 40     /* Default: Space ist 40% vom SchriftGrad     */
+#define SuperSubFact 60     /* superscript/subscript: 60% of text angle */
+#define DefaultSpace 40     /* Default: space is 40% of text angle      */
 
 sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_uInt16 Dreh,
                       sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv)
 {
-    SgfFontOne* pSgfFont; // Font aus dem IniFile
+    SgfFontOne* pSgfFont; // Font from the IniFile
     Font   aFont;
     Color  aColor;
     sal_uLong  Grad;
     sal_uLong  Brei;
     OUString FNam;
-    sal_uInt16 StdBrei=50;    // Durchschnittliche Zeichenbreite in % von Schriftgrad
+    sal_uInt16 StdBrei=50;    // average line width in in % of text angle
     bool   bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1);
 
     pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont());
@@ -536,33 +534,33 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u
         aFont.SetName(FNam);
     }
     else
-    {  // Falls nich im Inifile, sind hier einige Fonts hart kodiert
+    {  // if not in Inifile, some fonts are hard coded here
         aFont.SetPitch(PITCH_VARIABLE);
         switch (Atr.GetFont()) {
           case 92500: case 92501: case 92504: case 92505:
           {
 #if defined(WNT)
-              FNam = "Times New Roman";  // CG Times ist unter Windows Times New Roman
+              FNam = "Times New Roman";  // CG Times is Times New Roman in Windows
 #else
-              FNam = "Times";            // ansonsten ist das einfach Times
+              FNam = "Times";            // otherwise just Times
 #endif
               StdBrei=40;
               aFont.SetFamily(FAMILY_ROMAN);
           } break;
           case 94021: case 94022: case 94023: case 94024: {
 #if defined(WNT)
-              FNam = "Arial";            // Univers ist unter Windows Arial
+              FNam = "Arial";            // Univers is Arial in Windows
 #else
-              FNam = "Helvetica";        // und ansonsten Helvetica
+              FNam = "Helvetica";        // otherwise Helvetica
 #endif
               aFont.SetFamily(FAMILY_SWISS);
               StdBrei=47;
           } break;
           case 93950: case 93951: case 93952: case 93953: {
 #if defined(WNT)
-              FNam = "Courier New";      // Der Vector-Courierfont unter Windows heisst Courier New
+              FNam = "Courier New";      // The vector-Courierfont is called Courier New in Windows
 #else
-              FNam = "Courier";          // ansonsten ist und bleibt Courier immer Courier
+              FNam = "Courier";          // otherwise Courier remains Courier
 #endif
               aFont.SetFamily(FAMILY_ROMAN);
               aFont.SetPitch(PITCH_FIXED);
@@ -689,16 +687,16 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
                   sal_uInt16& nChars, sal_uInt16 Rest,
                   short* Line, UCHAR* cLine)
 {
-    sal_uInt16       KernDist=0;       // Wert fuer Kerning
+    sal_uInt16       KernDist=0;       // value for kerning
     sal_uInt16       ChrWidth;
     UCHAR        c;
     bool         AbsEnd;
 
-    c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,false); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt
+    c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,false); // tries to separate, if Rest contains appropriate value
 
     AbsEnd=(c==AbsatzEnd || c==TextEnd);
     if (!AbsEnd) {
-        R.OutCh=ConvertTextChar(c); // von HardTrenn nach '-', ...
+        R.OutCh=ConvertTextChar(c); // from HardTrenn to '-', ...
         R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh);
         if (R.Kapt) R.OutCh=Upcase(R.OutCh);
         SetTextContext(rOut,R.Attrib,R.Kapt,0,1,1,1,1);
@@ -706,7 +704,7 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
         UCHAR c1 = (R.Kapt)?Upcase(c):c;
         ChrWidth=GetCharWidth(rOut,c1);
 
-        if (R.Attrib.ZAbst!=100) { // Spezial-Zeichenabstand ?
+        if (R.Attrib.ZAbst!=100) { // special line distance ?
             sal_uLong Temp;
             Temp=sal_uLong(ChrWidth)*sal_uLong(R.Attrib.ZAbst)/100;
             ChrWidth=sal_uInt16(Temp);
@@ -715,7 +713,7 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
         if (R.ChrXP>32000) R.ChrXP=32000;
         Line[nChars]=R.ChrXP-KernDist;
         cLine[nChars]=c;
-        R.ChrXP+=ChrWidth-KernDist; // Position fuer den naechsten Character
+        R.ChrXP+=ChrWidth-KernDist; // position of next character
     }
     return c;
 }
@@ -729,11 +727,11 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
     VirtualDevice vOut;
     UCHAR        c,c0;
     UCHAR        ct;
-    bool         First;               // erster Char ?
-    sal_uInt8         Just = 0;                // Absatzformatierung
-    bool         Border;              // Rand der Box erreicht ?
+    bool         First;               // first char ?
+    sal_uInt8    Just = 0;            // paragraph format
+    bool         Border;              // border of box reached ?
     bool         Border0;
-    bool         AbsEnd;              // Ende des Absatzes erreicht ?
+    bool         AbsEnd;              // end of paragraph reached ?
     ProcChrSta*  R=new ProcChrSta;
     ProcChrSta*  R0=new ProcChrSta;
     ProcChrSta*  WErec=new ProcChrSta;
@@ -743,11 +741,11 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
     ProcChrSta*  TRrec=new ProcChrSta;
     sal_uInt16       TRnChar;
 
-    sal_uInt16       WordEndCnt;          // Justieren und Trennen
+    sal_uInt16       WordEndCnt;          // justify and separate
     bool         WordEnd;
     bool         Trenn;
 
-    short        BoxRest;             // zum Quetschen und formatieren
+    short        BoxRest;             // to crush and format
     sal_uInt16       i,j,k,h;
     sal_uInt16       re,li;
 
@@ -760,14 +758,14 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
     Border=false; First=true;
     WordEndCnt=0;
 
-    do {               // mal schauen, wieviele Worte so in die Zeile passen
+    do {               // check how many words to on that line
         if (Border) c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,DoTrenn,Line,cLine);
         else        c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine);
         AbsEnd=(c==AbsatzEnd || c==TextEnd);
         //if not AbsEnd then
         {
             if (First) {
-                Just=R->Attrib.Justify & 0x0F; // Absatzformat steht wenn, dann am Anfang
+                Just=R->Attrib.Justify & 0x0F; // paragraph format remains, then at start
             }
             Border=R->ChrXP>UmbWdt;
             WordEnd=(AbsEnd || (c==' ')) && (c0!=' ') && (c0!=0);
@@ -789,13 +787,13 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
         AbsEnd=AbsEnd || (nChars>=MaxLineChars);
     } while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn))));
 
-    if (Border) { // Trennen und Quetschen
+    if (Border) { // separate and crush
         (*WErec0)=(*WErec); WEnChar0=WEnChar;
         AbsEnd=false; c0=0;
         (*R)=(*WErec); nChars=WEnChar;
         (*TRrec)=(*R); TRnChar=nChars;
         Border0=false; Border=false;
-        do {                // erst mal gucken wieviele Silben noch reinpassen
+        do {                // first check how many syllables fit
             ct=ProcessChar(vOut,TBuf,*TRrec,Atr0,TRnChar,DoTrenn,Line,cLine);
             c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine);
             AbsEnd=(ct==AbsatzEnd) || (ct==TextEnd) || (nChars>=MaxLineChars);
@@ -807,20 +805,20 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
                 WordEndCnt++;
                 (*WErec)=(*R0);
                 if (AbsEnd) WEnChar=nChars; else WEnChar=nChars-1;
-                (*TRrec)=(*R); TRnChar=nChars;                       // zum weitersuchen
+                (*TRrec)=(*R); TRnChar=nChars;                       // to continue searching
             }
             if (Trenn && (!Border || (WordEndCnt==0))) {
-                WordEndCnt++;                 // merken, dass man hier trennen kann
+                WordEndCnt++;                       // remember we can separate here
                 (*WErec)=(*TRrec);
                 WEnChar=TRnChar;
-                (*TRrec)=(*R); TRnChar=nChars;                       // zum weitersuchen
+                (*TRrec)=(*R); TRnChar=nChars;      // continue searching
             }
             (*R0)=(*R); c0=c;
             Border0=Border;
             Border=R->ChrXP>UmbWdt;
         } while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn))));
 
-        while (WErec0->Index<WErec->Index) { // damit Line[] auch garantiert stimmt }
+        while (WErec0->Index<WErec->Index) { // to assure Line[] matches }
             c=ProcessChar(vOut,TBuf,*WErec0,Atr0,WEnChar0,WEnChar-WEnChar0-1,Line,cLine);
         }
 
@@ -828,9 +826,9 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
 
         if (UmbWdt>=R->ChrXP) {
             BoxRest=UmbWdt-R->ChrXP;
-        } else {                                       // Zusammenquetschen
-            BoxRest=R->ChrXP-UmbWdt;                     // um soviel muss gequetscht werden
-            for (i=2;i<=nChars;i++) {                  // 1. CharPosition bleibt !
+        } else {                                       // crush together
+            BoxRest=R->ChrXP-UmbWdt;                   // so much should be crushed
+            for (i=2;i<=nChars;i++) {                  // first character position remains!
                 Line[i]-=(i-1)*(BoxRest) /(nChars-1);
             }
             R->ChrXP=UmbWdt;
@@ -839,7 +837,7 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
     }
 
     if (!AbsEnd) {
-        do {                                         // Leerzeichen weglesen
+        do {                                         // read empty characters
             (*WErec)=(*R);
             c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,false);
             nChars++;
@@ -852,12 +850,12 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
         }
     }
 
-    if (AbsEnd && nChars<MaxLineChars) { // Ausrichten, statt Blocksatz aber linksbuendig
+    if (AbsEnd && nChars<MaxLineChars) { // align, left aligned instead of block
         if (Just==3) Just=0;
-        nChars++; Line[nChars]=R->ChrXP; // Damit AbsatzEnde auch weggelesen wird
-        Line[nChars+1]=R->ChrXP;         // denn die Breite von CR oder #0 ist nun mal sehr klein
+        nChars++; Line[nChars]=R->ChrXP; // to assure AbsatzEnde is read
+        Line[nChars+1]=R->ChrXP;         // as the width of CR or #0 is very small
         if (TBuf[R->Index-1]!=AbsatzEnd &&  TBuf[R->Index-1]!=TextEnd) {
-            c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,false); // Kleine Korrektur. Notig, wenn nur 1 Wort in
+            c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,false); // small correction needed, if 1st word read
         }
     }
 
@@ -865,16 +863,16 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
     if (TextFit) Just=THJustLeft;
 
     switch (Just) {
-        case THJustLeft: break;                                // Links
+        case THJustLeft: break;                                // left
         case THJustCenter: {
-            BoxRest=BoxRest /2;                                // Mitte
+            BoxRest=BoxRest /2;                                // middel
             for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest;
         } break;
-        case THJustRight: {                                    // Rechts
+        case THJustRight: {                                    // right
             for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest;
         } break;
         case THJustDrvOut:
-        case THJustBlock: {                                    // Block und Austreibend
+        case THJustBlock: {                                    // block and justified
             re=nChars;
             if (Just==THJustDrvOut) re--;
             while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--;
@@ -882,40 +880,40 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
             while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++;
             if (Just==THJustDrvOut) BoxRest=AdjWdt-Line[re+1];
 
-            j=0;                        // Anzahl der Spaces ermitteln
+            j=0;                        // get number of spaces
             for (i=li;i<=re;i++) {
                 if (cLine[i]==' ') {
                     j++;
                 }
             }
 
-            if (j==0) {                        // nur 1 Wort ?  -> Strecken !
-                for (i=li+1;i<=re;i++) {       // von links nach rechts
+            if (j==0) {                        // only one word ?  -> strech !
+                for (i=li+1;i<=re;i++) {       // from left to right
                   Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1);
                 }
             } else {
                 k=0; h=0;
-                for (i=li;i<=re;i++) {          // j Spaces aufbohren !
-                    if (cLine[i]==' ') {        // Space gefunden !
+                for (i=li;i<=re;i++) {          // j drill spaces !
+                    if (cLine[i]==' ') {        // space found !
                         k++;
                         h=MulDiv(k,BoxRest,j);
                     }
                     Line[i]=Line[i]+h;
                 }
             }
-            for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // und den Rest anpassen
+            for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // adapt the rest
             Line[nChars+1]=AdjWdt;
         } break;
-        case THJustLocked: {                                    //Gesperrt
+        case THJustLocked: {                                    // locked out
             re=nChars-1;
             while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--;
             li=1;
             while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++;
             BoxRest=AdjWdt-Line[re+1];
-            for (i=li+1;i<=re;i++) {         // Strecken von links nach rechts
+            for (i=li+1;i<=re;i++) {         // strech from left to right
                 Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1);
             }
-            for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // und den Rest anpassen
+            for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // adapt the rest
             Line[nChars+1]=AdjWdt;
         } break;
     }
@@ -958,13 +956,13 @@ void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, sal_uIn
 *************************************************************************/
 void TextType::Draw(OutputDevice& rOut)
 {
-    if ((Flags & TextOutlBit)!=0) return;   // Sourcetext fuer Outliner !!
+    if ((Flags & TextOutlBit)!=0) return;   // source text for Outliner !!
 
     ObjTextType T1,T2;
     sal_uInt16 Index1;
     sal_uInt16 Index2;
     UCHAR  c = TextEnd;
-    sal_uInt16 l;                // Anzahl der Zeichen in der Zeile
+    sal_uInt16 l;                // number of characters on the line
     sal_uInt16 i;
     short  yPos0;
     short  xPos;
@@ -980,20 +978,20 @@ void TextType::Draw(OutputDevice& rOut)
     sal_uInt16 lc;
     bool   TextFit;
     short* xLine;
-    UCHAR* cLine;   // Buffer fuer FormatLine
+    UCHAR* cLine;   // Buffer for FormatLine
     sal_uInt16 FitXMul;
     sal_uInt16 FitXDiv;
     sal_uInt16 FitYMul;
     sal_uInt16 FitYDiv;
     bool   Fehler;
-    UCHAR* Buf=Buffer; // Zeiger auf die Buchstaben
+    UCHAR* Buf=Buffer; // pointer to the letters
 
     pSgfFonts->ReadList();
     xLine=new short[ChrXPosArrSize];
     cLine=new UCHAR[CharLineSize];
 
     TextFit=(Flags & TextFitBits)!=0;
-    bool LineFit=((Flags & TextFitZBit)!=0);  // FitSize.x=0? oder Flags -> jede Zeile stretchen
+    bool LineFit=((Flags & TextFitZBit)!=0);  // FitSize.x=0? or flags -> strech each line
     if (TextFit && FitSize.x==0) LineFit=true;
 
     if (DrehWink==0) {
@@ -1007,8 +1005,8 @@ void TextType::Draw(OutputDevice& rOut)
     T1=T; Index1=0; yPos=0; xPos=0;
     if (TextFit) {
         ySize=Pos2.y-Pos1.y;
-        xSize=32000 /2;      // Umbruch
-        xSAdj=Pos2.x-Pos1.x; // zum Ausrichten bei Zentriert/Blocksatz
+        xSize=32000 /2;      // break
+        xSAdj=Pos2.x-Pos1.x; // to align for center/block
         //if (xSize<=0) { xSize=32000 /2; LineFit=true; }
         FitXMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1;
         FitYMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1;
@@ -1039,7 +1037,7 @@ void TextType::Draw(OutputDevice& rOut)
                     LF=MulDiv(LF,FitYMul,FitYDiv);
                     MaxGrad=MulDiv(MaxGrad,FitYMul,FitYDiv);
                 } else {
-                    FitXDiv=1; // 0 gibts nicht
+                    FitXDiv=1; // 0 does not exist
                 }
             }
             yPos0=yPos;
@@ -1051,7 +1049,7 @@ void TextType::Draw(OutputDevice& rOut)
                 i=1;
                 while (i<=l) {
                     c=GetTextCharConv(Buf,Index2,T,T2,l-i,false);
-                    long xp1,yp1;       // wegen Overflowgefahr
+                    long xp1,yp1;       // due to overflow danger
                     PointType Pos;
                     xp1=long(Pos1.x)+xPos+long(xLine[i]);
                     yp1=long(Pos1.y)+yPos;
@@ -1065,7 +1063,7 @@ void TextType::Draw(OutputDevice& rOut)
                     i++;
                 } // while i<=l
                 yPos=yPos0+LF;
-                T1=T2; Index1=Index2; // Fuer die naechste Zeile
+                T1=T2; Index1=Index2; // for next line
             } // if ObjMin.y+yPos<=Obj_Max.y
         } // if !Fehler
     } while (c!=TextEnd && !Ende && !Fehler);
@@ -1078,22 +1076,6 @@ void TextType::Draw(OutputDevice& rOut)
 /////////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////////
 
-// nicht mehr benoetigt, da der Pointer nun extra gefuehrt wird
-// (DEC Alpha hat naemlich 64Bit-Pointer!)
-//UCHAR* TextType::GetBufPtr()
-//{
-//    sal_uLong Temp;
-//    Temp=sal_uLong(BufLo)+0x00010000*sal_uLong(BufHi);
-//    return (UCHAR*)Temp;
-//}
-//
-//void TextType::SetBufPtr(UCHAR* Ptr)
-//{
-//    sal_uLong Temp=(sal_uLong)Ptr;
-//    BufLo=sal_uInt16(Temp & 0x0000FFFF);
-//    BufHi=sal_uInt16((Temp & 0xFFFF0000)>>16);
-//}
-
 sal_uInt32 ObjTextType::GetFont()
 {
     return sal_uLong(FontLo)+0x00010000*sal_uLong(FontHi);
@@ -1127,21 +1109,21 @@ void SgfFontOne::ReadOne( const OString& rID, OString& Dsc )
 {
     if ( Dsc.getLength() < 4 || ( Dsc[0] != '(' ) )
         return;
-    sal_Int32 i=1;   // Erster Buchstabe des IF-Fontnamen. Davor ist eine '('
+    sal_Int32 i=1;   // first letter of  IF fontname. In front is a '('
     while ( i < Dsc.getLength() && ( Dsc[i] !=')' ) )
         i++;
-    Dsc = Dsc.copy(i+1);                                // IF-Fontname loeschen inkl. ()
+    Dsc = Dsc.copy(i+1);                                // delete IF fontname incl. ()
 
     if ( Dsc.getLength() < 2 || ( Dsc[Dsc.getLength() - 1] !=')' ) )
         return;
-    i = Dsc.getLength()-2;                                // hier ist die ')' des SV-Fontnames
+    i = Dsc.getLength()-2;                                // here is the ')' of the SV fontname
     sal_Int32 j=0;
     while ( i > 0 && ( Dsc[i] != '(' ) )
     {
         i--;
         j++;
     }
-    SVFName = OStringToOUString(Dsc.copy(i+1,j), RTL_TEXTENCODING_IBM_437); // SV-Fontname rausholen
+    SVFName = OStringToOUString(Dsc.copy(i+1,j), RTL_TEXTENCODING_IBM_437); // retrieve SV fontname
     Dsc = OStringBuffer(Dsc).remove(i,j).makeStringAndClear();
 
     IFID = (sal_uInt32)rID.toInt32();
@@ -1229,9 +1211,9 @@ void SgfFontLst::ReadList()
             Dsc = aCfg.ReadKey( i );
             if (comphelper::string::isdigitAsciiString(FID))
             {
-                P=new SgfFontOne;                                   // neuer Eintrag
-                if (Last!=NULL) Last->Next=P; else pList=P; Last=P; // einklinken
-                P->ReadOne(FID,Dsc);                                // und Zeile interpretieren
+                P=new SgfFontOne;                                   // new entry
+                if (Last!=NULL) Last->Next=P; else pList=P; Last=P; // link it
+                P->ReadOne(FID,Dsc);                                // interpret line
             }
         }
     }
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 142e9de..b7c82c7 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -160,7 +160,7 @@ static float GetSwapFloat( SvStream& rSt )
 {
     float   fTmp;
     sal_Int8* pPtr = (sal_Int8*)&fTmp;
-    rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0];    // Little Endian <-> Big Endian switch
+    rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0];    // little endian <-> big endian switch
     return fTmp;
 }
 #endif
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index dcb0b86..e094c54 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -89,7 +89,7 @@
 #define R2_MERGEPEN             15
 #define R2_WHITE                16
 
-/* Mapping Modes */
+/* Mapping modes */
 #define MM_TEXT                 1
 #define MM_LOMETRIC             2
 #define MM_HIMETRIC             3
@@ -100,12 +100,12 @@
 #define MM_ANISOTROPIC          8
 
 
-/* Graphics Modes */
+/* Graphics modes */
 #define GM_COMPATIBLE           1
 #define GM_ADVANCED             2
 #define GM_LAST                 2
 
-/* StretchBlt() Modes */
+/* StretchBlt() modes */
 #define BLACKONWHITE            1
 #define WHITEONBLACK            2
 #define COLORONCOLOR            3
@@ -613,8 +613,8 @@ class WinMtfOutput
     XForm               maXForm;
     sal_Int32           mnDevOrgX, mnDevOrgY;
     sal_Int32           mnDevWidth, mnDevHeight;
-    sal_Int32           mnWinOrgX, mnWinOrgY;       // aktuelles Window-Origin
-    sal_Int32           mnWinExtX, mnWinExtY;       // aktuelles Window-Extent
+    sal_Int32           mnWinOrgX, mnWinOrgY;       // aktuel window origin
+    sal_Int32           mnWinExtX, mnWinExtY;       // aktuel window extend
     sal_Bool            mbIsMapWinSet;
     sal_Bool            mbIsMapDevSet;
 
@@ -764,7 +764,7 @@ class WinMtf
 protected:
 
     WinMtfOutput*           pOut;
-    SvStream*               pWMF;               // Die einzulesende WMF/EMF-Datei
+    SvStream*               pWMF;               // the WMF/EMF file to be read
 
     sal_uInt32              nStartPos, nEndPos;
     BSaveStructList_impl    aBmpSaveList;
@@ -773,7 +773,7 @@ protected:
 
     com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
 
-    // Sorgt dafuer, das aSampledBrush der aktuelle Brush des GDIMetaFiles ist.
+    // assures aSampledBrush is the actual brush of the GDIMetaFile
 
     Color               ReadColor();
     void                Callback( sal_uInt16 nPercent );
@@ -796,7 +796,7 @@ class EnhWMFReader : public WinMtf
 
 
     sal_Bool        ReadHeader();
-                    // Liesst und konvertiert ein Rechteck
+                    // reads and converts the rectangle
     Rectangle       ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 );
 
 public:
@@ -849,15 +849,15 @@ private:
 
     WMF_EXTERNALHEADER* pExternalHeader;
 
-    // Liesst den Kopf der WMF-Datei
+    // reads header of the WMF-Datei
     sal_Bool        ReadHeader();
 
-    // Liesst die Parameter des Rocords mit der Funktionsnummer nFunction.
+    // reads parameters of the record with the functionnumber nFunction.
     void            ReadRecordParams( sal_uInt16 nFunction );
 
-    Point           ReadPoint();                // Liesst und konvertiert einen Punkt (erst X dann Y)
-    Point           ReadYX();                   // Liesst und konvertiert einen Punkt (erst Y dann X)
-    Rectangle       ReadRectangle();            // Liesst und konvertiert ein Rechteck
+    Point           ReadPoint();                // reads and converts a point (first X then Y)
+    Point           ReadYX();                   // reads and converts a point (first Y then X)
+    Rectangle       ReadRectangle();            // reads and converts a rectangle
     Size            ReadYXExt();
     sal_Bool        GetPlaceableBound( Rectangle& rSize, SvStream* pStrm );
 
@@ -876,7 +876,7 @@ public:
 
                     ~WMFReader();
 
-    // Liesst aus dem Stream eine WMF-Datei und fuellt das GDIMetaFile
+    // read WMF file from stream and fill the GDIMetaFile
     void            ReadWMF();
 };
 
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 378dc3c..0f204dc 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -483,7 +483,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
             pOut->SetTextLayoutMode( nTextLayoutMode );
             DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in WMF" );
 
-            // Nur wenn der Text auch Zeichen enthaelt, macht die Ausgabe Sinn
+            // output only makes sense if the text contains characters
             if( nLen )
             {
                 nOriginalTextLen = nLen;
@@ -1096,7 +1096,7 @@ sal_Bool WMFReader::ReadHeader()
     sal_Size nStrmPos = pWMF->Tell();
 
     sal_uInt32 nPlaceableMetaKey(0);
-    // Einlesen des METAFILEHEADER, falls vorhanden
+    // if available read the METAFILEHEADER
     *pWMF >> nPlaceableMetaKey;
     if (!pWMF->good())
         return false;
@@ -1161,9 +1161,9 @@ sal_Bool WMFReader::ReadHeader()
     }
     pOut->SetDevExt( aDevExt );
 
-    // Einlesen des METAHEADER
+    // read the METAHEADER
     sal_uInt32 nMetaKey(0);
-    *pWMF >> nMetaKey; // Typ und Headergroesse
+    *pWMF >> nMetaKey; // type and headersize
     if (!pWMF->good())
         return false;
     if (nMetaKey != 0x00090001)
@@ -1177,10 +1177,10 @@ sal_Bool WMFReader::ReadHeader()
         }
     }
 
-    pWMF->SeekRel( 2 ); // Version (von Windows)
-    pWMF->SeekRel( 4 ); // Size (der Datei in Words)
-    pWMF->SeekRel( 2 ); // NoObjects (Maximale Anzahl der gleichzeitigen Objekte)
-    pWMF->SeekRel( 4 ); // MaxRecord (Groesse des groessten Records in Words)
+    pWMF->SeekRel( 2 ); // Version (of Windows)
+    pWMF->SeekRel( 4 ); // Size (of file in words)
+    pWMF->SeekRel( 2 ); // NoObjects (maximum number of simultaneous objects)
+    pWMF->SeekRel( 4 ); // MaxRecord (size of largets record in words)
     pWMF->SeekRel( 2 ); // NoParameters (Unused
 
     return pWMF->good();
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 22688ea..c8c6b2d 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -130,7 +130,7 @@
 
 #define PRIVATE_ESCAPE_UNICODE          2
 
-//========================== Methoden von WMFWriter ==========================
+//========================== methods of WMFWriter ==========================
 
 void WMFWriter::MayCallback()
 {
@@ -138,9 +138,9 @@ void WMFWriter::MayCallback()
     {
         sal_uLong nPercent;
 
-        // Wir gehen mal einfach so davon aus, dass 16386 Actions einer Bitmap entsprechen
-        // (in der Regel wird ein Metafile entweder nur Actions oder einige Bitmaps und fast
-        // keine Actions enthalten. Dann ist das Verhaeltnis ziemlich unwichtig)
+        // we simply assume that 16386 actions match to a bitmap
+        // (normally a metafile either contains only actions or some bitmaps and
+        // almost no actions. In which case the ratio is less important)
 
         nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions)
                 *100
@@ -772,25 +772,25 @@ void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize,
 
     WriteRecordHeader(0x00000000,W_META_STRETCHDIB);
 
-    // Die Reihenfolge im Metafile soll jetzt sein:
-    // einige Parameter (laenge 22), dann die Bitmap ohne FILEHEADER.
-    // Da aber *pWMF << rBitmap einen FILEHEADER der Laenge 14
-    // erzeugt, schreiben wir zuerst die Bitmap an die richtige Position
-    // Und ueberschreiben hinterher den FILEHEADER mit den Parametern.
-    nPosAnf=pWMF->Tell(); // Position merken, wo Parameter hin sollen
-    pWMF->WriteInt32( (sal_Int32)0 ).WriteInt32( (sal_Int32)0 ); // 8 bytes auffuellen (diese 8 bytes +
-                                           // 14 bytes ueberfluessigen FILEHEADER
-                                           // = 22 bytes Parameter)
+    // The sequence in the metafile should be:
+    // some parameters (length 22), then the bitmap without FILEHEADER.
+    // As *pWMF << rBitmap generates a FILEHEADER of size 14,
+    // we first write the bitmap at the right position
+    // and overwrite later the FILEHEADER with the parameters.
+    nPosAnf=pWMF->Tell(); // remember position, where parameters should be stored
+    pWMF->WriteInt32( (sal_Int32)0 ).WriteInt32( (sal_Int32)0 ); // replenish 8 bytes (these 8 bytes +
+                                           // 14 bytes superfluous FILEHEADER
+                                           // = 22 bytes parameter)
 
     // write bitmap
     WriteDIB(rBitmap, *pWMF, false, true);
 
 
-    // Parameter schreiben:
+    // write the parameters:
     nPosEnd=pWMF->Tell();
     pWMF->Seek(nPosAnf);
 
-    // Raster-Op bestimmen, falls nichts uebergeben wurde
+    // determine raster-op, if nothing was passed
     if( !nROP )
     {
         switch( eSrcRasterOp )
@@ -1676,13 +1676,13 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, bool bPlaceable )
     }
 
     nMetafileHeaderPos=pWMF->Tell();
-    pWMF->WriteUInt16( (sal_uInt16)0x0001 )           // Typ: Datei
-         .WriteUInt16( (sal_uInt16)0x0009 )           // Headerlaenge in Worten
-         .WriteUInt16( (sal_uInt16)0x0300 )           // Version als BCD-Zahl
-         .WriteUInt32( (sal_uInt32) 0x00000000 )      // Dateilaenge (ohne 1. Header), wird spaeter durch UpdateHeader() berichtigt
-         .WriteUInt16( (sal_uInt16)MAXOBJECTHANDLES ) // Maximalezahl der gleichzeitigen Objekte
-         .WriteUInt32( (sal_uInt32) 0x00000000 )      // Maximale Record-laenge, wird spaeter durch UpdateHeader() berichtigt
-         .WriteUInt16( (sal_uInt16)0x0000 );          // Reserved
+    pWMF->WriteUInt16( (sal_uInt16)0x0001 )           // type: file
+         .WriteUInt16( (sal_uInt16)0x0009 )           // header length in words
+         .WriteUInt16( (sal_uInt16)0x0300 )           // Version as BCD number
+         .WriteUInt32( (sal_uInt32) 0x00000000 )      // file length (without 1st header), is later corrected by UpdateHeader()
+         .WriteUInt16( (sal_uInt16)MAXOBJECTHANDLES ) // maxmimum number of simultaneous objects
+         .WriteUInt32( (sal_uInt32) 0x00000000 )      // maximum record length, is later corrected by UpdateHeader()
+         .WriteUInt16( (sal_uInt16)0x0000 );          // reserved
 }
 
 // ------------------------------------------------------------------------
@@ -1692,18 +1692,18 @@ void WMFWriter::UpdateHeader()
     sal_uLong nPos;
     sal_uInt32 nFileSize;
 
-    nPos=pWMF->Tell();                 // Endposition = Gesammtgroesse der Datei
-    nFileSize=nPos-nMetafileHeaderPos; // Groesse des 1. Headers abziehen
-    if ((nFileSize&1)!=0) {            // ggf. auf ganze Worte aufrunden
+    nPos=pWMF->Tell();                 // endposition = total size of file
+    nFileSize=nPos-nMetafileHeaderPos; // subtract size of 1st header
+    if ((nFileSize&1)!=0) {            // if needed round to words
         pWMF->WriteUChar( (sal_uInt8)0 );
         nPos++;
         nFileSize++;
     }
-    nFileSize>>=1;                    // In Anzahl Worte umrechnen
-    pWMF->Seek(nMetafileHeaderPos+6); // Zum Dateigroessen-Eintrag im zweiten Header
-    pWMF->WriteUInt32( nFileSize );               // Dateigroesse berichtigen
-    pWMF->SeekRel(2);                 // Zum Max-Record-Laenge-Eintrag im zweiten Header
-    pWMF->WriteUInt32( nMaxRecordSize );          // und berichtigen
+    nFileSize>>=1;                    // convert to number of words
+    pWMF->Seek(nMetafileHeaderPos+6); // to filesize entry in second header
+    pWMF->WriteUInt32( nFileSize );               // rectify file size
+    pWMF->SeekRel(2);                 // to max-recond-length-entry in second header
+    pWMF->WriteUInt32( nMaxRecordSize );          // and rectify
     pWMF->Seek(nPos);
 }
 
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index a6850ca..ceda7c5 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -61,7 +61,7 @@ private:
 
     bool            bStatus;
 
-    sal_uLong                   nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
+    sal_uLong                   nLastPercent; // with which number pCallback was called last time.
     FilterConfigItem*       pFilterConfigItem;
 
     com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
@@ -74,10 +74,10 @@ private:
     sal_uInt16                  nTargetDivisor;
 
     sal_uLong nMetafileHeaderPos;
-    sal_uInt32 nMaxRecordSize; // in Worten
+    sal_uInt32 nMaxRecordSize; // in words
     sal_uLong nActRecordPos;
 
-    // Aktuelle Attribute im Quell-Metafile:
+    // actual attribute in source metafile:
     Color     aSrcLineColor;
     Color     aSrcFillColor;
     Color     aSrcTextColor;
@@ -92,7 +92,7 @@ private:
 
     sal_uInt32    eSrcHorTextAlign;
 
-    // Aktuelle Attribute im Ziel-Metafile:
+    // actual attribute in destination metafile:
     Color     aDstLineColor;
     Color     aDstFillColor;
     Color     aDstTextColor;
@@ -103,31 +103,31 @@ private:
 
     sal_uInt32    eDstHorTextAlign;
 
-    bool      bDstIsClipping; // ???: derzeit unberuecksichtigt
-    Region    aDstClipRegion; // ???: derzeit unberuecksichtigt
-    bool bHandleAllocated[MAXOBJECTHANDLES];             // Welche Handles vergeben sind
-    sal_uInt16 nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen
-                                                         // Selected-Objects besitzen
-                                                         // 0xffff = keines:
+    bool      bDstIsClipping; // ???: not taken into account at the moment
+    Region    aDstClipRegion; // ???: not taken into account at the moment
+    bool bHandleAllocated[MAXOBJECTHANDLES];             // which handles have been assigned
+    sal_uInt16 nDstPenHandle,nDstFontHandle,nDstBrushHandle; // which handles are owned by
+                                                         // Selected-Objects
+                                                         // 0xFFFF = none:
 
-    // Damit nicht bei jeder Operation alle Attribute verglichen werden muessen:
+    // to prevent we have to compare all attributes at each operation:
 
-    sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile
-    sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps
-    sal_uLong nWrittenActions;  // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders
-    sal_uLong nWrittenBitmaps;  // Anzahl der bereits geschriebenen Bitmaps
-    sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
+    sal_uLong nNumberOfActions; // number of actions in the GDIMetafile
+    sal_uLong nNumberOfBitmaps; // number of bitmaps
+    sal_uLong nWrittenActions;  // number of processed actions while writing the directory
+    sal_uLong nWrittenBitmaps;  // number of bitmaps written
+    sal_uLong nActBitmapPercent; // percentage of next bitmap written.
 
     bool bEmbedEMF; // optionally embedd EMF data into WMF
 
     void MayCallback();
-        // Berechnet anhand der obigen 5 Parameter eine Prozentzahl
-        // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen
-        // moechte.
+        // this functions calculates percentage using the above 5 parameters
+        // and triggers a callback if needed. Puts bStatus to FALSE if the
+        // users wants to abort.
 
     void CountActionsAndBitmaps(const GDIMetaFile & rMTF);
-        // Zaehlt die Bitmaps und Actions (nNumberOfActions und nNumberOfBitmaps muessen
-        // zu Anfang auf 0 gesetzt werden, weil diese Methode rekursiv ist)
+        // Counts bitmaps and actions (nNumberOfActions and nNumberOfBitmaps should
+        // be initialised to 0 at start, as this method is recursive)
 
     void WritePointXY(const Point & rPoint);
     void WritePointYX(const Point & rPoint);
@@ -138,13 +138,13 @@ private:
     void WriteColor(const Color & rColor);
 
     void WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType);
-        // nSizeWords ist die Groesse des gesammten Records in Anzahl Worte.
-        // Wenn nSizeWords unbekannt ist, dann 0 einsetzen (siehe UpdateRecordHeader()).
+        // nSizeWords is the size of the all records in number of words.
+        // If nSizeWords is unknown, then use 0 (see UpdateRecordHeader())
 
     void UpdateRecordHeader();
-        // berichtig die Groesse des Records nach dem Schreiben der Parameter, wenn
-        // nSizeWords bei Aufruf von WriteRecordHeader(..) unbekannt war.
-        // fuegt ggf. noch ein BYTE 0 ein damit Anzahl Bytes immer gerade.
+        // returns the size of the record after writing the parameters, if
+        // nSizeWords was unknown upon calling WriteRecordHeader(..)
+        // if needed it inserts a BYTE 0 to make number of bytes even
 
     void WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
     void WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);


More information about the Libreoffice-commits mailing list