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

Eric Seynaeve github at nosperse.com
Wed Feb 6 11:45:45 PST 2013


 sc/source/core/data/column.cxx  |   89 ++++++++++-----------
 sc/source/core/data/column2.cxx |  163 +++++++++++++++++++---------------------
 2 files changed, 123 insertions(+), 129 deletions(-)

New commits:
commit f60708de8a73cb716cc73e95ded7b0032a47be72
Author: Eric Seynaeve <github at nosperse.com>
Date:   Tue Feb 5 22:08:36 2013 +0100

    Translated german comments
    
    Change-Id: I9ee25faa57397ec2d0e7e9bb77aabade4404e32d

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 5f30ebd..21f7784 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -74,7 +74,7 @@ inline bool IsAmbiguousScript( sal_uInt8 nScript )
 // -----------------------------------------------------------------------------------------
 
 //
-//  Datei-Operationen
+//  Data operations
 //
 
 // -----------------------------------------------------------------------------------------
@@ -95,8 +95,8 @@ long ScColumn::GetNeededSize(
         if (!pPattern)
             pPattern = pAttrArray->GetPattern( nRow );
 
-        //      zusammengefasst?
-        //      Merge nicht in bedingter Formatierung
+        //      merged?
+        //      Do not merge in conditional formatting
 
         const ScMergeAttr*      pMerge = (const ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
         const ScMergeFlagAttr*  pFlag = (const ScMergeFlagAttr*)&pPattern->GetItem(ATTR_MERGE_FLAG);
@@ -116,10 +116,10 @@ long ScColumn::GetNeededSize(
                 return 0;
         }
 
-        //      bedingte Formatierung
+        //      conditional formatting
         const SfxItemSet* pCondSet = pDocument->GetCondResult( nCol, nRow, nTab );
 
-        //  Zeilenumbruch?
+        //  line break?
 
         const SfxPoolItem* pCondItem;
         SvxCellHorJustify eHorJust;
@@ -179,7 +179,7 @@ long ScColumn::GetNeededSize(
                                                 pPattern->GetItem(ATTR_ROTATE_MODE)).GetValue();
 
                 if ( nRotate == 18000 )
-                    eRotMode = SVX_ROTATE_MODE_STANDARD;    // keinen Ueberlauf
+                    eRotMode = SVX_ROTATE_MODE_STANDARD;    // no overflow
             }
         }
 
@@ -229,7 +229,7 @@ long ScColumn::GetNeededSize(
                                 IsAmbiguousScript( nScript ) ||
                                 ((eCellType == CELLTYPE_FORMULA) && ((ScFormulaCell*)pCell)->IsMultilineResult()) );
 
-        if (!bEditEngine)                                   // direkte Ausgabe
+        if (!bEditEngine)                                   // direct output
         {
             Color* pColor;
             rtl::OUString aValStr;
@@ -238,7 +238,7 @@ long ScColumn::GetNeededSize(
                                         true, rOptions.bFormula, ftCheck );
             if (!aValStr.isEmpty())
             {
-                //  SetFont ist nach oben verschoben
+                //  SetFont is moved up
 
                 Size aSize( pDev->GetTextWidth( aValStr ), pDev->GetTextHeight() );
                 if ( eOrient != SVX_ORIENTATION_STANDARD )
@@ -249,9 +249,9 @@ long ScColumn::GetNeededSize(
                 }
                 else if ( nRotate )
                 {
-                    //! unterschiedliche Skalierung X/Y beruecksichtigen
+                    //! take different X/Y scaling into consideration
 
-                    double nRealOrient = nRotate * F_PI18000;   // nRotate sind 1/100 Grad
+                    double nRealOrient = nRotate * F_PI18000;   // nRotate is in 1/100 Grad
                     double nCosAbs = fabs( cos( nRealOrient ) );
                     double nSinAbs = fabs( sin( nRealOrient ) );
                     long nHeight = (long)( aSize.Height() * nCosAbs + aSize.Width() * nSinAbs );
@@ -262,14 +262,14 @@ long ScColumn::GetNeededSize(
                     {
                         nWidth = (long) ( pDocument->GetColWidth( nCol,nTab ) * nPPT );
                         bAddMargin = false;
-                        //  nur nach rechts:
-                        //! unterscheiden nach Ausrichtung oben/unten (nur Text/ganze Hoehe)
+                        //  only to the right:
+                        //! differ on direction up/down (only Text/whole height)
                         if ( pPattern->GetRotateDir( pCondSet ) == SC_ROTDIR_RIGHT )
                             nWidth += (long)( pDocument->GetRowHeight( nRow,nTab ) *
                                                 nPPT * nCosAbs / nSinAbs );
                     }
                     else
-                        nWidth  = (long)( aSize.Height() / nSinAbs );   //! begrenzen?
+                        nWidth  = (long)( aSize.Height() / nSinAbs );   //! limit?
 
                     if ( bBreak && !rOptions.bTotalSize )
                     {
@@ -297,18 +297,18 @@ long ScColumn::GetNeededSize(
                                   (long) ( pMargin->GetBottomMargin() * nPPT );
                 }
 
-                                                //  Zeilenumbruch ausgefuehrt ?
+                //  linebreak done ?
 
                 if ( bBreak && !bWidth )
                 {
-                    //  Test mit EditEngine zur Sicherheit schon bei 90%
-                    //  (wegen Rundungsfehlern und weil EditEngine teilweise anders formatiert)
+                    //  test with EditEngine the safety at 90%
+                    //  (due to rounding errors and because EditEngine formats partially differently)
 
                     long nDocPixel = (long) ( ( pDocument->GetColWidth( nCol,nTab ) -
                                         pMargin->GetLeftMargin() - pMargin->GetRightMargin() -
                                         nIndent )
                                         * nPPT );
-                    nDocPixel = (nDocPixel * 9) / 10;           // zur Sicherheit
+                    nDocPixel = (nDocPixel * 9) / 10;           // for safety
                     if ( aSize.Width() > nDocPixel )
                         bEditEngine = true;
                 }
@@ -317,12 +317,12 @@ long ScColumn::GetNeededSize(
 
         if (bEditEngine)
         {
-            //  der Font wird bei !bEditEngine nicht jedesmal neu gesetzt
+            //  the font is not reset each time with !bEditEngine
             Font aOldFont = pDev->GetFont();
 
             MapMode aHMMMode( MAP_100TH_MM, Point(), rZoomX, rZoomY );
 
-            // am Dokument speichern ?
+            // save in document ?
             ScFieldEditEngine* pEngine = pDocument->CreateFieldEditEngine();
 
             pEngine->SetUpdateMode( false );
@@ -372,7 +372,7 @@ long ScColumn::GetNeededSize(
                         nDocWidth += (long) ( pDocument->GetColWidth(nCol+nColAdd,nTab) * fWidthFactor );
                 nDocWidth -= (long) ( pMargin->GetLeftMargin() * fWidthFactor )
                            + (long) ( pMargin->GetRightMargin() * fWidthFactor )
-                           + 1;     // Ausgabebereich ist Breite-1 Pixel (wegen Gitterlinien)
+                           + 1;     // output size is width-1 pixel (due to gridline)
                 if ( nIndent )
                     nDocWidth -= (long) ( nIndent * fWidthFactor );
 
@@ -414,10 +414,10 @@ long ScColumn::GetNeededSize(
                 bEdWidth = !bEdWidth;
             if ( nRotate )
             {
-                //! unterschiedliche Skalierung X/Y beruecksichtigen
+                //! take different X/Y scaling into consideration
 
                 Size aSize( pEngine->CalcTextWidth(), pEngine->GetTextHeight() );
-                double nRealOrient = nRotate * F_PI18000;   // nRotate sind 1/100 Grad
+                double nRealOrient = nRotate * F_PI18000;   // nRotate is in 1/100 Grad
                 double nCosAbs = fabs( cos( nRealOrient ) );
                 double nSinAbs = fabs( sin( nRealOrient ) );
                 long nHeight = (long)( aSize.Height() * nCosAbs + aSize.Width() * nSinAbs );
@@ -433,7 +433,7 @@ long ScColumn::GetNeededSize(
                                             nPPT * nCosAbs / nSinAbs );
                 }
                 else
-                    nWidth  = (long)( aSize.Height() / nSinAbs );   //! begrenzen?
+                    nWidth  = (long)( aSize.Height() / nSinAbs );   //! limit?
                 aSize = Size( nWidth, nHeight );
 
                 Size aPixSize = pDev->LogicToPixel( aSize, aHMMMode );
@@ -460,7 +460,7 @@ long ScColumn::GetNeededSize(
                     nValue = pDev->LogicToPixel(Size( pEngine->CalcTextWidth(), 0 ),
                                         aHMMMode).Width();
             }
-            else            // Hoehe
+            else            // height
             {
                 nValue = pDev->LogicToPixel(Size( 0, pEngine->GetTextHeight() ),
                                     aHMMMode).Height();
@@ -510,9 +510,9 @@ long ScColumn::GetNeededSize(
 
         if (bWidth)
         {
-            //      Platz fuer Autofilter-Button
+            //      place for Autofilter Button
             //      20 * nZoom/100
-            //      bedingte Formatierung hier nicht interessant
+            //      Conditional formatting is not interesting here
 
             sal_Int16 nFlags = ((const ScMergeFlagAttr&)pPattern->GetItem(ATTR_MERGE_FLAG)).GetValue();
             if (nFlags & SC_MF_AUTO)
@@ -536,7 +536,7 @@ sal_uInt16 ScColumn::GetOptimalColWidth(
     SCSIZE nIndex;
     ScMarkedDataIter aDataIter(this, pMarkData, true);
     if ( pParam && pParam->mbSimpleText )
-    {   // alles eins bis auf NumberFormate
+    {   // all the same except for number format
         const ScPatternAttr* pPattern = GetPattern( 0 );
         Font aFont;
         // font color doesn't matter here
@@ -631,7 +631,7 @@ static sal_uInt16 lcl_GetAttribHeight( const ScPatternAttr& rPattern, sal_uInt16
     sal_uInt16 nHeight = (sal_uInt16) ((const SvxFontHeightItem&) rPattern.GetItem(nFontHeightId)).GetHeight();
     const SvxMarginItem* pMargin = (const SvxMarginItem*) &rPattern.GetItem(ATTR_MARGIN);
     nHeight += nHeight / 5;
-    //  gibt bei 10pt 240
+    //  for 10pt gives 240
 
     if ( ((const SvxEmphasisMarkItem&)rPattern.
             GetItem(ATTR_FONT_EMPHASISMARK)).GetEmphasisMark() != EMPHASISMARK_NONE )
@@ -647,8 +647,8 @@ static sal_uInt16 lcl_GetAttribHeight( const ScPatternAttr& rPattern, sal_uInt16
         nHeight -= 240;
     }
 
-    //  Standard-Hoehe: TextHeight + Raender - 23
-    //  -> 257 unter Windows
+    //  Standard height: TextHeight + margin - 23
+    //  -> 257 for Windows
 
     if (nHeight > STD_ROWHEIGHT_DIFF)
         nHeight -= STD_ROWHEIGHT_DIFF;
@@ -659,8 +659,8 @@ static sal_uInt16 lcl_GetAttribHeight( const ScPatternAttr& rPattern, sal_uInt16
 }
 
 //  pHeight in Twips
-//  nMinHeight, nMinStart zur Optimierung: ab nRow >= nMinStart ist mindestens nMinHeight
-//  (wird nur bei bStdAllowed ausgewertet)
+//  optimize nMinHeight, nMinStart : with nRow >= nMinStart is at least nMinHeight
+//  (is only evaluated with bStdAllowed)
 
 void ScColumn::GetOptimalHeight(
     SCROW nStartRow, SCROW nEndRow, sal_uInt16* pHeight, OutputDevice* pDev,
@@ -674,7 +674,7 @@ void ScColumn::GetOptimalHeight(
     SCROW nEditPos = 0;
     SCROW nNextEnd = 0;
 
-    //  bei bedingter Formatierung werden immer die einzelnen Zellen angesehen
+    //  with conditional formatting, always consider the individual cells
 
     const ScPatternAttr* pPattern = aIter.Next(nStart,nEnd);
     while ( pPattern )
@@ -683,9 +683,9 @@ void ScColumn::GetOptimalHeight(
         const ScMergeFlagAttr*  pFlag = (const ScMergeFlagAttr*)&pPattern->GetItem(ATTR_MERGE_FLAG);
         if ( pMerge->GetRowMerge() > 1 || pFlag->IsOverlapped() )
         {
-            //  nix - vertikal bei der zusammengefassten und den ueberdeckten,
-            //        horizontal nur bei den ueberdeckten (unsichtbaren) -
-            //        eine nur horizontal zusammengefasste wird aber beruecksichtigt
+            //  do nothing - vertically with merged and overlapping,
+            //        horizontally only with overlapped (invisible) -
+            //        only one horizontal merged is always considered
         }
         else
         {
@@ -700,7 +700,7 @@ void ScColumn::GetOptimalHeight(
                                     SVX_HOR_JUSTIFY_BLOCK);
                 bStdOnly = !bBreak;
 
-                // bedingte Formatierung: Zellen durchgehen
+                // conditional formatting: loop all cells
                 if (bStdOnly &&
                     !static_cast<const ScCondFormatItem&>(pPattern->GetItem(
                             ATTR_CONDITIONAL)).GetCondFormatData().empty())
@@ -708,7 +708,7 @@ void ScColumn::GetOptimalHeight(
                     bStdOnly = false;
                 }
 
-                // gedrehter Text: Zellen durchgehen
+                // rotated text: loop all cells
                 if ( bStdOnly && ((const SfxInt32Item&)pPattern->
                                     GetItem(ATTR_ROTATE_VALUE)).GetValue() )
                     bStdOnly = false;
@@ -722,13 +722,13 @@ void ScColumn::GetOptimalHeight(
                         bStdOnly = false;
                         if (nEnd > nEditPos)
                             nNextEnd = nEnd;
-                        nEnd = nEditPos;                // einzeln ausrechnen
-                        bStdAllowed = false;            // wird auf jeden Fall per Zelle berechnet
+                        nEnd = nEditPos;                // calculate single
+                        bStdAllowed = false;            // will be computed in any case per cell
                     }
                     else
                     {
                         nNextEnd = nEnd;
-                        nEnd = nEditPos - 1;            // Standard - Teil
+                        nEnd = nEditPos - 1;            // standard - part
                     }
                 }
 
@@ -795,7 +795,7 @@ void ScColumn::GetOptimalHeight(
                 }
             }
 
-            if (!bStdOnly)                      // belegte Zellen suchen
+            if (!bStdOnly)                      // search covered cells
             {
                 ScNeededSizeOptions aOptions;
 
@@ -803,7 +803,7 @@ void ScColumn::GetOptimalHeight(
                 Search(nStart,nIndex);
                 while ( (nIndex < maItems.size()) ? ((nRow=maItems[nIndex].nRow) <= nEnd) : false )
                 {
-                    //  Zellhoehe nur berechnen, wenn sie spaeter auch gebraucht wird (#37928#)
+                    //  only calculate the cell height when it's used later (#37928#)
 
                     if ( bShrink || !(pDocument->GetRowFlags(nRow, nTab) & CR_MANUALSIZE) )
                     {
@@ -894,27 +894,25 @@ void ScColumn::RemoveAutoSpellObj()
         {
             ScEditCell* pOldCell = (ScEditCell*) maItems[i].pCell;
             const EditTextObject* pData = pOldCell->GetData();
-            //  keine Abfrage auf HasOnlineSpellErrors, damit es auch
-            //  nach dem Laden funktioniert
+            //  no query on HasOnlineSpellErrors, this makes it also work after loading
 
-            //  Fuer den Test auf harte Formatierung (ScEditAttrTester) sind die Defaults
-            //  in der EditEngine unwichtig. Wenn der Tester spaeter einmal gleiche
-            //  Attribute in Default und harter Formatierung erkennen und weglassen sollte,
-            //  muessten an der EditEngine zu jeder Zelle die richtigen Defaults gesetzt
-            //  werden!
+            //  For the test on hard formatting (ScEditAttrTester), are the defaults in the
+            //  EditEngine of no importance. When the tester would later recognise the same
+            //  attributes in default and hard formatting and has to remove them, the correct
+            //  defaults must be set in the EditEngine for each cell.
 
-            //  auf Attribute testen
+            //  test for attributes
             if ( !pEngine )
                 pEngine = new ScTabEditEngine(pDocument);
             pEngine->SetText( *pData );
             ScEditAttrTester aTester( pEngine );
-            if ( aTester.NeedsObject() )                    // nur Spell-Errors entfernen
+            if ( aTester.NeedsObject() )                    // only remove spelling errors
             {
-                EditTextObject* pNewData = pEngine->CreateTextObject(); // ohne BIGOBJ
+                EditTextObject* pNewData = pEngine->CreateTextObject(); // without BIGOBJ
                 pOldCell->SetData( pNewData, pEngine->GetEditTextObjectPool() );
                 delete pNewData;
             }
-            else                                            // String erzeugen
+            else                                            // create a string
             {
                 String aText = ScEditUtil::GetSpaceDelimitedString( *pEngine );
                 ScBaseCell* pNewCell = new ScStringCell( aText );
@@ -939,17 +937,16 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow )
             ScEditCell* pOldCell = (ScEditCell*) maItems[i].pCell;
             const EditTextObject* pData = pOldCell->GetData();
 
-            //  Fuer den Test auf harte Formatierung (ScEditAttrTester) sind die Defaults
-            //  in der EditEngine unwichtig. Wenn der Tester spaeter einmal gleiche
-            //  Attribute in Default und harter Formatierung erkennen und weglassen sollte,
-            //  muessten an der EditEngine zu jeder Zelle die richtigen Defaults gesetzt
-            //  werden!
+            //  For the test on hard formatting (ScEditAttrTester), are the defaults in the
+            //  EditEngine of no importance. When the tester would later recognise the same
+            //  attributes in default and hard formatting and has to remove them, the correct
+            //  defaults must be set in the EditEngine for each cell.
 
-            //  auf Attribute testen
+            //  test for attributes
             if ( !pEngine )
             {
                 pEngine = new ScFieldEditEngine(pDocument, pDocument->GetEditPool());
-                //  EE_CNTRL_ONLINESPELLING falls schon Fehler drin sind
+                //  EE_CNTRL_ONLINESPELLING if there are errors already
                 pEngine->SetControlWord( pEngine->GetControlWord() | EE_CNTRL_ONLINESPELLING );
                 pDocument->ApplyAsianEditSettings( *pEngine );
             }
@@ -961,18 +958,18 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow )
                 const SfxItemSet& rOld = pEngine->GetParaAttribs( nPar );
                 if ( rOld.Count() )
                 {
-                    SfxItemSet aNew( *rOld.GetPool(), rOld.GetRanges() );   // leer
+                    SfxItemSet aNew( *rOld.GetPool(), rOld.GetRanges() );   // empty
                     pEngine->SetParaAttribs( nPar, aNew );
                 }
             }
-            //  URL-Felder in Text wandeln (andere gibt's nicht, darum pType=0)
+            //  change URL field to text (not possible otherwise, thus pType=0)
             pEngine->RemoveFields( true );
 
             bool bSpellErrors = pEngine->HasOnlineSpellErrors();
-            bool bNeedObject = bSpellErrors || nParCount>1;         // Errors/Absaetze behalten
-            //  ScEditAttrTester nicht mehr noetig, Felder sind raus
+            bool bNeedObject = bSpellErrors || nParCount>1;         // keep errors/paragraphs
+            //  ScEditAttrTester is not needed anymore, arrays are gone
 
-            if ( bNeedObject )                                      // bleibt Edit-Zelle
+            if ( bNeedObject )                                      // remains edit cell
             {
                 sal_uInt32 nCtrl = pEngine->GetControlWord();
                 sal_uInt32 nWantBig = bSpellErrors ? EE_CNTRL_ALLOWBIGOBJS : 0;
@@ -982,7 +979,7 @@ void ScColumn::RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow )
                 pOldCell->SetData( pNewData, pEngine->GetEditTextObjectPool() );
                 delete pNewData;
             }
-            else                                            // String erzeugen
+            else                                            // create String
             {
                 String aText = ScEditUtil::GetSpaceDelimitedString( *pEngine );
                 ScBaseCell* pNewCell = new ScStringCell( aText );
@@ -1040,9 +1037,9 @@ bool ScColumnIterator::Next( SCROW& rRow, ScBaseCell*& rpCell )
     return false;
 }
 
-SCSIZE ScColumnIterator::GetIndex() const           // Index zur letzen abgefragten Zelle
+SCSIZE ScColumnIterator::GetIndex() const           // Index of the last cell asked
 {
-    return nPos - 1;        // bei Next ist Pos hochgezaehlt worden
+    return nPos - 1;        // next time the position is incremented
 }
 
 // -----------------------------------------------------------------------------------------
@@ -1072,7 +1069,7 @@ bool ScMarkedDataIter::Next( SCSIZE& rIndex )
         {
             if (!pMarkIter || !pMarkIter->Next( nTop, nBottom ))
             {
-                if (bAll)                   // ganze Spalte
+                if (bAll)                   // complete column
                 {
                     nTop    = 0;
                     nBottom = MAXROW;
@@ -1082,7 +1079,7 @@ bool ScMarkedDataIter::Next( SCSIZE& rIndex )
             }
             pColumn->Search( nTop, nPos );
             bNext = false;
-            bAll  = false;                  // nur beim ersten Versuch
+            bAll  = false;                  // only the first time
         }
 
         if ( nPos >= pColumn->maItems.size() )
@@ -1126,7 +1123,7 @@ bool ScColumn::IsEmptyVisData() const
 
 SCSIZE ScColumn::VisibleCount( SCROW nStartRow, SCROW nEndRow ) const
 {
-    //  Notizen werden nicht mitgezaehlt
+    //  Notes are not counted
 
     SCSIZE nVisCount = 0;
     SCSIZE nIndex;
@@ -1436,8 +1433,8 @@ void ScColumn::FindDataAreaPos(SCROW& rRow, bool bDown) const
 
 bool ScColumn::HasDataAt(SCROW nRow) const
 {
-        //  immer nur sichtbare interessant ?
-        //! dann HasVisibleDataAt raus
+        //  are only visible cells interesting ?
+        //! then HasVisibleDataAt out
 
     SCSIZE nIndex;
     if (Search(nRow, nIndex))
@@ -1643,12 +1640,12 @@ static void lcl_UpdateSubTotal( ScFunctionData& rData, const ScBaseCell* pCell )
             break;
         case CELLTYPE_FORMULA:
             {
-                if ( rData.eFunc != SUBTOTAL_FUNC_CNT2 )        // da interessiert's nicht
+                if ( rData.eFunc != SUBTOTAL_FUNC_CNT2 )        // it doesn't interest us
                 {
                     ScFormulaCell* pFC = (ScFormulaCell*)pCell;
                     if ( pFC->GetErrCode() )
                     {
-                        if ( rData.eFunc != SUBTOTAL_FUNC_CNT ) // fuer Anzahl einfach weglassen
+                        if ( rData.eFunc != SUBTOTAL_FUNC_CNT ) // simply remove from count
                             rData.bError = true;
                     }
                     else if (pFC->IsValue())
@@ -1656,14 +1653,14 @@ static void lcl_UpdateSubTotal( ScFunctionData& rData, const ScBaseCell* pCell )
                         nValue = pFC->GetValue();
                         bVal = true;
                     }
-                    // sonst Text
+                    // otherwise text
                 }
             }
             break;
         case CELLTYPE_NOTE:
             bCell = false;
             break;
-        // bei Strings nichts
+        // nothing for strings
         default:
         {
             // added to avoid warnings
@@ -1683,11 +1680,11 @@ static void lcl_UpdateSubTotal( ScFunctionData& rData, const ScBaseCell* pCell )
                         rData.bError = true;
                 }
                 break;
-            case SUBTOTAL_FUNC_CNT:             // nur Werte
+            case SUBTOTAL_FUNC_CNT:             // only the value
                 if (bVal)
                     ++rData.nCount;
                 break;
-            case SUBTOTAL_FUNC_CNT2:            // alle
+            case SUBTOTAL_FUNC_CNT2:            // everything
                 if (bCell)
                     ++rData.nCount;
                 break;
@@ -1709,7 +1706,7 @@ static void lcl_UpdateSubTotal( ScFunctionData& rData, const ScBaseCell* pCell )
     }
 }
 
-//  Mehrfachselektion:
+//  multiple selections:
 void ScColumn::UpdateSelectionFunction(
     const ScMarkData& rMark, ScFunctionData& rData, ScFlatBoolRowSegments& rHiddenRows,
     bool bDoExclude, SCROW nExStartRow, SCROW nExEndRow) const
@@ -1726,7 +1723,7 @@ void ScColumn::UpdateSelectionFunction(
     }
 }
 
-//  bei bNoMarked die Mehrfachselektion weglassen
+//  with bNoMarked ignore the multiple selections
 void ScColumn::UpdateAreaFunction(
     ScFunctionData& rData, ScFlatBoolRowSegments& rHiddenRows, SCROW nStartRow, SCROW nEndRow) const
 {
@@ -1746,7 +1743,7 @@ sal_uInt32 ScColumn::GetWeightedCount() const
 {
     sal_uInt32 nTotal = 0;
 
-    //  Notizen werden nicht gezaehlt
+    //  Notes are not counted
 
     for (SCSIZE i=0; i<maItems.size(); i++)
     {
commit b7820359b945051040c8f2022ec7452107e3210a
Author: Eric Seynaeve <github at nosperse.com>
Date:   Mon Feb 4 22:45:06 2013 +0100

    Translated german comments
    
    Change-Id: Idc31ebc5bb2d11345f68b7275b7fc4d335b633c1

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index fc22a5b..ad156ef 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -425,7 +425,7 @@ void ScColumn::ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
 
     const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow );
 
-    //  true = alten Eintrag behalten
+    //  true = keep old content
 
     ScPatternAttr* pNewPattern = (ScPatternAttr*) &aCache.ApplyTo( *pPattern, true );
     ScDocumentPool::CheckRef( *pPattern );
@@ -548,7 +548,7 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, bool&
     rFound = false;
     if (!rMark.IsMultiMarked())
     {
-        OSL_FAIL("ScColumn::GetSelectionStyle ohne Selektion");
+        OSL_FAIL("No selection in ScColumn::GetSelectionStyle");
         return NULL;
     }
 
@@ -571,7 +571,7 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, bool&
             pNewStyle = pPattern->GetStyleSheet();
             rFound = true;
             if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
-                bEqual = false;                                             // unterschiedliche
+                bEqual = false;                                             // difference
             pStyle = pNewStyle;
         }
     }
@@ -598,7 +598,7 @@ const ScStyleSheet* ScColumn::GetAreaStyle( bool& rFound, SCROW nRow1, SCROW nRo
         pNewStyle = pPattern->GetStyleSheet();
         rFound = true;
         if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
-            bEqual = false;                                             // unterschiedliche
+            bEqual = false;                                             // difference
         pStyle = pNewStyle;
     }
 
@@ -649,8 +649,8 @@ void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow,
 
 void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )
 {
-    //  um nur ein neues SetItem zu erzeugen, brauchen wir keinen SfxItemPoolCache.
-    //! Achtung: der SfxItemPoolCache scheint zuviele Refs fuer das neue SetItem zu erzeugen ??
+    //  in order to only create a new SetItem, we don't need SfxItemPoolCache.
+    //! Warning: SfxItemPoolCache seems to create to many Refs for the new SetItem ??
 
     ScDocumentPool* pDocPool = pDocument->GetPool();
 
@@ -662,11 +662,9 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )
     if ( pNewPattern != pOldPattern )
         pAttrArray->SetPattern( nRow, pNewPattern );
     else
-        pDocPool->Remove( *pNewPattern );       // ausser Spesen nichts gewesen
+        pDocPool->Remove( *pNewPattern );       // free up resources
 
     delete pTemp;
-
-        // alte Version mit SfxItemPoolCache:
 }
 
 bool ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
@@ -775,7 +773,6 @@ void ScColumn::ReserveSize( SCSIZE nSize )
     maItems.reserve(nSize);
 }
 
-//  SwapRow zum Sortieren
 
 namespace {
 
@@ -793,6 +790,7 @@ void lclTakeBroadcaster( ScBaseCell*& rpCell, SvtBroadcaster* pBC )
 
 } // namespace
 
+//  SwapRow for sorting
 void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
 {
     /*  Simple swap of cell pointers does not work if broadcasters exist (crash
@@ -887,7 +885,7 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
         ScTokenArray* pCode1 = pFmlaCell1->GetCode();
         ScTokenArray* pCode2 = pFmlaCell2->GetCode();
 
-        if (pCode1->GetLen() == pCode2->GetLen())       // nicht-UPN
+        if (pCode1->GetLen() == pCode2->GetLen())       // not-UPN
         {
             bool bEqual = true;
             sal_uInt16 nLen = pCode1->GetLen();
@@ -971,10 +969,10 @@ void ScColumn::SwapCell( SCROW nRow, ScColumn& rCol)
 
     if ( pCell2 )
     {
-        // Tauschen
+        // swap
         maItems[nIndex1].pCell = pCell2;
         rCol.maItems[nIndex2].pCell = pCell1;
-        // Referenzen aktualisieren
+        // update references
         SCsCOL dx = rCol.nCol - nCol;
         if ( pFmlaCell1 )
         {
@@ -993,9 +991,9 @@ void ScColumn::SwapCell( SCROW nRow, ScColumn& rCol)
     }
     else
     {
-        // Loeschen
+        // remove
         maItems.erase(maItems.begin() + nIndex1);
-        // Referenzen aktualisieren
+        // update references
         SCsCOL dx = rCol.nCol - nCol;
         if ( pFmlaCell1 )
         {
@@ -1004,7 +1002,7 @@ void ScColumn::SwapCell( SCROW nRow, ScColumn& rCol)
             pFmlaCell1->aPos.SetCol( rCol.nCol );
             pFmlaCell1->UpdateReference(URM_MOVE, aRange, dx, 0, 0);
         }
-        // Einfuegen
+        // insert
         rCol.Insert(nRow, pCell1);
     }
 }
@@ -1020,12 +1018,12 @@ bool ScColumn::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
                 bTest = (maItems[i].nRow < nStartRow) || (maItems[i].nRow > nEndRow)
                         || maItems[i].pCell->IsBlank();
 
-        //  AttrArray testet nur zusammengefasste
+        //  AttrArray only looks for merged cells
 
         if ((bTest) && (pAttrArray))
             bTest = pAttrArray->TestInsertCol(nStartRow, nEndRow);
 
-        //!     rausgeschobene Attribute bei Undo beruecksichtigen
+        //!     consider the removed Attribute at Undo
 
         return bTest;
     }
@@ -1061,7 +1059,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
         return ;
 
     bool bOldAutoCalc = pDocument->GetAutoCalc();
-    pDocument->SetAutoCalc( false );    // Mehrfachberechnungen vermeiden
+    pDocument->SetAutoCalc( false );    // avoid recalculations
 
     SCSIZE nNewCount = maItems.size();
     bool bCountChanged = false;
@@ -1169,8 +1167,7 @@ void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, bool bKee
             nEndIndex = i;
             ++nBlockCount;
 
-            //  im Clipboard muessen interpretierte Zellen stehen, um andere Formate
-            //  (Text, Grafik...) erzueugen zu koennen
+            //  put interpreted cells in the clipboard in order to create other formats (text, graphics, ...)
 
             if ( maItems[i].pCell->GetCellType() == CELLTYPE_FORMULA )
             {
@@ -1338,8 +1335,8 @@ void ScColumn::CopyToColumn(
     if ( (nFlags & IDF_ATTRIB) != 0 )
     {
         if ( (nFlags & IDF_STYLES) != IDF_STYLES )
-        {   // StyleSheets im Zieldokument bleiben erhalten
-            // z.B. DIF und RTF Clipboard-Import
+        {   // keep the StyleSheets in the target document
+            // e.g. DIF and RTF Clipboard-Import
             for ( SCROW nRow = nRow1; nRow <= nRow2; nRow++ )
             {
                 const ScStyleSheet* pStyle =
@@ -1443,7 +1440,7 @@ void ScColumn::CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const
 
 void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol )
 {
-    //  Dies ist die Szenario-Tabelle, die Daten werden hineinkopiert
+    //  This is the scenario table, the data is copied into it
 
     ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW );
     SCROW nStart = -1, nEnd = -1;
@@ -1456,7 +1453,7 @@ void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol )
             ((ScColumn&)rSrcCol).
                 CopyToColumn( nStart, nEnd, IDF_CONTENTS, false, *this );
 
-            //  UpdateUsed nicht noetig, schon in TestCopyScenario passiert
+            //  UpdateUsed not needed, already done in TestCopyScenario (obsolete comment ?)
 
             SCsTAB nDz = nTab - rSrcCol.nTab;
             UpdateReference(URM_COPY, nCol, nStart, nTab,
@@ -1465,7 +1462,7 @@ void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol )
             UpdateCompile();
         }
 
-        //! CopyToColumn "const" machen !!!
+        //! make CopyToColumn "const" !!! (obsolete comment ?)
 
         pPattern = aAttrIter.Next( nStart, nEnd );
     }
@@ -1474,7 +1471,7 @@ void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol )
 
 void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
 {
-    //  Dies ist die Szenario-Tabelle, die Daten werden in die andere kopiert
+    //  This is the scenario table, the data is copied to the other
 
     ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW );
     SCROW nStart = -1, nEnd = -1;
@@ -1487,7 +1484,7 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
             ((ScColumn*)this)->
                 CopyToColumn( nStart, nEnd, IDF_CONTENTS, false, rDestCol );
 
-            //  UpdateUsed nicht noetig, schon in TestCopyScenario passiert
+            //  UpdateUsed not needed, is already done in TestCopyScenario (obsolete comment ?)
 
             SCsTAB nDz = rDestCol.nTab - nTab;
             rDestCol.UpdateReference(URM_COPY, rDestCol.nCol, nStart, rDestCol.nTab,
@@ -1496,7 +1493,7 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
             rDestCol.UpdateCompile();
         }
 
-        //! CopyToColumn "const" machen !!!
+        //! make CopyToColumn "const" !!! (obsolete comment ?)
 
         pPattern = aAttrIter.Next( nStart, nEnd );
     }
@@ -1550,7 +1547,7 @@ void ScColumn::SwapCol(ScColumn& rCol)
     rCol.pAttrArray = pAttrArray;
     pAttrArray = pTempAttr;
 
-    // AttrArray muss richtige Spaltennummer haben
+    // AttrArray needs to have the right column number
     pAttrArray->SetCol(nCol);
     rCol.pAttrArray->SetCol(rCol.nCol);
 
@@ -1652,7 +1649,7 @@ bool ScColumn::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
         ScRange aRange( ScAddress( nCol1, nRow1, nTab1 ),
                         ScAddress( nCol2, nRow2, nTab2 ) );
         if ( eUpdateRefMode == URM_COPY && nRow1 == nRow2 )
-        {   // z.B. eine einzelne Zelle aus dem Clipboard eingefuegt
+        {   // e.g. put a single cell in the clipboard
             SCSIZE nIndex;
             if ( Search( nRow1, nIndex ) )
             {
@@ -1724,7 +1721,7 @@ void ScColumn::UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
                 SCROW nRow = maItems[i].nRow;
                 ((ScFormulaCell*)pCell)->UpdateTranspose( rSource, rDest, pUndoDoc );
                 if ( nRow != maItems[i].nRow )
-                    Search( nRow, i );              // Listener geloescht/eingefuegt?
+                    Search( nRow, i );              // Listener deleted/inserted?
             }
         }
 }
@@ -1741,7 +1738,7 @@ void ScColumn::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY )
                 SCROW nRow = maItems[i].nRow;
                 ((ScFormulaCell*)pCell)->UpdateGrow( rArea, nGrowX, nGrowY );
                 if ( nRow != maItems[i].nRow )
-                    Search( nRow, i );              // Listener geloescht/eingefuegt?
+                    Search( nRow, i );              // Listener deleted/inserted?
             }
         }
 }
@@ -1844,7 +1841,7 @@ void ScColumn::UpdateDeleteTab(SCTAB nDelPos, bool bIsMove, ScColumn* pRefUndo,
 
                 bool bChanged = pOld->UpdateDeleteTab(nDelPos, bIsMove, nSheets);
                 if ( nRow != maItems[i].nRow )
-                    Search( nRow, i );      // Listener geloescht/eingefuegt?
+                    Search( nRow, i );      // Listener deleted/inserted?
 
                 if (pRefUndo)
                 {
@@ -1911,7 +1908,7 @@ void ScColumn::UpdateCompile( bool bForceIfNameInUse )
                 SCROW nRow = maItems[i].nRow;
                 p->UpdateCompile( bForceIfNameInUse );
                 if ( nRow != maItems[i].nRow )
-                    Search( nRow, i );      // Listener geloescht/eingefuegt?
+                    Search( nRow, i );      // Listener deleted/inserted?
             }
         }
 }
@@ -1953,9 +1950,9 @@ void ScColumn::SetDirtyVar()
 
 void ScColumn::SetDirty()
 {
-    // wird nur dokumentweit verwendet, kein FormulaTrack
+    // is only done documentwide, no FormulaTracking
     bool bOldAutoCalc = pDocument->GetAutoCalc();
-    pDocument->SetAutoCalc( false );    // Mehrfachberechnungen vermeiden
+    pDocument->SetAutoCalc( false );    // no multiple recalculation
     for (SCSIZE i=0; i<maItems.size(); i++)
     {
         ScFormulaCell* p = (ScFormulaCell*) maItems[i].pCell;
@@ -1971,11 +1968,11 @@ void ScColumn::SetDirty()
 
 
 void ScColumn::SetDirty( const ScRange& rRange )
-{   // broadcastet alles innerhalb eines Range, mit FormulaTrack
+{   // broadcasts everything within the range, with FormulaTracking
     if ( maItems.empty() )
         return ;
     bool bOldAutoCalc = pDocument->GetAutoCalc();
-    pDocument->SetAutoCalc( false );    // Mehrfachberechnungen vermeiden
+    pDocument->SetAutoCalc( false );    // no multiple recalculation
     SCROW nRow2 = rRange.aEnd.Row();
     ScAddress aPos( nCol, 0, nTab );
     ScHint aHint( SC_HINT_DATACHANGED, aPos, NULL );
@@ -2031,7 +2028,7 @@ void ScColumn::SetTableOpDirty( const ScRange& rRange )
 void ScColumn::SetDirtyAfterLoad()
 {
     bool bOldAutoCalc = pDocument->GetAutoCalc();
-    pDocument->SetAutoCalc( false );    // Mehrfachberechnungen vermeiden
+    pDocument->SetAutoCalc( false );    // no multiple recalculation
     for (SCSIZE i=0; i<maItems.size(); i++)
     {
         ScFormulaCell* p = (ScFormulaCell*) maItems[i].pCell;
@@ -2064,7 +2061,7 @@ void ScColumn::SetDirtyAfterLoad()
 void ScColumn::SetRelNameDirty()
 {
     bool bOldAutoCalc = pDocument->GetAutoCalc();
-    pDocument->SetAutoCalc( false );    // Mehrfachberechnungen vermeiden
+    pDocument->SetAutoCalc( false );    // no multiple recalculation
     for (SCSIZE i=0; i<maItems.size(); i++)
     {
         ScFormulaCell* p = (ScFormulaCell*) maItems[i].pCell;
@@ -2084,7 +2081,7 @@ void ScColumn::CalcAll()
             if (pCell->GetCellType() == CELLTYPE_FORMULA)
             {
 #if OSL_DEBUG_LEVEL > 1
-                // nach F9 ctrl-F9: ueberprueft die Berechnung per FormulaTree
+                // after F9 ctrl-F9: check the calculation for each FormulaTree
                 ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
                 double nOldVal, nNewVal;
                 nOldVal = pFCell->GetValue();
@@ -2111,13 +2108,13 @@ void ScColumn::CompileAll()
             if ( pCell->GetCellType() == CELLTYPE_FORMULA )
             {
                 SCROW nRow = maItems[i].nRow;
-                // fuer unbedingtes kompilieren
-                // bCompile=true und pCode->nError=0
+                // for unconditional compilation
+                // bCompile=true and pCode->nError=0
                 ((ScFormulaCell*)pCell)->GetCode()->SetCodeError( 0 );
                 ((ScFormulaCell*)pCell)->SetCompile( true );
                 ((ScFormulaCell*)pCell)->CompileTokenArray();
                 if ( nRow != maItems[i].nRow )
-                    Search( nRow, i );      // Listener geloescht/eingefuegt?
+                    Search( nRow, i );      // Listener deleted/inserted?
             }
         }
 }
@@ -2134,7 +2131,7 @@ void ScColumn::CompileXML( ScProgress& rProgress )
                 SCROW nRow = maItems[i].nRow;
                 ((ScFormulaCell*)pCell)->CompileXML( rProgress );
                 if ( nRow != maItems[i].nRow )
-                    Search( nRow, i );      // Listener geloescht/eingefuegt?
+                    Search( nRow, i );      // Listener deleted/inserted?
             }
         }
 }


More information about the Libreoffice-commits mailing list