Kaydet (Commit) 49528471 authored tarafından Michael Stahl's avatar Michael Stahl

tdf#108863 sd: disable Undo earlier if no Undo Steps

If 0 Undo Steps, the Undo is disabled by a timer somewhere calling
SfxShell::SetUndoManager().  This seems a bit risky, so disable it
already when the sd::UndoManager is created.

Change-Id: I9caf14fe32251d1f92cb5fa0683838316275eab3
üst ab3268d4
......@@ -18,6 +18,11 @@
*/
#include "DrawDocShell.hxx"
#include <officecfg/Office/Common.hxx>
#include <unotools/configmgr.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/docfac.hxx>
......@@ -108,6 +113,11 @@ void DrawDocShell::Construct( bool bClipboard )
SetBaseModel( new SdXImpressDocument( this, bClipboard ) );
SetPool( &mpDoc->GetItemPool() );
mpUndoManager = new sd::UndoManager;
if (!utl::ConfigManager::IsAvoidConfig()
&& officecfg::Office::Common::Undo::Steps::get() < 1)
{
mpUndoManager->EnableUndo(false); // tdf#108863 disable if 0 steps
}
mpDoc->SetSdrUndoManager( mpUndoManager );
mpDoc->SetSdrUndoFactory( new sd::UndoFactory );
UpdateTablePointers();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment