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

Arul Michael arul71.m at gmail.com
Tue May 17 17:56:35 UTC 2016


 sc/source/core/data/column.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 2d15020ea29d5541d1c44ff44a06eb5bcb35c52e
Author: Arul Michael <arul71.m at gmail.com>
Date:   Mon May 16 15:52:21 2016 +0530

    tdf#99255 Calc crashing on Undo after Spell Correction
    
     Avoiding null pointers being set for ScPostit* while
    creating the undo document during spell check.
    
    Change-Id: Ieb09cb2cee1c030f275eb5030dd779d543753c8b
    Reviewed-on: https://gerrit.libreoffice.org/25030
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index faf7f3a2..6389b1c 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1206,9 +1206,13 @@ void ScColumn::CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDes
     {
         rDestCol.maCellTextAttrs.set(nDestRow, maCellTextAttrs.get<sc::CellTextAttr>(nSrcRow));
         ScPostIt* pNote = maCellNotes.get<ScPostIt*>(nSrcRow);
-        rDestCol.maCellNotes.set(nDestRow, pNote);
         if (pNote)
+        {
+            rDestCol.maCellNotes.set(nDestRow, pNote);
             pNote->UpdateCaptionPos(ScAddress(rDestCol.nCol, nDestRow, rDestCol.nTab));
+        }
+        else
+            rDestCol.maCellNotes.set_empty(nDestRow, nDestRow);
     }
     else
     {


More information about the Libreoffice-commits mailing list