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

Philipp Weissenbacher p.weissenbacher at gmail.com
Tue Nov 12 11:06:08 PST 2013


 sc/source/filter/rtf/eeimpars.cxx |   79 ++++++++++++++++++--------------------
 sc/source/filter/rtf/rtfexp.cxx   |   11 +----
 sc/source/filter/rtf/rtfparse.cxx |   71 ++++++++++++++++------------------
 3 files changed, 76 insertions(+), 85 deletions(-)

New commits:
commit 7c320e1a2518707dcdefc4680db67030f4c31386
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date:   Sun Nov 10 17:54:14 2013 +0100

    Translate German comments
    
    Change-Id: I7e0ece1089edad3065e794a4c0e138ffa858bfc2
    Reviewed-on: https://gerrit.libreoffice.org/6631
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index fbcdd9d..bff7c71 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -60,8 +60,6 @@
 // in fuins1.cxx
 extern void ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage );
 
-//------------------------------------------------------------------------
-
 ScEEImport::ScEEImport( ScDocument* pDocP, const ScRange& rRange ) :
     maRange( rRange ),
     mpDoc( pDocP ),
@@ -77,9 +75,9 @@ ScEEImport::ScEEImport( ScDocument* pDocP, const ScRange& rRange ) :
 
 ScEEImport::~ScEEImport()
 {
-    // Reihenfolge wichtig, sonst knallt's irgendwann irgendwo in irgendeinem Dtor!
-    // Ist gewaehrleistet, da ScEEImport Basisklasse ist
-    delete mpEngine;        // nach Parser!
+    // Sequence important, or else we crash in some dtor!
+    // Is guaranteed as ScEEImport is base class
+    delete mpEngine; // After Parser!
 }
 
 
@@ -151,8 +149,8 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
         if ( nRow != nLastMergedRow )
             nMergeColAdd = 0;
         SCCOL nCol = nStartCol + pE->nCol + nMergeColAdd;
-        // RowMerge feststellen, pures ColMerge und ColMerge der ersten
-        // MergeRow bereits beim parsen
+        // Determine RowMerge
+        // Pure ColMerge and ColMerge of the first MergeRow already done during parsing
         if ( nRow <= nOverlapRowMax )
         {
             while ( nCol <= MAXCOL && mpDoc->HasAttrib( nCol, nRow, nTab,
@@ -163,20 +161,21 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
             }
             nLastMergedRow = nRow;
         }
-        // fuer zweiten Durchlauf eintragen
+        // Add for second run
         pE->nCol = nCol;
         pE->nRow = nRow;
         if ( ValidCol(nCol) && ValidRow(nRow) )
         {
             SfxItemSet aSet = mpEngine->GetAttribs( pE->aSel );
-            // Default raus, wir setzen selber links/rechts je nachdem ob Text
-            // oder Zahl; EditView.GetAttribs liefert immer kompletten Set
-            // mit Defaults aufgefuellt
+            // Remove default: we set left/right ourselves depending on Text or
+            // Number
+            // EditView.GetAttribs always returns complete Set filled with
+            // defaults
             const SfxPoolItem& rItem = aSet.Get( EE_PARA_JUST );
             if ( ((const SvxAdjustItem&)rItem).GetAdjust() == SVX_ADJUST_LEFT )
                 aSet.ClearItem( EE_PARA_JUST );
 
-            // Testen, ob einfacher String ohne gemischte Attribute
+            // Test whether simple String without mixed attributes
             sal_Bool bSimple = ( pE->aSel.nStartPara == pE->aSel.nEndPara );
             for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && bSimple; nId++)
             {
@@ -186,7 +185,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
                     bSimple = false;
                 else if (eState == SFX_ITEM_SET)
                 {
-                    if ( nId == EE_CHAR_ESCAPEMENT )        // Hoch-/Tiefstellen immer ueber EE
+                    if ( nId == EE_CHAR_ESCAPEMENT ) // Super-/Subscript always via EE
                     {
                         if ( (SvxEscapement)((const SvxEscapementItem*)pItem)->GetEnumValue()
                                 != SVX_ESCAPEMENT_OFF )
@@ -195,7 +194,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
                 }
             }
             if ( bSimple )
-            {   //  Feldbefehle enthalten?
+            {   //  Contains field commands?
                 SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false );
                 if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
                     bSimple = false;
@@ -207,7 +206,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
             sal_uInt32 nNumForm = 0;
             LanguageType eNumLang = LANGUAGE_NONE;
             if ( pE->pNumStr )
-            {   // SDNUM muss sein wenn SDVAL
+            {   // SDNUM needs to be if SDVAL
                 aNumStr = *pE->pNumStr;
                 if ( pE->pValStr )
                     aValStr = *pE->pValStr;
@@ -215,7 +214,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
                     nNumForm, eNumLang, aValStr, aNumStr, *pFormatter );
             }
 
-            // Attribute setzen
+            // Set attributes
             ScPatternAttr aAttr( pDocPool );
             aAttr.GetFromEditItemSet( &aSet );
             SfxItemSet& rSet = aAttr.GetItemSet();
@@ -289,8 +288,8 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
                 }
             }
             if ( pE->nColOverlap > 1 || pE->nRowOverlap > 1 )
-            {   // merged cells, mit SfxItemSet Put schneller als mit
-                // nachtraeglichem ScDocument DoMerge
+            {   // Merged cells, with SfxItemSet.Put() is faster than
+                // with ScDocument.DoMerge() afterwards
                 ScMergeAttr aMerge( pE->nColOverlap, pE->nRowOverlap );
                 rSet.Put( aMerge );
                 SCROW nRO = 0;
@@ -317,7 +316,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
             aAttr.SetStyleSheet( (ScStyleSheet*)pStyleSheet );
             mpDoc->SetPattern( nCol, nRow, nTab, aAttr, sal_True );
 
-            // Daten eintragen
+            // Add data
             if (bSimple)
             {
                 ScSetStringParam aParam;
@@ -332,7 +331,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
                 {
                     // maybe ALT text of IMG or similar
                     mpDoc->SetString( nCol, nRow, nTab, pE->aAltText, &aParam );
-                    // wenn SelRange komplett leer kann nachfolgender Text im gleichen Absatz liegen!
+                    // If SelRange is completely empty, the succeeding text can be in the same paragraph!
                 }
                 else
                 {
@@ -418,7 +417,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
     }
     if ( bSizeColsRows )
     {
-        // Spaltenbreiten
+        // Column widths
         ColWidthsMap& rColWidths = mpParser->GetColWidths();
         if ( !rColWidths.empty() )
         {
@@ -435,11 +434,11 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
                 pProgress->SetState( ++nProgress );
             }
         }
-        DELETEZ( pProgress );   // SetOptimalHeight hat seinen eigenen ProgressBar
-        // Zeilenhoehen anpassen, Basis 100% Zoom
+        DELETEZ( pProgress ); // SetOptimalHeight has its own ProgressBar
+        // Adjust line height, base is 100% zoom
         Fraction aZoom( 1, 1 );
-        double nPPTX = ScGlobal::nScreenPPTX * (double) aZoom
-            / nOutputFactor;        // Faktor ist Drucker zu Bildschirm
+        // Factor is printer to display ratio
+        double nPPTX = ScGlobal::nScreenPPTX * (double) aZoom / nOutputFactor;
         double nPPTY = ScGlobal::nScreenPPTY * (double) aZoom;
         VirtualDevice aVirtDev;
         mpDoc->SetOptimalHeight( 0, nEndRow, 0,
@@ -458,7 +457,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
     }
     if ( bHasGraphics )
     {
-        // Grafiken einfuegen
+        // Insert graphics
         for ( size_t i = 0, nListSize = mpParser->ListSize(); i < nListSize; ++i )
         {
             pE = mpParser->ListEntry( i );
@@ -504,7 +503,7 @@ sal_Bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEPa
             nHeight = aLogicSize.Height();
         nDir = pI->nDir;
     }
-    // Spaltenbreiten
+    // Column widths
     ColWidthsMap& rColWidths = mpParser->GetColWidths();
     long nThisWidth = 0;
     ColWidthsMap::const_iterator it = rColWidths.find( nCol );
@@ -519,14 +518,14 @@ sal_Bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEPa
             nColWidths += it2->second;
     }
     if ( nWidth > nColWidths )
-    {   // Differenz nur in der ersten Spalte eintragen
+    {   // Only insert difference in first column
         rColWidths[ nCol ] = nWidth - nColWidths + nThisWidth;
     }
-    // Zeilenhoehen, Differenz auf alle betroffenen Zeilen verteilen
+    // Distribute line height difference between all affected lines
     SCROW nRowSpan = pE->nRowOverlap;
     nHeight /= nRowSpan;
     if ( nHeight == 0 )
-        nHeight = 1;        // fuer eindeutigen Vergleich
+        nHeight = 1; // For definite comparison
     for ( SCROW nR = nRow; nR < nRow + nRowSpan; nR++ )
     {
         RowHeightMap::const_iterator it2 = maRowHeights.find( nR );
@@ -566,24 +565,25 @@ void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
     {
         ScHTMLImage* pI = &pE->maImageList[ i ];
         if ( nDir & nHorizontal )
-        {   // horizontal
+        {   // Horizontal
             aInsertPos.X() += aLogicSize.Width();
             aInsertPos.X() += aSpace.X();
             aInsertPos.Y() = aCellInsertPos.Y();
         }
         else
-        {   // vertikal
+        {   // Vertical
             aInsertPos.X() = aCellInsertPos.X();
             aInsertPos.Y() += aLogicSize.Height();
             aInsertPos.Y() += aSpace.Y();
         }
-        // Offset des Spacings drauf
+        // Add offset of Spacing
         aSpace = pDefaultDev->PixelToLogic( pI->aSpace, MapMode( MAP_100TH_MM ) );
         aInsertPos += aSpace;
 
         Size aSizePix = pI->aSize;
         aLogicSize = pDefaultDev->PixelToLogic( aSizePix, MapMode( MAP_100TH_MM ) );
-        //  Groesse begrenzen
+
+        // Limit size
         ::ScLimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
 
         if ( pI->pGraphic )
@@ -600,7 +600,7 @@ void ScEEImport::InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab,
             // See #i37444#.
             pObj->SetGraphicLink( pI->aURL, pI->aFilterName );
 
-            pObj->SetLogicRect( aRect );        // erst nach InsertObject !!!
+            pObj->SetLogicRect( aRect ); // Only after InsertObject!
         }
         nDir = pI->nDir;
     }
@@ -617,7 +617,7 @@ ScEEParser::ScEEParser( EditEngine* pEditP ) :
         nColMax(0),
         nRowMax(0)
 {
-    // pPool wird spaeter bei RTFIMP_START dem SvxRTFParser untergejubelt
+    // pPool is foisted on SvxRTFParser at RTFIMP_START later on
     pPool->SetSecondaryPool( pDocPool );
     pPool->FreezeIdRanges();
     NewActEntry( NULL );
@@ -629,7 +629,7 @@ ScEEParser::~ScEEParser()
     delete pActEntry;
     if ( !maList.empty() ) maList.clear();
 
-    // Pool erst loeschen nachdem die Listen geloescht wurden
+    // Don't delete Pool until the lists have been deleted
     pPool->SetSecondaryPool( NULL );
     SfxItemPool::Free(pDocPool);
     SfxItemPool::Free(pPool);
@@ -637,13 +637,10 @@ ScEEParser::~ScEEParser()
 
 
 void ScEEParser::NewActEntry( ScEEParseEntry* pE )
-{   // neuer freifliegender pActEntry
+{   // New free-flying pActEntry
     pActEntry = new ScEEParseEntry( pPool );
     pActEntry->aSel.nStartPara = (pE ? pE->aSel.nEndPara + 1 : 0);
     pActEntry->aSel.nStartPos = 0;
 }
 
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx
index e0efa75..f5f5d8f 100644
--- a/sc/source/filter/rtf/rtfexp.cxx
+++ b/sc/source/filter/rtf/rtfexp.cxx
@@ -42,8 +42,6 @@
 #include "stlpool.hxx"
 #include "ftools.hxx"
 
-//------------------------------------------------------------------
-
 FltError ScFormatFilterPluginImpl::ScExportRTF( SvStream& rStrm, ScDocument* pDoc,
         const ScRange& rRange, const rtl_TextEncoding /*eNach*/ )
 {
@@ -71,7 +69,7 @@ sal_uLong ScRTFExport::Write()
     rStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF;
     rStrm << OOO_STRING_SVTOOLS_RTF_ANSI << SAL_NEWLINE_STRING;
 
-    // Daten
+    // Data
     for ( SCTAB nTab = aRange.aStart.Tab(); nTab <= aRange.aEnd.Tab(); nTab++ )
     {
         if ( nTab > aRange.aStart.Tab() )
@@ -143,7 +141,7 @@ void ScRTFExport::WriteRow( SCTAB nTab, SCROW nRow )
 
         rStrm << OOO_STRING_SVTOOLS_RTF_CELLX << OString::number(pCellX[nCol+1]).getStr();
         if ( (nCol & 0x0F) == 0x0F )
-            rStrm << SAL_NEWLINE_STRING;      // Zeilen nicht zu lang werden lassen
+            rStrm << SAL_NEWLINE_STRING; // Do not let lines get too long
     }
     rStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << OOO_STRING_SVTOOLS_RTF_INTBL << SAL_NEWLINE_STRING;
 
@@ -152,7 +150,7 @@ void ScRTFExport::WriteRow( SCTAB nTab, SCROW nRow )
     {
         WriteCell( nTab, nRow, nCol );
         if ( rStrm.Tell() - nStrmPos > 255 )
-        {   // Zeilen nicht zu lang werden lassen
+        {   // Do not let lines get too long
             rStrm << SAL_NEWLINE_STRING;
             nStrmPos = rStrm.Tell();
         }
@@ -188,7 +186,7 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol )
             {
                 EditEngine& rEngine = GetEditEngine();
                 rEngine.SetText(*pObj);
-                aContent = rEngine.GetText(LINEEND_LF);   // LineFeed zwischen Absaetzen!
+                aContent = rEngine.GetText(LINEEND_LF); // LineFeed in between paragraphs!
             }
         }
         break;
@@ -251,5 +249,4 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol )
         rStrm << OOO_STRING_SVTOOLS_RTF_PLAIN;
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index 7ededf1..69277d6 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -33,7 +33,7 @@
 #include "document.hxx"
 #include "docpool.hxx"
 
-#define SC_RTFTWIPTOL 10        // 10 Twips Toleranz bei Spaltenbestimmung
+#define SC_RTFTWIPTOL 10        // 10 Twips tolerance when determining columns
 
 
 
@@ -51,7 +51,7 @@ ScRTFParser::ScRTFParser( EditEngine* pEditP ) :
     // RTF default FontSize 12Pt
     long nMM = OutputDevice::LogicToLogic( 12, MAP_POINT, MAP_100TH_MM );
     pPool->SetPoolDefaultItem( SvxFontHeightItem( nMM, 100, EE_CHAR_FONTHEIGHT ) );
-    // freifliegender pInsDefault
+    // Free-flying pInsDefault
     pInsDefault = new ScRTFCellDefault( pPool );
 }
 
@@ -74,18 +74,18 @@ sal_uLong ScRTFParser::Read( SvStream& rStream, const OUString& rBaseURL )
         if ( !maList.empty() )
         {
             ScEEParseEntry* pE = maList.back();
-            if (    // komplett leer
+            if (    // Completely empty
                 (  (  pE->aSel.nStartPara == pE->aSel.nEndPara
                    && pE->aSel.nStartPos  == pE->aSel.nEndPos
                    )
-                ||  // leerer Paragraph
+                ||  // Empty paragraph
                    (  pE->aSel.nStartPara + 1 == pE->aSel.nEndPara
                    && pE->aSel.nStartPos      == pEdit->GetTextLen( pE->aSel.nStartPara )
                    && pE->aSel.nEndPos        == 0
                    )
                 )
                )
-            {   // den letzten leeren Absatz nicht uebernehmen
+            {   // Don't take over the last paragraph
                 maList.pop_back();
             }
         }
@@ -98,9 +98,9 @@ sal_uLong ScRTFParser::Read( SvStream& rStream, const OUString& rBaseURL )
 
 void ScRTFParser::EntryEnd( ScEEParseEntry* pE, const ESelection& aSel )
 {
-    // Paragraph -2 stript den angehaengten leeren Paragraph
+    // Paragraph -2 strips the attached empty paragraph
     pE->aSel.nEndPara = aSel.nEndPara - 2;
-    // obwohl das nEndPos heisst, ist das letzte Position + 1
+    // Although it's called nEndPos, the last one is position + 1
     pE->aSel.nEndPos = pEdit->GetTextLen( aSel.nEndPara - 1 );
 }
 
@@ -124,10 +124,10 @@ sal_Bool ScRTFParser::SeekTwips( sal_uInt16 nTwips, SCCOL* pCol )
     if ( !nCount )
         return false;
     SCCOL nCol = *pCol;
-    // nCol ist Einfuegeposition, da liegt der Naechsthoehere (oder auch nicht)
+    // nCol is insertion position; the next one higher up is there (or not)
     if ( nCol < static_cast<SCCOL>(nCount) && (((*pColTwips)[nCol] - SC_RTFTWIPTOL) <= nTwips) )
         return sal_True;
-    // nicht kleiner als alles andere? dann mit Naechstniedrigerem vergleichen
+    // Not smaller than everything else? Then compare with the next lower one
     else if ( nCol != 0 && (((*pColTwips)[nCol-1] + SC_RTFTWIPTOL) >= nTwips) )
     {
         (*pCol)--;
@@ -150,13 +150,13 @@ void ScRTFParser::ColAdjust()
                 nCol = 0;
             pE->nCol = nCol;
             if ( pE->nColOverlap > 1 )
-                nCol = nCol + pE->nColOverlap;       // merged cells mit \clmrg
+                nCol = nCol + pE->nColOverlap; // Merged cells with \clmrg
             else
             {
                 SeekTwips( pE->nTwips, &nCol );
                 if ( ++nCol <= pE->nCol )
-                    nCol = pE->nCol + 1;        // verschobene Zell-X
-                pE->nColOverlap = nCol - pE->nCol;      // merged cells ohne \clmrg
+                    nCol = pE->nCol + 1; // Moved cell X
+                pE->nColOverlap = nCol - pE->nCol; // Merged cells without \clmrg
             }
             if ( nCol > nColMax )
                 nColMax = nCol;
@@ -189,11 +189,11 @@ IMPL_LINK( ScRTFParser, RTFImportHdl, ImportInfo*, pInfo )
             break;
         case RTFIMP_END:
             if ( pInfo->aSelection.nEndPos )
-            {   // falls noch Text: letzten Absatz erzeugen
+            {   // If still text: create last paragraph
                 pActDefault = NULL;
                 pInfo->nToken = RTF_PAR;
-                // EditEngine hat keinen leeren Paragraph mehr angehaengt
-                // den EntryEnd strippen koennte
+                // EditEngine did not attach an empty paragraph anymore
+                // which EntryEnd could strip
                 pInfo->aSelection.nEndPara++;
                 ProcToken( pInfo );
             }
@@ -210,15 +210,15 @@ IMPL_LINK( ScRTFParser, RTFImportHdl, ImportInfo*, pInfo )
     return 0;
 }
 
-
-// bei RTF_INTBL bzw. am Anfang von erstem RTF_CELL nach RTF_CELLX wenn es
-// kein RTF_INTBL gab, bad behavior
+// Bad behavior:
+// For RTF_INTBL or respectively at the start of the first RTF_CELL
+// after RTF_CELLX if there was no RTF_INTBL
 void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
 {
     if ( bNewDef )
     {
         bNewDef = false;
-        // rechts nicht buendig? => neue Tabelle
+        // Not flush on the right? => new table
         if ( nLastWidth && !maDefaultList.empty() )
         {
             const ScRTFCellDefault& rD = maDefaultList.back();
@@ -235,7 +235,7 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
                 }
             }
         }
-        // TwipCols aufbauen, erst nach nLastWidth Vergleich!
+        // Build up TwipCols only after nLastWidth comparison!
         for ( size_t i = 0, n = maDefaultList.size(); i < n; ++i )
         {
             const ScRTFCellDefault& rD = maDefaultList[i];
@@ -309,9 +309,9 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
                 mnCurPos = maDefaultList.size() - 1;
             }
             OSL_ENSURE( pDefMerge, "RTF_CLMRG: pDefMerge==0" );
-            if ( pDefMerge )        // sonst rottes RTF
-                pDefMerge->nColOverlap++;   // mehrere nacheinander moeglich
-            pInsDefault->nColOverlap = 0;   // Flag: ignoriere diese
+            if ( pDefMerge ) // Else broken RTF
+                pDefMerge->nColOverlap++;   // multiple successive ones possible
+            pInsDefault->nColOverlap = 0;   // Flag: ignore these
             nLastToken = pInfo->nToken;
         }
         break;
@@ -319,9 +319,9 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
         {
             bNewDef = sal_True;
             pInsDefault->nCol = nColCnt;
-            pInsDefault->nTwips = pInfo->nTokenValue;   // rechter Zellenrand
+            pInsDefault->nTwips = pInfo->nTokenValue; // Right cell border
             maDefaultList.push_back( pInsDefault );
-            // neuer freifliegender pInsDefault
+            // New free-flying pInsDefault
             pInsDefault = new ScRTFCellDefault( pPool );
             if ( ++nColCnt > nColMax )
                 nColMax = nColCnt;
@@ -330,8 +330,8 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
         break;
         case RTF_INTBL:         // before the first RTF_CELL
         {
-            // einmal ueber NextToken und einmal ueber UnknownAttrToken
-            // oder z.B. \intbl ... \cell \pard \intbl ... \cell
+            // Once over NextToken and once over UnknownAttrToken
+            // or e.g. \intbl ... \cell \pard \intbl ... \cell
             if ( nLastToken != RTF_INTBL && nLastToken != RTF_CELL && nLastToken != RTF_PAR )
             {
                 NewCellRow( pInfo );
@@ -344,11 +344,11 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
             OSL_ENSURE( pActDefault, "RTF_CELL: pActDefault==0" );
             if ( bNewDef || !pActDefault )
                 NewCellRow( pInfo );    // davor war kein \intbl, bad behavior
-            // rottes RTF? retten was zu retten ist
+            // Broken RTF? Let's save what we can
             if ( !pActDefault )
                 pActDefault = pInsDefault;
             if ( pActDefault->nColOverlap > 0 )
-            {   // nicht merged mit vorheriger
+            {   // Not merged with preceding
                 pActEntry->nCol = pActDefault->nCol;
                 pActEntry->nColOverlap = pActDefault->nColOverlap;
                 pActEntry->nTwips = pActDefault->nTwips;
@@ -359,17 +359,17 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
                 if ( nStartAdjust == (sal_uLong)~0 )
                     nStartAdjust = maList.size();
                 maList.push_back( pActEntry );
-                NewActEntry( pActEntry );   // neuer freifliegender pActEntry
+                NewActEntry( pActEntry ); // New free-flying pActEntry
             }
             else
-            {   // aktuelle Twips der MergeCell zuweisen
+            {   // Assign current Twips to MergeCell
                 if ( !maList.empty() )
                 {
                     pE = maList.back();
                     pE->nTwips = pActDefault->nTwips;
                 }
-                // Selection des freifliegenden pActEntry anpassen
-                // Paragraph -1 wg. Textaufbruch in EditEngine waehrend Parse
+                // Adjust selection of free-flying pActEntry
+                // Paragraph -1 due to separated text in EditEngine during parsing
                 pActEntry->aSel.nStartPara = pInfo->aSelection.nEndPara - 1;
             }
 
@@ -380,7 +380,7 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
             nLastToken = pInfo->nToken;
         }
         break;
-        case RTF_ROW:           // means the end of a row
+        case RTF_ROW:           // denotes the end of a row
         {
             NextRow();
             nLastToken = pInfo->nToken;
@@ -418,7 +418,4 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
     }
 }
 
-
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list