diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-07-28 19:06:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-30 09:02:07 +0200 |
commit | 640a6488a32e8f682788feb6cab01acfffca7fa7 (patch) | |
tree | 05c3d735e99a9afe6f94ef7b260ff420456f8006 /sc/source/core/data | |
parent | be32cb92103326da2c744bc85d82b9c788f4e98b (diff) |
sc: allow undo of typing in 2 views independent from each other
This commit follows the same pattern as
commit c72e500ccaf0ce2261c5233b80fba9342778f810
sw: allow undo of typing in 2 views independent from each other
with some changes since calc and writer have different undo/redo
infrastructure on top of SfxUndoManager.
Change-Id: Ib6e7e21caccb94752c01c529b5013553dba8b4f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/data')
-rw-r--r-- | sc/source/core/data/document.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 9c6f040961f1..53c9223ad5bd 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -88,6 +88,7 @@ #include <recursionhelper.hxx> #include <SparklineGroup.hxx> #include <SparklineList.hxx> +#include <undomanager.hxx> #include <formula/vectortoken.hxx> @@ -6482,14 +6483,14 @@ bool ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const return false; // otherwise not } -SfxUndoManager* ScDocument::GetUndoManager() +ScUndoManager* ScDocument::GetUndoManager() { if (!mpUndoManager) { // to support enhanced text edit for draw objects, use an SdrUndoManager ScMutationGuard aGuard(*this, ScMutationGuardFlags::CORE); - SdrUndoManager* pUndoManager = new SdrUndoManager; + ScUndoManager* pUndoManager = new ScUndoManager; pUndoManager->SetDocShell(GetDocumentShell()); mpUndoManager = pUndoManager; } |