1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SD_SOURCE_UI_INC_UNDOPAGE_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_UNDOPAGE_HXX
23 #include <tools/gen.hxx>
24 #include <vcl/prntypes.hxx>
31 /************************************************************************/
33 class SdPageFormatUndoAction
: public SdUndoAction
38 sal_Int32
const mnOldLeft
;
39 sal_Int32
const mnOldRight
;
40 sal_Int32
const mnOldUpper
;
41 sal_Int32
const mnOldLower
;
42 Orientation
const meOldOrientation
;
43 sal_uInt16
const mnOldPaperBin
;
44 bool const mbOldFullSize
;
47 sal_Int32
const mnNewLeft
;
48 sal_Int32
const mnNewRight
;
49 sal_Int32
const mnNewUpper
;
50 sal_Int32
const mnNewLower
;
51 bool const mbNewScale
;
52 Orientation
const meNewOrientation
;
53 sal_uInt16
const mnNewPaperBin
;
54 bool const mbNewFullSize
;
57 SdPageFormatUndoAction( SdDrawDocument
* pDoc
,
64 Orientation eOldOrient
,
65 sal_uInt16 nOPaperBin
,
74 Orientation eNewOrient
,
75 sal_uInt16 nNPaperBin
,
85 meOldOrientation(eOldOrient
),
86 mnOldPaperBin (nOPaperBin
),
87 mbOldFullSize (bOFullSize
),
95 meNewOrientation(eNewOrient
),
96 mnNewPaperBin (nNPaperBin
),
97 mbNewFullSize (bNFullSize
)
100 virtual ~SdPageFormatUndoAction() override
;
102 virtual void Undo() override
;
103 virtual void Redo() override
;
106 /************************************************************************/
108 class SdPageLRUndoAction
: public SdUndoAction
112 sal_Int32
const mnOldLeft
;
113 sal_Int32
const mnOldRight
;
114 sal_Int32
const mnNewLeft
;
115 sal_Int32
const mnNewRight
;
118 SdPageLRUndoAction( SdDrawDocument
* pDoc
, SdPage
* pThePage
,
119 sal_Int32 nOldLft
, sal_Int32 nOldRgt
,
120 sal_Int32 nNewLft
, sal_Int32 nNewRgt
) :
124 mnOldRight (nOldRgt
),
128 virtual ~SdPageLRUndoAction() override
;
130 virtual void Undo() override
;
131 virtual void Redo() override
;
134 /************************************************************************/
136 class SdPageULUndoAction
: public SdUndoAction
140 sal_Int32
const mnOldUpper
;
141 sal_Int32
const mnOldLower
;
142 sal_Int32
const mnNewUpper
;
143 sal_Int32
const mnNewLower
;
146 SdPageULUndoAction( SdDrawDocument
* pDoc
, SdPage
* pThePage
,
147 sal_Int32 nOldUpr
, sal_Int32 nOldLwr
,
148 sal_Int32 nNewUpr
, sal_Int32 nNewLwr
) :
151 mnOldUpper (nOldUpr
),
152 mnOldLower (nOldLwr
),
153 mnNewUpper (nNewUpr
),
156 virtual ~SdPageULUndoAction() override
;
158 virtual void Undo() override
;
159 virtual void Redo() override
;
162 #endif // INCLUDED_SD_SOURCE_UI_INC_UNDOPAGE_HXX
164 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */