[PATCH] Translate German comments, fix some ws

Philipp Weissenbacher (via Code Review) gerrit at gerrit.libreoffice.org
Tue Jan 22 15:44:26 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1817

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/17/1817/1

Translate German comments, fix some ws

Change-Id: I962077a8c7d533c7eaf6d5ba68ec18966e5760a1
---
M sc/source/core/data/cell.cxx
M sc/source/core/data/cell2.cxx
2 files changed, 56 insertions(+), 75 deletions(-)



diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index ce073e2..e734d88 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -1143,25 +1143,18 @@
             pDocument->AddSubTotalCell(this);
     }
 
-    // irgendwie koennen unter os/2 mit rotter FPU-Exception /0 ohne Err503 gespeichert
-    // werden, woraufhin spaeter im NumberFormatter die BLC Lib bei einem fabs(-NAN) abstuerzt
-    //(#32739#) hier fuer alle Systeme ausbuegeln, damit da auch Err503 steht
-
-    // somehow we can under os / 2 store without Err503 with rotter FPU / 0, followed later
-    // in the BLC Lib NumberFormatter a fabs (NAN) is crashing (# 32739 #) iron out here for all
-    // the systems, so there is also Err503
-
+    // On OS/2 with broken FPU exception, we can somehow store /0 without Err503. Later on in
+    // the BLC Lib NumberFormatter crashes when doing a fabs (NAN) (# 32739 #).
+    // We iron this out here for all systems, such that we also have an Err503 here.
     if ( aResult.IsValue() && !::rtl::math::isFinite( aResult.GetDouble() ) )
     {
-        OSL_FAIL("Formelzelle INFINITY !!! Woher kommt das Dokument?");
+        OSL_FAIL("Formula cell INFINITY!!! Where does this document come from?");
         aResult.SetResultError( errIllegalFPOperation );
         bDirty = true;
     }
-    // DoubleRefs bei binaeren Operatoren waren vor v5.0 immer Matrix,
-    // jetzt nur noch wenn in Matrixformel, sonst implizite Schnittmenge
 
-    // Double Refs in binary operators were always in front of Matrix v5.0, now only when in an
-    // array formula, otherwise an implicit intersection
+    // DoubleRefs for binary operators were always a Matrix before version v5.0.
+    // Now this is only the case when when in an array formula, otherwise it's an implicit intersection
     if ( pDocument->GetSrcVersion() < SC_MATRIX_DOUBLEREF &&
             GetMatrixFlag() == MM_NONE && pCode->HasMatrixDoubleRefOps() )
     {
@@ -1169,9 +1162,8 @@
         SetMatColsRows( 1, 1);
     }
 
-    // Must the cells be calculated? After Load cells can contain an error code, and then start
-    // the listener and ggbf. Recalculate if not RECALCMODE_NORMAL
-
+    // Do the cells need to be calculated? After Load cells can contain an error code, and then start
+    // the listener and Recalculate (if needed) if not RECALCMODE_NORMAL
     if( !bNewCompiled || !pCode->GetCodeError() )
     {
         StartListeningTo( pDocument );
@@ -1179,16 +1171,11 @@
             bDirty = true;
     }
     if ( pCode->IsRecalcModeAlways() )
-    {   // zufall(), heute(), jetzt() bleiben immer im FormulaTree, damit sie
-        // auch bei jedem F9 berechnet werden.
-
-        // accident(), today(), now() always stay in the FormulaTree, so that they
-        // can also be calculated for each F9.
+    {   // random(), today(), now() always stay in the FormulaTree, so that they are calculated
+        // for each F9
         bDirty = true;
     }
-    // Noch kein SetDirty weil noch nicht alle Listener bekannt, erst in
-    // SetDirtyAfterLoad.
-    // Still no SetDirty because all Listeners are not know, first in SetDirtyAfterLoad.
+    // No SetDirty yet, as no all Listeners are known yet (only in SetDirtyAfterLoad)
 }
 
 
@@ -1204,12 +1191,8 @@
         return;     // no double/triple processing
 
     //! HACK:
-    //  Wenn der Aufruf aus einem Reschedule im DdeLink-Update kommt, dirty stehenlassen
-    //  Besser: Dde-Link Update ohne Reschedule oder ganz asynchron !!!
-
-    //  If the call comes from a Reschedule in the DdeLink-Update, dirty let stand
-    //  Better: Dde-Link Update without Reschdule or completely asynchronously !!!
-
+    //  If the call originates from a Reschedule in DdeLink update, leave dirty
+    //  Better: Do a Dde Link Update without Reschedule or do it completely asynchronously!
     if ( pDocument->IsInDdeLinkUpdate() )
         return;
 
@@ -1551,7 +1534,7 @@
                      p->GetStringResult() == aResult.GetString()))
             {
                 // A convergence in the first iteration doesn't necessarily
-                // mean that it's done, it may be because not all related cells
+                // mean that it's done, it may be as not all related cells
                 // of a circle changed their values yet. If the set really
                 // converges it will do so also during the next iteration. This
                 // fixes situations like of #i44115#. If this wasn't wanted an
@@ -1592,7 +1575,6 @@
         {
             // #i102616# Compare anyway if the sheet is still marked unchanged for single-sheet saving
             // Also handle special cases of initial results after loading.
-
             if ( !bContentChanged && pDocument->IsStreamValid(aPos.Tab()) )
             {
                 ScFormulaResult aNewResult( p->GetResultToken().get());
@@ -1691,7 +1673,7 @@
         if ( !pCode->IsRecalcModeAlways() )
             pDocument->RemoveFromFormulaTree( this );
 
-    //  FORCED cells also immediately tested for validity (start macro possibly)
+        //  FORCED cells also immediately tested for validity (start macro possibly)
 
         if ( pCode->IsRecalcModeForced() )
         {
@@ -1705,7 +1687,7 @@
             }
         }
 
-        // Reschedule verlangsamt das ganze erheblich, nur bei Prozentaenderung ausfuehren
+        // Reschedule slows the whole thing down considerably, thus only execute on percent change
         ScProgress::GetInterpretProgress()->SetStateCountDownOnPercent(
             pDocument->GetFormulaCodeInTree()/MIN_NO_CODES_PER_PROGRESS_UPDATE );
 
@@ -1741,7 +1723,7 @@
     }
     else
     {
-    //  Cells with compiler errors should not be marked dirty forever
+        // Cells with compiler errors should not be marked dirty forever
         OSL_ENSURE( pCode->GetCodeError(), "no UPN-Code und no errors ?!?!" );
         bDirty = false;
         bTableOpDirty = false;
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index c43f0c1..271933d 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -990,10 +990,9 @@
                 }
             }
             else if ( eUpdateRefMode == URM_MOVE )
-            {   // bei Move/D&D neu kompilieren wenn ColRowName verschoben wurde
-                // oder diese Zelle auf einen zeigt und verschoben wurde
-                // During Move/D&D was recompiled, when ColRowName had been delayed
-                bColRowNameCompile = bCompile;      // evtl. aus Copy-ctor
+            {   // Recomplie for Move/D&D when ColRowName was moved or this Cell
+                // points to one and was moved.
+                bColRowNameCompile = bCompile;      // Possibly from Copy ctor
                 if ( !bColRowNameCompile )
                 {
                     bool bMoved = (aPos != aOldPos);
@@ -1047,7 +1046,7 @@
         }
 
         bool bNeedDirty = false;
-        // NeedDirty bei Aenderungen ausser Copy und Move/Insert ohne RelNames
+        // NeedDirty for changes except for Copy and Move/Insert without RelNames
         if ( bRangeModified || pRangeData || bColRowNameCompile ||
                 (bValChanged && eUpdateRefMode != URM_COPY &&
                  (eUpdateRefMode != URM_MOVE || bHasRelName) &&
@@ -1058,10 +1057,10 @@
             bNeedDirty = false;
         if (pUndoDoc && (bValChanged || pRangeData || bOnRefMove))
         {
-            //  Copy the cell to aUndoPos, which is its current position in the document,
-            //  so this works when UpdateReference is called before moving the cells
-            //  (InsertCells/DeleteCells - aPos is changed above) as well as when UpdateReference
-            //  is called after moving the cells (MoveBlock/PasteFromClip - aOldPos is changed).
+            // Copy the cell to aUndoPos, which is its current position in the document,
+            // so this works when UpdateReference is called before moving the cells
+            // (InsertCells/DeleteCells - aPos is changed above) as well as when UpdateReference
+            // is called after moving the cells (MoveBlock/PasteFromClip - aOldPos is changed).
 
             // If there is already a formula cell in the undo document, don't overwrite it,
             // the first (oldest) is the important cell.
@@ -1111,9 +1110,9 @@
             }
         }
         if ( bNeedDirty && (!(eUpdateRefMode == URM_INSDEL && bHasRelName) || pRangeData) )
-        {   // Referenzen abgeschnitten, ungueltig o.ae.?
+        {   // Cut off references, invalid or similar?
             bool bOldAutoCalc = pDocument->GetAutoCalc();
-            // no Interpret in SubMinimalRecalc because of evntual wrong reference
+            // No Interpret in SubMinimalRecalc because of eventual wrong reference
             pDocument->SetAutoCalc( false );
             SetDirty();
             pDocument->SetAutoCalc( bOldAutoCalc );
@@ -1131,15 +1130,15 @@
     if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() )
     {
         EndListeningTo( pDocument );
-        // IncTab _nach_ EndListeningTo und _vor_ Compiler UpdateInsertTab !
+        // IncTab _after_ EndListeningTo and _before_ Compiler UpdateInsertTab!
         if ( bPosChanged )
             aPos.IncTab(nNewSheets);
         ScRangeData* pRangeData;
         ScCompiler aComp(pDocument, aPos, *pCode);
         aComp.SetGrammar(pDocument->GetGrammar());
         pRangeData = aComp.UpdateInsertTab( nTable, false, nNewSheets );
-        if (pRangeData)                     // Shared Formula against real Formula
-        {                                   // exchange
+        if (pRangeData) // Exchange Shared Formula with real Formula
+        {
             bool bRefChanged;
             pDocument->RemoveFromFormulaTree( this );   // update formula count
             delete pCode;
@@ -1167,15 +1166,15 @@
     if( pCode->GetNextReferenceRPN() && !pDocument->IsClipOrUndo() )
     {
         EndListeningTo( pDocument );
-        // IncTab _after_ EndListeningTo und _before_ Compiler UpdateDeleteTab !
+        // IncTab _after_ EndListeningTo und _before_ Compiler UpdateDeleteTab!
         if ( bPosChanged )
             aPos.IncTab(-1*nSheets);
         ScRangeData* pRangeData;
         ScCompiler aComp(pDocument, aPos, *pCode);
         aComp.SetGrammar(pDocument->GetGrammar());
         pRangeData = aComp.UpdateDeleteTab(nTable, bIsMove, false, bRefChanged, nSheets);
-        if (pRangeData)                     // Shared Formula against real Formula
-        {                                   // exchange
+        if (pRangeData) // Exchange Shared Formula with real Formula
+        {
             pDocument->RemoveFromFormulaTree( this );   // update formula count
             delete pCode;
             pCode = pRangeData->GetCode()->Clone();
@@ -1187,7 +1186,7 @@
             // If the shared formula contained a named range/formula containing
             // an absolute reference to a sheet, those have to be readjusted.
             aComp2.UpdateInsertTab( nTable,true, nSheets );
-            // bRefChanged kann beim letzten UpdateDeleteTab zurueckgesetzt worden sein
+            // bRefChanged could have been reset at the last UpdateDeleteTab
             bRefChanged = true;
             bCompile = true;
         }
@@ -1211,8 +1210,8 @@
         ScCompiler aComp(pDocument, aPos, *pCode);
         aComp.SetGrammar(pDocument->GetGrammar());
         pRangeData = aComp.UpdateMoveTab( nOldPos, nNewPos, false );
-        if (pRangeData)                     // Shared Formula gegen echte Formel
-        {                                   // exchange
+        if (pRangeData) // Exchange Shared Formula with real Formula
+        {
             pDocument->RemoveFromFormulaTree( this );   // update formula count
             delete pCode;
             pCode = pRangeData->GetCode()->Clone();
@@ -1294,7 +1293,7 @@
     CompileTokenArray();
 }
 
-//  Reference transposition is only called in Clipboard Document
+// Reference transposition is only called in Clipboard Document
 void ScFormulaCell::TransposeReference()
 {
     bool bFound = false;
@@ -1337,7 +1336,7 @@
     EndListeningTo( pDocument );
 
     ScAddress aOldPos = aPos;
-    bool bPosChanged = false;           // If this cell has been moved
+    bool bPosChanged = false; // Whether this cell has been moved
 
     ScRange aDestRange( rDest, ScAddress(
                 static_cast<SCCOL>(rDest.Col() + rSource.aEnd.Row() - rSource.aStart.Row()),
@@ -1345,7 +1344,7 @@
                 rDest.Tab() + rSource.aEnd.Tab() - rSource.aStart.Tab() ) );
     if ( aDestRange.In( aOldPos ) )
     {
-        //  Count back Positions
+        // Count back Positions
         SCsCOL nRelPosX = aOldPos.Col();
         SCsROW nRelPosY = aOldPos.Row();
         SCsTAB nRelPosZ = aOldPos.Tab();
@@ -1377,7 +1376,7 @@
         {
             t->CalcAbsIfRel( aOldPos );
             bool bMod;
-            {   // own scope for SingleDoubleRefModifier dtor if SingleRef
+            {   // Own scope for SingleDoubleRefModifier dtor if SingleRef
                 SingleDoubleRefModifier aMod( *t );
                 ScComplexRefData& rRef = aMod.Ref();
                 bMod = (ScRefUpdate::UpdateTranspose( pDocument, rSource,
@@ -1391,9 +1390,9 @@
         }
     }
 
-    if (pShared)            // Shared Formula against real Formula exchange
+    if (pShared) // Exchange Shared Formula with real Formula
     {
-        pDocument->RemoveFromFormulaTree( this );   // update formula count
+        pDocument->RemoveFromFormulaTree( this ); // update formula count
         delete pCode;
         pCode = new ScTokenArray( *pShared->GetCode() );
         bRefChanged = true;
@@ -1404,7 +1403,7 @@
             {
                 t->CalcAbsIfRel( aOldPos );
                 bool bMod;
-                {   // own scope for SingleDoubleRefModifier dtor if SingleRef
+                {   // Own scope for SingleDoubleRefModifier dtor if SingleRef
                     SingleDoubleRefModifier aMod( *t );
                     ScComplexRefData& rRef = aMod.Ref();
                     bMod = (ScRefUpdate::UpdateTranspose( pDocument, rSource,
@@ -1427,11 +1426,11 @@
         }
 
         bCompile = true;
-        CompileTokenArray();                // also call StartListeningTo
+        CompileTokenArray(); // also call StartListeningTo
         SetDirty();
     }
     else
-        StartListeningTo( pDocument );      // Listener as previous
+        StartListeningTo( pDocument ); // Listener as previous
 
     delete pOld;
 }
@@ -1462,7 +1461,7 @@
         {
             t->CalcAbsIfRel( aPos );
             bool bMod;
-            {   // own scope for SingleDoubleRefModifier dtor if SingleRef
+            {   // Own scope for SingleDoubleRefModifier dtor if SingleRef
                 SingleDoubleRefModifier aMod( *t );
                 ScComplexRefData& rRef = aMod.Ref();
                 bMod = (ScRefUpdate::UpdateGrow( rArea,nGrowX,nGrowY,
@@ -1476,9 +1475,9 @@
         }
     }
 
-    if (pShared)            // Shared Formula gegen echte Formel austauschen
+    if (pShared) // Exchange Shared Formula with real Formula
     {
-        pDocument->RemoveFromFormulaTree( this );   // update formula count
+        pDocument->RemoveFromFormulaTree( this ); // Update formula count
         delete pCode;
         pCode = new ScTokenArray( *pShared->GetCode() );
         bRefChanged = true;
@@ -1489,7 +1488,7 @@
             {
                 t->CalcAbsIfRel( aPos );
                 bool bMod;
-                {   // own scope for SingleDoubleRefModifier dtor if SingleRef
+                {   // Own scope for SingleDoubleRefModifier dtor if SingleRef
                     SingleDoubleRefModifier aMod( *t );
                     ScComplexRefData& rRef = aMod.Ref();
                     bMod = (ScRefUpdate::UpdateGrow( rArea,nGrowX,nGrowY,
@@ -1504,11 +1503,11 @@
     if (bRefChanged)
     {
         bCompile = true;
-        CompileTokenArray();                // also call StartListeningTo
+        CompileTokenArray(); // Also call StartListeningTo
         SetDirty();
     }
     else
-        StartListeningTo( pDocument );      // Listener as previous
+        StartListeningTo( pDocument ); // Listener as previous
 }
 
 static void lcl_FindRangeNamesInUse(std::set<sal_uInt16>& rIndexes, ScTokenArray* pCode, ScRangeName* pNames)
@@ -1559,7 +1558,7 @@
 
 void ScFormulaCell::CompileDBFormula( bool bCreateFormulaString )
 {
-    // two phases must be called after each other
+    // Two phases must be called after each other
     // 1. Formula String with old generated names
     // 2. Formula String with new generated names
     if ( bCreateFormulaString )
@@ -1570,14 +1569,14 @@
         {
             switch ( p->GetOpCode() )
             {
-                case ocBad:             // DB-Area eventually goes bad
+                case ocBad:             // DB Area eventually goes bad
                 case ocColRowName:      // in case of the same names
-                case ocDBArea:          // DB-Area
+                case ocDBArea:          // DB Area
                     bRecompile = true;
                 break;
                 case ocName:
                     if ( p->GetIndex() >= SC_START_INDEX_DB_COLL )
-                        bRecompile = true;  // DB-Area
+                        bRecompile = true;  // DB Area
                 break;
                 default:
                     ; // nothing
@@ -1610,7 +1609,7 @@
 
 void ScFormulaCell::CompileNameFormula( bool bCreateFormulaString )
 {
-    // two phases must be called after each other
+    // Two phases must be called after each other
     // 1. Formula String with old generated names
     // 2. Formula String with new generated names
     if ( bCreateFormulaString )

-- 
To view, visit https://gerrit.libreoffice.org/1817
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I962077a8c7d533c7eaf6d5ba68ec18966e5760a1
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Philipp Weissenbacher <p.weissenbacher at gmail.com>



More information about the LibreOffice mailing list