[Libreoffice-commits] .: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Aug 24 16:28:56 PDT 2012


 sc/source/ui/undo/refundo.cxx  |    2 -
 sc/source/ui/undo/undobase.cxx |   14 ++++++------
 sc/source/ui/undo/undoblk.cxx  |   45 +++++++++++++++++++----------------------
 sc/source/ui/undo/undoblk2.cxx |    4 +--
 sc/source/ui/undo/undoblk3.cxx |   30 +++++++++++++--------------
 sc/source/ui/undo/undocell.cxx |    7 ++----
 sc/source/ui/undo/undodat.cxx  |   29 ++++++++++++--------------
 sc/source/ui/undo/undodraw.cxx |    2 -
 sc/source/ui/undo/undotab.cxx  |   18 ++++++++--------
 9 files changed, 73 insertions(+), 78 deletions(-)

New commits:
commit 98e9cc1796f93447fe7e5c1a6e2683d10389b01c
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date:   Sat Aug 25 01:24:58 2012 +0200

    fdo#39468: Translated German comments in sc/source/ui/undo
    
    Eike and I reviewed the patch at the same time. However, he was was
    faster ;-) Consequently, with this commit I include the fixes for
    my remarks previously done in Gerrit as well as for Eike's comments.
    
    This is a follow-up patch of 06f611210cf487dcd32aa7ccfaae5ed80124e439.
    
    Change-Id: I6ee721f15852e1023c8b3e4f0b580435ee52c0c6

diff --git a/sc/source/ui/undo/refundo.cxx b/sc/source/ui/undo/refundo.cxx
index 1ee75d5..dbcc2e1 100644
--- a/sc/source/ui/undo/refundo.cxx
+++ b/sc/source/ui/undo/refundo.cxx
@@ -54,7 +54,7 @@ ScRefUndoData::ScRefUndoData( const ScDocument* pDoc ) :
 
     pPrintRanges = pDoc->CreatePrintRangeSaver();       // recreated
 
-    //! for Pivot, just mark the range ???
+    // when handling Pivot solely keep the range?
 
     ScDPCollection* pOldDP = ((ScDocument*)pDoc)->GetDPCollection();        //! const
     pDPCollection = pOldDP ? new ScDPCollection(*pOldDP) : NULL;
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 0ebd77f..b6c3583 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -77,17 +77,17 @@ bool ScSimpleUndo::SetViewMarkData( const ScMarkData& rMarkData )
 
 sal_Bool ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
 {
-    // A SdrUndoGroup for the updating of detective arrows can belong
+    // A SdrUndoGroup for updating detective arrows can belong
     // to each Undo-Action.
     // DetectiveRefresh is always called next,
-    // the SdrUndoGroup is packaged in a ScUndoDraw action.
+    // the SdrUndoGroup is encapsulated in a ScUndoDraw action.
     // AddUndoAction is only called with bTryMerg=sal_True
     // for automatic update.
 
     if ( !pDetectiveUndo && pNextAction->ISA(ScUndoDraw) )
     {
-        // SdrUndoAction is aquired from ScUndoDraw Action,
-        // ScUndoDraw is then deleted by the UndoManager
+        // Take SdrUndoAction from ScUndoDraw Action,
+        // ScUndoDraw is later deleted by the UndoManager
 
         ScUndoDraw* pCalcUndo = (ScUndoDraw*)pNextAction;
         pDetectiveUndo = pCalcUndo->GetDrawUndo();
@@ -168,7 +168,7 @@ void ScSimpleUndo::ShowTable( const ScRange& rRange )
         SCTAB nStart = rRange.aStart.Tab();
         SCTAB nEnd   = rRange.aEnd.Tab();
         SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
-        if ( nTab < nStart || nTab > nEnd )                     // when not in range:
+        if ( nTab < nStart || nTab > nEnd )                     // if not in range:
             pViewShell->SetTabNo( nStart );                     // at beginning of the range
     }
 }
@@ -270,7 +270,7 @@ void ScBlockUndo::ShowBlock()
         aRange.aEnd.SetTab( nTab );
         pViewShell->MarkRange( aRange );
 
-        // not through SetMarkArea to Mark Data, due to possible lacking paint
+        // not through SetMarkArea to MarkData, due to possibly lacking paint
     }
 }
 
@@ -415,7 +415,7 @@ void ScMoveUndo::UndoRef()
         pRefUndoData->DoUndo( pDoc, (eMode == SC_UNDO_REFFIRST) );
         // HACK: ScDragDropUndo is the only one with REFFIRST.
         // If not, results possibly in a too frequent adjustment
-        // of ChartRefs not that pretty, but not too bad either..
+        // of ChartRefs. Not that pretty, but not too bad either..
 }
 
 void ScMoveUndo::BeginUndo()
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 1b833d0..dbc36c3 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -80,8 +80,8 @@ TYPEINIT1(ScUndoBorder,             ScBlockUndo);
 
 
 
-// To Do:
-/*A*/   // SetOptimalHeight on Document, when no View
+// TODO:
+/*A*/   // SetOptimalHeight on Document, if no View
 /*B*/   // linked sheets
 /*C*/   // ScArea
 //?     // check later
@@ -226,7 +226,7 @@ void ScUndoInsertCells::DoChange( const sal_Bool bUndo )
         }
     }
 
-//? Undo for deferred attributes?
+    // Undo for displaced attributes?
 
     sal_uInt16 nPaint = PAINT_GRID;
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -382,7 +382,6 @@ void ScUndoDeleteCells::DoChange( const sal_Bool bUndo )
     else
         SetChangeTrack();
 
-    // Perform it
     switch (eCmd)
     {
         case DEL_DELROWS:
@@ -415,7 +414,7 @@ void ScUndoDeleteCells::DoChange( const sal_Bool bUndo )
         }
     }
 
-    // restore for Undo references
+    // if Undo, restore references
     for( i=0; i<nCount && bUndo; i++ )
     {
         pRefUndoDoc->CopyToDocument( aEffRange.aStart.Col(), aEffRange.aStart.Row(), pTabs[i], aEffRange.aEnd.Col(), aEffRange.aEnd.Row(), pTabs[i]+pScenarios[i],
@@ -500,7 +499,7 @@ void ScUndoDeleteCells::DoChange( const sal_Bool bUndo )
         pDocShell->PostPaint( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), pTabs[i],
             aWorkRange.aEnd.Col(), aWorkRange.aEnd.Row(), pTabs[i]+pScenarios[i], nPaint, SC_PF_LINES );
     }
-    // Selection only after EndUndo
+    // Selection not until EndUndo
 
     pDocShell->PostDataChanged();
     //  CellContentChanged comes with the selection
@@ -508,13 +507,13 @@ void ScUndoDeleteCells::DoChange( const sal_Bool bUndo )
 
 void ScUndoDeleteCells::Undo()
 {
-    WaitObject aWait( pDocShell->GetActiveDialogParent() );     // important due to TrackFormulas in UpdateReference
+    WaitObject aWait( pDocShell->GetActiveDialogParent() );     // important because of TrackFormulas in UpdateReference
     BeginUndo();
     DoChange( sal_True );
     EndUndo();
     SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
 
-    // Selection only after EndUndo
+    // Selection not until EndUndo
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
     if (pViewShell)
     {
@@ -527,7 +526,7 @@ void ScUndoDeleteCells::Undo()
 
 void ScUndoDeleteCells::Redo()
 {
-    WaitObject aWait( pDocShell->GetActiveDialogParent() );     // important due to TrackFormulas in UpdateReference
+    WaitObject aWait( pDocShell->GetActiveDialogParent() );     // important because of TrackFormulas in UpdateReference
     BeginRedo();
     DoChange( false);
     EndRedo();
@@ -549,7 +548,7 @@ sal_Bool ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
     return (rTarget.ISA(ScTabViewTarget));
 }
 
-
+// delete cells in multiselection
 ScUndoDeleteMulti::ScUndoDeleteMulti( ScDocShell* pNewDocShell,
                                         sal_Bool bNewRows, sal_Bool bNeedsRefresh, SCTAB nNewTab,
                                         const SCCOLROW* pRng, SCCOLROW nRngCnt,
@@ -572,7 +571,7 @@ ScUndoDeleteMulti::~ScUndoDeleteMulti()
 
 rtl::OUString ScUndoDeleteMulti::GetComment() const
 {
-    return ScGlobal::GetRscString( STR_UNDO_DELETECELLS );  // as DeleteCells
+    return ScGlobal::GetRscString( STR_UNDO_DELETECELLS );  // like DeleteCells
 }
 
 void ScUndoDeleteMulti::DoChange() const
@@ -649,7 +648,7 @@ void ScUndoDeleteMulti::SetChangeTrack()
 
 void ScUndoDeleteMulti::Undo()
 {
-    WaitObject aWait( pDocShell->GetActiveDialogParent() );     // important due to TrackFormulas in UpdateReference
+    WaitObject aWait( pDocShell->GetActiveDialogParent() );     // important because of TrackFormulas in UpdateReference
     BeginUndo();
 
     ScDocument* pDoc = pDocShell->GetDocument();
@@ -695,7 +694,7 @@ void ScUndoDeleteMulti::Undo()
 
 void ScUndoDeleteMulti::Redo()
 {
-    WaitObject aWait( pDocShell->GetActiveDialogParent() );     // important due to TrackFormulas in UpdateReference
+    WaitObject aWait( pDocShell->GetActiveDialogParent() );     // important because of TrackFormulas in UpdateReference
     BeginRedo();
 
     ScDocument* pDoc = pDocShell->GetDocument();
@@ -722,7 +721,7 @@ void ScUndoDeleteMulti::Redo()
 
 void ScUndoDeleteMulti::Repeat(SfxRepeatTarget& rTarget)
 {
-    //  delete cell if single selection
+    // if single selection
     if (rTarget.ISA(ScTabViewTarget))
         ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( DEL_DELROWS, sal_True );
 }
@@ -772,7 +771,7 @@ void ScUndoCut::DoChange( const sal_Bool bUndo )
     // do not undo/redo objects and note captions, they are handled via drawing undo
     sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
 
-    if (bUndo)  // nonly for Undo
+    if (bUndo)  // only for Undo
     {
         //  all sheets - CopyToDocument skips those that don't exist in pUndoDoc
         SCTAB nTabCount = pDoc->GetTableCount();
@@ -897,7 +896,7 @@ void ScUndoPaste::DoChange(bool bUndo)
 
     ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
 
-    // Always back-up all or none of the content for Undo
+    // Always back-up either all or none of the content for Undo
     sal_uInt16 nUndoFlags = IDF_NONE;
     if (nFlags & IDF_CONTENTS)
         nUndoFlags |= IDF_CONTENTS;
@@ -1189,7 +1188,7 @@ void ScUndoDragDrop::PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const
 
     if ( bKeepScenarioFlags )
     {
-        //  Copy scenario -> also paint scenario file
+        //  Copy scenario -> also paint scenario boarder
         aRange.aStart.SetCol(0);
         aRange.aStart.SetRow(0);
         aRange.aEnd.SetCol(MAXCOL);
@@ -1220,7 +1219,7 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) const
     if ( pChangeTrack )
         pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
 
-//? Database range  before data, so that the Autofilter button match up in ExtendMerge
+    // Database range before data, so that the Autofilter button match up in ExtendMerge
 
     ScRange aPaintRange = aRange;
     pDoc->ExtendMerge( aPaintRange );           // before deleting
@@ -1465,7 +1464,7 @@ void ScUndoUseScenario::Undo()
         pDoc->SetScenarioData( i, aComment, aColor, nScenFlags );
         sal_Bool bActive = pUndoDoc->IsActiveScenario( i );
         pDoc->SetActiveScenario( i, bActive );
-        //  For copy-back scenario also content
+        //  For copy-back scenario also consider content
         if ( nScenFlags & SC_SCENARIO_TWOWAY )
         {
             pDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, i, IDF_ALL );
@@ -1913,7 +1912,7 @@ sal_Bool ScUndoClearItems::CanRepeat(SfxRepeatTarget& rTarget) const
     return (rTarget.ISA(ScTabViewTarget));
 }
 
-
+// remove all line breaks of a table
 ScUndoRemoveBreaks::ScUndoRemoveBreaks( ScDocShell* pNewDocShell,
                                     SCTAB nNewTab, ScDocument* pNewUndoDoc ) :
     ScSimpleUndo( pNewDocShell ),
@@ -2047,8 +2046,6 @@ void ScUndoRemoveMerge::Redo()
         // There is no need to extend merge area because it's already been extended.
         ScRange aRange = maOption.getSingleRange(nTab);
 
-        // execute it
-
         const SfxPoolItem& rDefAttr = pDoc->GetPool()->GetDefaultItem( ATTR_MERGE );
         ScPatternAttr aPattern( pDoc->GetPool() );
         aPattern.GetItemSet().Put( rDefAttr );
@@ -2157,7 +2154,7 @@ void ScUndoBorder::Redo()
 {
     BeginRedo();
 
-    ScDocument* pDoc = pDocShell->GetDocument();        //! Function to call docfunc
+    ScDocument* pDoc = pDocShell->GetDocument();        // call function at docfunc
     size_t nCount = pRanges->size();
     for (size_t i = 0; i < nCount; ++i )
     {
@@ -2178,7 +2175,7 @@ void ScUndoBorder::Redo()
 
 void ScUndoBorder::Repeat(SfxRepeatTarget& /* rTarget */)
 {
-    //! later (when the function has moved from cellsuno to docfunc)
+    //TODO later (when the function has moved from cellsuno to docfunc)
 }
 
 sal_Bool ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index 4473b2a..e5380d0 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -37,7 +37,7 @@
 #include "global.hxx"
 #include "target.hxx"
 
-#include "undoolk.hxx"              //! shift GetUndo in the Document
+#include "undoolk.hxx"              // TODO move GetUndo in Document
 
 
 // STATIC DATA -----------------------------------------------------------
@@ -165,7 +165,7 @@ void ScUndoWidthOrHeight::Redo()
         if ( nTab < nStartTab || nTab > nEndTab )
             pViewShell->SetTabNo( nStartTab );
 
-        // SetWidthOrHeigt changes current sheet !
+        // SetWidthOrHeight changes current sheet!
         pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, false, true, &aMarkData );
     }
 
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 87fa1f4..5457c7c 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -76,8 +76,7 @@ TYPEINIT1(ScUndoInsertAreaLink,     SfxUndoAction);
 TYPEINIT1(ScUndoRemoveAreaLink,     SfxUndoAction);
 TYPEINIT1(ScUndoUpdateAreaLink,     SfxUndoAction);
 
-
-// To Do:
+// TODO:
 /*A*/   // SetOptimalHeight on Document, when no View
 
 
@@ -94,13 +93,13 @@ ScUndoDeleteContents::ScUndoDeleteContents(
         pUndoDoc    ( pNewUndoDoc ),
         pDrawUndo   ( NULL ),
         nFlags      ( nNewFlags ),
-        bMulti      ( bNewMulti )   // over liquid
+        bMulti      ( bNewMulti )   // unnecessary
 {
     if (bObjects)
         pDrawUndo = GetSdrUndoAction( pDocShell->GetDocument() );
 
-    if ( !(aMarkData.IsMarked() || aMarkData.IsMultiMarked()) )     // no cell selected:
-        aMarkData.SetMarkArea( aRange );                            // cell under cursor is selected
+    if ( !(aMarkData.IsMarked() || aMarkData.IsMultiMarked()) )     // if no cell is selected:
+        aMarkData.SetMarkArea( aRange );                            // select cell under cursor
 
     SetChangeTrack();
 }
@@ -146,13 +145,13 @@ void ScUndoDeleteContents::DoChange( const sal_Bool bUndo )
 
     if (bUndo)  // only Undo
     {
-        sal_uInt16 nUndoFlags = IDF_NONE; // either copy all or none of the content
+        sal_uInt16 nUndoFlags = IDF_NONE; // copy either all or none of the content
         if (nFlags & IDF_CONTENTS)        // (Only the correct ones have been copied into UndoDoc)
             nUndoFlags |= IDF_CONTENTS;
         if (nFlags & IDF_ATTRIB)
             nUndoFlags |= IDF_ATTRIB;
         if (nFlags & IDF_EDITATTR)          // Edit-Engine attribute
-            nUndoFlags |= IDF_STRING;       // -> Cells are being changed
+            nUndoFlags |= IDF_STRING;       // -> Cells will be changed
         // do not create clones of note captions, they will be restored via drawing undo
         nUndoFlags |= IDF_NOCAPTIONS;
 
@@ -369,7 +368,7 @@ void ScUndoFillTable::DoChange( const sal_Bool bUndo )
         if ( !aMarkData.GetTableSelect(nTab) )
             pViewShell->SetTabNo( nSrcTab );
 
-        pViewShell->DoneBlockMode();    // causes problems oterwise since selection is on the wrong sheet.
+        pViewShell->DoneBlockMode();    // causes problems otherwise since selection is on the wrong sheet.
     }
 }
 
@@ -997,7 +996,7 @@ void ScUndoAutoFormat::Redo()
             nPPTY = ScGlobal::nScreenPPTY;
         }
 
-        sal_Bool bFormula = false;  //! set
+        sal_Bool bFormula = false;  // remember
 
         for (SCTAB nTab=nStartZ; nTab<=nEndZ; nTab++)
         {
@@ -1140,7 +1139,7 @@ void ScUndoReplace::Undo()
 //! selected sheet
 //! select range ?
 
-        // Undo document has now row/column information, thus copy with
+        // Undo document has no row/column information, thus copy with
         // bColRowFlags = FALSE to not destroy Outline groups
 
         sal_uInt16 nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
@@ -1152,7 +1151,7 @@ void ScUndoReplace::Undo()
     else if (pSearchItem->GetPattern() &&
              pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE)
     {
-        String aTempStr = pSearchItem->GetSearchString();       // replace
+        String aTempStr = pSearchItem->GetSearchString();       // toggle
         pSearchItem->SetSearchString(pSearchItem->GetReplaceString());
         pSearchItem->SetReplaceString(aTempStr);
         pDoc->ReplaceStyle( *pSearchItem,
@@ -1251,6 +1250,7 @@ sal_Bool ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const
     return (rTarget.ISA(ScTabViewTarget));
 }
 
+// multi-operation (only simple blocks)
 ScUndoTabOp::ScUndoTabOp( ScDocShell* pNewDocShell,
                 SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
                 SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocument* pNewUndoDoc,
@@ -1677,7 +1677,7 @@ void ScUndoRefreshLink::Redo()
 
 void ScUndoRefreshLink::Repeat(SfxRepeatTarget& /* rTarget */)
 {
-    // no such thing
+    // makes no sense
 }
 
 
@@ -1782,7 +1782,7 @@ void ScUndoInsertAreaLink::Redo()
 
 void ScUndoInsertAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
 {
-    //! ....
+    // makes no sense
 }
 
 
@@ -1865,7 +1865,7 @@ void ScUndoRemoveAreaLink::Redo()
 
 void ScUndoRemoveAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
 {
-    // no such thing
+    // makes no sense
 }
 
 
@@ -2026,7 +2026,7 @@ void ScUndoUpdateAreaLink::Redo()
 
 void ScUndoUpdateAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
 {
-    // no such thing
+    // makes no sense
 }
 
 
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index b4a1814..58061bc 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -218,8 +218,7 @@ rtl::OUString ScUndoEnterData::GetComment() const
 
 void ScUndoEnterData::DoChange() const
 {
-    // Adjust row height
-    //! only when needed (old or new Edit cell, or Attribute) ??
+    // only when needed (old or new Edit cell, or Attribute)?
     for (sal_uInt16 i=0; i<nCount; i++)
         pDocShell->AdjustRowHeight( nRow, nRow, pTabs[i] );
 
@@ -983,7 +982,7 @@ void ScUndoDetective::Undo()
     }
     else
     {
-        // Delete entry from list
+        // Remove entry from list
 
         ScDetOpList* pList = pDoc->GetDetOpList();
         if (pList && pList->Count())
@@ -994,7 +993,7 @@ void ScUndoDetective::Undo()
                 rVec.erase( it);
             else
             {
-                OSL_FAIL("Detective entry in the list, not found");
+                OSL_FAIL("Detective entry could not be found in list");
             }
         }
     }
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 8314d9a..69feff1 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -111,7 +111,7 @@ void ScUndoDoOutline::Undo()
     ScDocument* pDoc = pDocShell->GetDocument();
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
 
-    // sheet has to be switched on or off before this (#46952#) !!!
+    // sheet has to be switched over (#46952#)!
 
     SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo();
     if ( nVisTab != nTab )
@@ -145,7 +145,7 @@ void ScUndoDoOutline::Redo()
 
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
 
-    // sheet has to be switched on or off before this (#46952#) !!!
+    // sheet has to be switched over (#46952#)!
 
     SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo();
     if ( nVisTab != nTab )
@@ -509,7 +509,7 @@ void ScUndoRemoveAllOutlines::Redo()
 
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
 
-    // sheet has to be switched on or off before this (#46952#) !!!
+    // sheet has to be switched over (#46952#)!
 
     SCTAB nTab = aBlockStart.Tab();
     SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo();
@@ -832,11 +832,10 @@ void ScUndoSort::Undo()
         pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
     }
 
-    // Always reset row heights to ScBlockUndo
-    // (due to automatic adjustment)
-//  if (bRepeatQuery)
-        pUndoDoc->CopyToDocument( 0, nStartRow, nSortTab, MAXCOL, nEndRow, nSortTab,
-                                IDF_NONE, false, pDoc );
+    // Row heights always (due to automatic adjustment)
+    // TODO change to use ScBlockUndo
+    pUndoDoc->CopyToDocument( 0, nStartRow, nSortTab, MAXCOL, nEndRow, nSortTab,
+                              IDF_NONE, false, pDoc );
 
     if (pUndoDB)
         pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
@@ -970,7 +969,7 @@ void ScUndoQuery::Undo()
                                     IDF_ALL, false, pDoc );
         //  Attributes are always copied (#49287#)
 
-        //  the rest of the old range
+        // rest of the old range
         if ( bDestArea && !bDoSize )
         {
             pDoc->DeleteAreaTab( aOldDest, IDF_ALL );
@@ -1132,7 +1131,7 @@ sal_Bool ScUndoAutoFilter::CanRepeat(SfxRepeatTarget& /* rTarget */) const
     return false;
 }
 
-
+// change database sections (dialog)
 ScUndoDBData::ScUndoDBData( ScDocShell* pNewDocShell,
                             ScDBCollection* pNewUndoColl, ScDBCollection* pNewRedoColl ) :
     ScSimpleUndo( pNewDocShell ),
@@ -1148,7 +1147,7 @@ ScUndoDBData::~ScUndoDBData()
 }
 
 rtl::OUString ScUndoDBData::GetComment() const
-{   // "Change Data base rage";
+{   // "Change database range";
     return ScGlobal::GetRscString( STR_UNDO_DBDATA );
 }
 
@@ -1409,7 +1408,7 @@ void ScUndoImportData::Repeat(SfxRepeatTarget& rTarget)
 
 sal_Bool ScUndoImportData::CanRepeat(SfxRepeatTarget& rTarget) const
 {
-    //  Repeat only for import for each Data base range, then pUndoDBData is set
+    //  Repeat only for import using a database range, then pUndoDBData is set
 
     if (pUndoDBData)
         return (rTarget.ISA(ScTabViewTarget));
@@ -1472,7 +1471,7 @@ void ScUndoRepeatDB::Undo()
         {
             SCCOL nFormulaCols = 0;
             SCCOL nCol = aOldQuery.aEnd.Col() + 1;
-            SCROW nRow = aOldQuery.aStart.Row() + 1;        //! Test Header
+            SCROW nRow = aOldQuery.aStart.Row() + 1;        // test the header
             while ( nCol <= MAXCOL &&
                     pDoc->GetCellType(ScAddress( nCol, nRow, nTab )) == CELLTYPE_FORMULA )
                 ++nCol, ++nFormulaCols;
@@ -1489,7 +1488,7 @@ void ScUndoRepeatDB::Undo()
         }
     }
 
-    //!     Data from Filter in other range are still missing !!!!!!!!!!!!!!!!!
+    // TODO Data from Filter in other range are still missing!
 
     if (nNewEndRow > aBlockEnd.Row())
     {
@@ -2060,7 +2059,7 @@ void ScUndoDataForm::DoChange( const sal_Bool bUndo )
 
     ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
 
-    // Always back-up all or none of the content for Undo
+    // Always back-up either all or none of the content for Undo
     sal_uInt16 nUndoFlags = IDF_NONE;
     if (nFlags & IDF_CONTENTS)
             nUndoFlags |= IDF_CONTENTS;
diff --git a/sc/source/ui/undo/undodraw.cxx b/sc/source/ui/undo/undodraw.cxx
index 02b5138..2d9ea5e 100644
--- a/sc/source/ui/undo/undodraw.cxx
+++ b/sc/source/ui/undo/undodraw.cxx
@@ -52,7 +52,7 @@ ScUndoDraw::~ScUndoDraw()
 
 void ScUndoDraw::ForgetDrawUndo()
 {
-    pDrawUndo = NULL;   // do not delete (DrawUndo has to be set from outside)
+    pDrawUndo = NULL;   // do not delete (DrawUndo has to be remembered from outside)
 }
 
 rtl::OUString ScUndoDraw::GetComment() const
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index d48366a..d5be4ed 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -59,7 +59,7 @@
 
 #include <vector>
 
-extern sal_Bool bDrawIsInUndo;          //! somewhere as Member !!!
+extern sal_Bool bDrawIsInUndo; // somewhere as member!
 
 using namespace com::sun::star;
 using ::com::sun::star::uno::Sequence;
@@ -379,7 +379,7 @@ void ScUndoDeleteTab::Undo()
     }
     if (bLink)
     {
-        pDocShell->UpdateLinks();               // Update Link manager updaten
+        pDocShell->UpdateLinks(); // update Link Manager
     }
 
     EndUndo();      // Draw-Undo has to be called before Broadcast!
@@ -470,7 +470,7 @@ void ScUndoRenameTab::DoChange( SCTAB nTabP, const String& rName ) const
     pDocShell->PostPaintExtras();
     pDocShell->PostDataChanged();
 
-    // The sheet name could be found in a formula ...
+    // The sheet name might be used in a formula ...
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
     if (pViewShell)
         pViewShell->UpdateInputHandler();
@@ -488,7 +488,7 @@ void ScUndoRenameTab::Redo()
 
 void ScUndoRenameTab::Repeat(SfxRepeatTarget& /* rTarget */)
 {
-    //  Repeat makes no sense
+    // makes no sense
 }
 
 sal_Bool ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
@@ -804,7 +804,7 @@ void ScUndoTabColor::Redo()
 
 void ScUndoTabColor::Repeat(SfxRepeatTarget& /* rTarget */)
 {
-    //  No Repeat
+    // makes no sense
 }
 
 sal_Bool ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
@@ -948,7 +948,7 @@ void ScUndoImportTab::DoChange() const
 
 void ScUndoImportTab::Undo()
 {
-    //! Inserted range names, and so on.
+    // Inserted range names, etc.
 
     SCTAB i;
     ScDocument* pDoc = pDocShell->GetDocument();
@@ -1084,7 +1084,7 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const String& rDoc ) :
                 {
                     OSL_ENSURE(rtl::OUString(aFltName) == pDoc->GetLinkFlt(i) &&
                                rtl::OUString(aOptions) == pDoc->GetLinkOpt(i),
-                                    "diffrent Filter for a Document?");
+                                    "different Filter for a Document?");
                 }
                 pTabs[nCount] = i;
                 pModes[nCount] = nMode;
@@ -1437,7 +1437,7 @@ void ScUndoScenarioFlags::Undo()
     pDoc->SetScenarioData( nTab, aOldComment, aOldColor, nOldFlags );
 
     pDocShell->PostPaintGridAll();
-    // The sheet name could be found in a formula ...
+    // The sheet name might be used in a formula ...
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
     if (pViewShell)
         pViewShell->UpdateInputHandler();
@@ -1454,7 +1454,7 @@ void ScUndoScenarioFlags::Redo()
     pDoc->SetScenarioData( nTab, aNewComment, aNewColor, nNewFlags );
 
     pDocShell->PostPaintGridAll();
-    // The sheet name could be found in a formula ...
+    // The sheet name might be used in a formula ...
     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
     if (pViewShell)
         pViewShell->UpdateInputHandler();


More information about the Libreoffice-commits mailing list