[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sw/source

Jan-Marek Glogowski glogow at fbihome.de
Mon Jun 18 11:19:48 UTC 2018


 sw/source/uibase/dbui/dbmgr.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit f4d9bc000100cd9231898ddf94c48d45cd9469b0
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Thu Aug 11 18:45:21 2016 +0200

    MM don't keep undo information
    
    Doen't make much sense to store undo information for all merge
    based progress. Actually it even prevents crahes when undoing a
    merged ODT document.
    
    Conflicts:
            sw/source/uibase/dbui/dbmgr.cxx
    
    Change-Id: Ic3a3982f3e5eb4f6de9f027a6a5e376c2833e8a5
    Reviewed-on: https://gerrit.libreoffice.org/56023
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 2f2e76a072c3..5ab4d70aaa9d 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -79,6 +79,7 @@
 #include <IDocumentLinksAdministration.hxx>
 #include <IDocumentContentOperations.hxx>
 #include <IDocumentFieldsAccess.hxx>
+#include <IDocumentUndoRedo.hxx>
 #include <swwait.hxx>
 #include <swunohelper.hxx>
 #include <dbui.hrc>
@@ -993,6 +994,7 @@ static SfxObjectShell* lcl_CreateWorkingDocument(
     SwWrtShell* pWorkWrtShell = pWorkView->GetWrtShellPtr();
     pWorkView->AttrChangedNotify( pWorkWrtShell );// in order for SelectShell to be called
     SwDoc* pWorkDoc = pWorkWrtShell->GetDoc();
+    pWorkDoc->GetIDocumentUndoRedo().DoUndo( false );
     pWorkDoc->ReplaceDocumentProperties( *pSourceDoc );
 
     if( aType == WorkingDocType::TARGET )
@@ -1556,6 +1558,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
 
         // Unfreeze target document layouts and correct all PageDescs.
         pTargetShell->CalcLayout();
+        pTargetDoc->GetIDocumentUndoRedo().DoUndo( true );
         for ( auto aLayout : pTargetShell->GetDoc()->GetAllLayouts() )
         {
             aLayout->FreezeLayout(false);


More information about the Libreoffice-commits mailing list