diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-09-02 06:45:35 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-09-06 12:22:06 +0200 |
commit | bf8ba674089cea3b335c0668a40bc42274f4146a (patch) | |
tree | d02eea99600811ac32c15ee014a93961a809c442 | |
parent | a8cd70cd0a1cc24e678af02e08b46f3fbafc6a82 (diff) |
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@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit a726c69ffef2533545e316172e3e1494b8ad327e)
Reviewed-on: https://gerrit.libreoffice.org/41825
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 3b18699b2e9c..738e865cb23a 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -237,6 +237,7 @@ bool ImplSdPPTImport::Import() return false; pSdrModel->setLock(true); + const bool bSavedUndoEnabled = pSdrModel->IsUndoEnabled(); pSdrModel->EnableUndo(false); SdrOutliner& rOutl = mpDoc->GetDrawOutliner(); @@ -1407,7 +1408,7 @@ bool ImplSdPPTImport::Import() xDocProps->setTemplateName(OUString()); pSdrModel->setLock(false); - pSdrModel->EnableUndo(true); + pSdrModel->EnableUndo(bSavedUndoEnabled); return bOk; } |