1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 #include <svx/sdrundomanager.hxx>
16 class SC_DLLPUBLIC ScUndoManager
: public SdrUndoManager
22 * Checks if the topmost undo action owned by pView is independent from the topmost action undo
23 * action. Sets rOffset to the offset of that independent undo action on success.
25 bool IsViewUndoActionIndependent(const SfxViewShell
* pView
, sal_uInt16
& rOffset
) const;
28 using SdrUndoManager::UndoWithContext
;
29 using SdrUndoManager::RedoWithContext
;
30 using SdrUndoManager::UndoMark
;
33 static std::optional
<ScRange
> getAffectedRangeFromUndo(const SfxUndoAction
*);
34 static const ScSimpleUndo
* getScSimpleUndo(const SfxUndoAction
*);
37 class ScUndoRedoContext final
: public SfxUndoContext
40 void SetUndoOffset(size_t nUndoOffset
) { m_nUndoOffset
= nUndoOffset
; }
42 size_t GetUndoOffset() override
{ return m_nUndoOffset
; }
45 size_t m_nUndoOffset
= 0;
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */