[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-6' - sc/source

Eike Rathke erack at redhat.com
Mon Feb 27 14:12:12 UTC 2017


 sc/source/ui/undo/undoblk3.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 06a3f692dc853f1762927370dcc34bc50273273d
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Feb 17 23:54:21 2017 +0100

    Resolves: tdf#105667 forget target area's caption pointer in Merge Undo
    
    It's the same that was copied to the Undo document, so don't delete the
    caption.
    
    (cherry picked from commit a627c44026fcf883918f84bddd1c3b745e1f898c)
    
    Change-Id: Ib89870ed6e392c4271de2f416c78d42135922609
    Reviewed-on: https://gerrit.libreoffice.org/34386
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 3072d0c..ff43c28 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -701,7 +701,13 @@ void ScUndoMerge::DoChange( bool bUndo ) const
         // undo -> copy back deleted contents
         if (bUndo && mpUndoDoc)
         {
-            rDoc.DeleteAreaTab( aRange, InsertDeleteFlags::CONTENTS|InsertDeleteFlags::NOCAPTIONS );
+            // If there are note captions to be deleted during Undo they were
+            // kept or moved during the merge and copied to the Undo document
+            // without cloning the caption. Forget the target area's caption
+            // pointer that is identical to the one in the Undo document
+            // instead of deleting it.
+            rDoc.DeleteAreaTab( aRange,
+                    InsertDeleteFlags::CONTENTS | InsertDeleteFlags::NOCAPTIONS | InsertDeleteFlags::FORGETCAPTIONS );
             mpUndoDoc->CopyToDocument( aRange, InsertDeleteFlags::ALL|InsertDeleteFlags::NOCAPTIONS, false, &rDoc );
         }
 


More information about the Libreoffice-commits mailing list