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

Tamás Zolnai tamas.zolnai at collabora.com
Sat Sep 2 05:29:51 UTC 2017


 sd/source/filter/ppt/pptin.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a726c69ffef2533545e316172e3e1494b8ad327e
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date:   Sat Sep 2 06:45:35 2017 +0200

    tdf#109052: Crash after PPT import when undo is disabled
    
    It was not a good idea to enable undo unconditionally.
    Use the saved undo state instead.
    
    Change-Id: I60875da23466b6ef54f034b447d636bdbab38151
    Reviewed-on: https://gerrit.libreoffice.org/41823
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 3fb80c4e6b98..617a117544e9 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -239,6 +239,7 @@ bool ImplSdPPTImport::Import()
         return false;
 
     pSdrModel->setLock(true);
+    const bool bSavedUndoEnabled = pSdrModel->IsUndoEnabled();
     pSdrModel->EnableUndo(false);
 
     SdrOutliner& rOutl = mpDoc->GetDrawOutliner();
@@ -1409,7 +1410,7 @@ bool ImplSdPPTImport::Import()
     xDocProps->setTemplateName(OUString());
 
     pSdrModel->setLock(false);
-    pSdrModel->EnableUndo(true);
+    pSdrModel->EnableUndo(bSavedUndoEnabled);
     return bOk;
 }
 


More information about the Libreoffice-commits mailing list