[Libreoffice-commits] core.git: Branch 'feature/sc-notes-storage' - sc/source

Laurent Godard lgodard.libre at laposte.net
Thu Oct 3 07:51:14 PDT 2013


 sc/source/core/data/column2.cxx |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 931f3887cf831b3e1f3c7bc761e11bcb30752112
Author: Laurent Godard <lgodard.libre at laposte.net>
Date:   Thu Oct 3 16:50:23 2013 +0200

    no need to clone notes, only update caption is needed
    
    Change-Id: I88f3bb43a44e2132f9362a7233ae4d4b25110c8f

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 31e7cdf..292bf64 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1782,7 +1782,7 @@ void ScColumn::SwapCellNotes( SCROW nRow1, SCROW nRow2 )
             sc::cellnote_block::at(*it1->data, aPos1.second),
             sc::cellnote_block::at(*it2->data, aPos2.second));
 
-        //update captions
+        //update Note caption with position
         aNote = sc::cellnote_block::at(*it1->data, aPos1.second);
         aNote->UpdateCaptionPos(ScAddress(nCol,nRow2,nTab));
         aNote = sc::cellnote_block::at(*it2->data, aPos2.second);
@@ -1798,20 +1798,16 @@ void ScColumn::SwapCellNotes( SCROW nRow1, SCROW nRow2 )
         ScPostIt* pVal2 = sc::cellnote_block::at(*it2->data, aPos2.second);
         it1 = maCellNotes.set(it1, nRow1, pVal2);
         maCellNotes.set_empty(it1, nRow2, nRow2);
-
-        //update captions
-        pVal2->UpdateCaptionPos(ScAddress(nCol,nRow1,nTab));
+        pVal2->UpdateCaptionPos(ScAddress(nCol,nRow1,nTab)); //update Note caption with position
 
         return;
     }
 
     // row 1 is non-empty while row 2 is empty.
-    ScPostIt* pVal1 = sc::cellnote_block::at(*it1->data, aPos1.second); // TODO notes : make a copy.
+    ScPostIt* pVal1 = sc::cellnote_block::at(*it1->data, aPos1.second);
     it1 = maCellNotes.set_empty(it1, nRow1, nRow1);
     maCellNotes.set(it1, nRow2, pVal1);
-
-    //update captions
-    pVal1->UpdateCaptionPos(ScAddress(nCol,nRow1,nTab));
+    pVal1->UpdateCaptionPos(ScAddress(nCol,nRow1,nTab));     //update Note caption with position
 
     CellStorageModified();
 }


More information about the Libreoffice-commits mailing list