diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-09-02 06:45:35 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-09-02 07:29:31 +0200 |
commit | a726c69ffef2533545e316172e3e1494b8ad327e (patch) | |
tree | d09d82bbd2047a2f65b2c95e1cb5435bb5750422 /sd | |
parent | 27068e6cc39aed8ebfa5fdd7a67acb89f5adcb89 (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>
Diffstat (limited to 'sd')
-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 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; } |