LibreOffice Module sc (master)
1
sc
source
ui
inc
undomanager.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
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/.
8
*/
9
#pragma once
10
11
#include <
svx/sdrundomanager.hxx
>
12
13
class
SfxViewShell
;
14
class
ScSimpleUndo
;
15
16
class
SC_DLLPUBLIC
ScUndoManager
:
public
SdrUndoManager
17
{
18
public
:
19
~ScUndoManager
();
20
25
bool
IsViewUndoActionIndependent(
const
SfxViewShell
* pView, sal_uInt16& rOffset)
const
;
26
28
using
SdrUndoManager::UndoWithContext;
29
using
SdrUndoManager::RedoWithContext;
30
31
private
:
32
static
std::optional<ScRange> getAffectedRangeFromUndo(
const
SfxUndoAction
*);
33
static
const
ScSimpleUndo
* getScSimpleUndo(
const
SfxUndoAction
*);
34
};
35
36
class
ScUndoRedoContext
final :
public
SfxUndoContext
37
{
38
public
:
39
void
SetUndoOffset
(
size_t
nUndoOffset) {
m_nUndoOffset
= nUndoOffset; }
40
41
size_t
GetUndoOffset
()
override
{
return
m_nUndoOffset
; }
42
43
private
:
44
size_t
m_nUndoOffset
= 0;
45
};
46
47
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
ScSimpleUndo
Definition:
undobase.hxx:35
ScUndoManager
Definition:
undomanager.hxx:17
ScUndoRedoContext
Definition:
undomanager.hxx:37
ScUndoRedoContext::m_nUndoOffset
size_t m_nUndoOffset
Definition:
undomanager.hxx:44
ScUndoRedoContext::GetUndoOffset
size_t GetUndoOffset() override
Definition:
undomanager.hxx:41
ScUndoRedoContext::SetUndoOffset
void SetUndoOffset(size_t nUndoOffset)
Definition:
undomanager.hxx:39
SdrUndoManager
SfxUndoAction
SfxUndoContext
SfxViewShell
SC_DLLPUBLIC
#define SC_DLLPUBLIC
Definition:
scdllapi.h:27
sdrundomanager.hxx
Generated on Sun Jul 30 2023 04:29:23 for LibreOffice Module sc (master) by
1.9.3