merge the formfield patch from ooo-build
[ooovba.git] / sd / source / ui / inc / undopage.hxx
blob265ab5fafa51015e782d5de26a403fdfbf149fe6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: undopage.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SD_UNDOPAGE_HXX
32 #define _SD_UNDOPAGE_HXX
34 #include <tools/gen.hxx>
35 #include <vcl/prntypes.hxx>
37 #include "sdundo.hxx"
39 class SdDrawDocument;
40 class SdPage;
42 /************************************************************************/
44 class SdPageFormatUndoAction : public SdUndoAction
46 SdPage* mpPage;
48 Size maOldSize;
49 INT32 mnOldLeft;
50 INT32 mnOldRight;
51 INT32 mnOldUpper;
52 INT32 mnOldLower;
53 BOOL mbOldScale;
54 Orientation meOldOrientation;
55 USHORT mnOldPaperBin;
56 BOOL mbOldFullSize;
58 Size maNewSize;
59 INT32 mnNewLeft;
60 INT32 mnNewRight;
61 INT32 mnNewUpper;
62 INT32 mnNewLower;
63 BOOL mbNewScale;
64 Orientation meNewOrientation;
65 USHORT mnNewPaperBin;
66 BOOL mbNewFullSize;
68 public:
69 TYPEINFO();
70 SdPageFormatUndoAction( SdDrawDocument* pDoc,
71 SdPage* pThePage,
72 const Size& rOldSz,
73 INT32 nOldLft,
74 INT32 nOldRgt,
75 INT32 nOldUpr,
76 INT32 nOldLwr,
77 BOOL bOldScl,
78 Orientation eOldOrient,
79 USHORT nOPaperBin,
80 BOOL bOFullSize,
82 const Size& rNewSz,
83 INT32 nNewLft,
84 INT32 nNewRgt,
85 INT32 nNewUpr,
86 INT32 nNewLwr,
87 BOOL bNewScl,
88 Orientation eNewOrient,
89 USHORT nNPaperBin,
90 BOOL bNFullSize
91 ) :
92 SdUndoAction(pDoc),
93 mpPage (pThePage),
94 maOldSize (rOldSz),
95 mnOldLeft (nOldLft),
96 mnOldRight (nOldRgt),
97 mnOldUpper (nOldUpr),
98 mnOldLower (nOldLwr),
99 mbOldScale (bOldScl),
100 meOldOrientation(eOldOrient),
101 mnOldPaperBin (nOPaperBin),
102 mbOldFullSize (bOFullSize),
105 maNewSize (rNewSz),
106 mnNewLeft (nNewLft),
107 mnNewRight (nNewRgt),
108 mnNewUpper (nNewUpr),
109 mnNewLower (nNewLwr),
110 mbNewScale (bNewScl),
111 meNewOrientation(eNewOrient),
112 mnNewPaperBin (nNPaperBin),
113 mbNewFullSize (bNFullSize)
116 virtual ~SdPageFormatUndoAction();
118 virtual void Undo();
119 virtual void Redo();
122 /************************************************************************/
124 class SdPageLRUndoAction : public SdUndoAction
126 SdPage* mpPage;
128 INT32 mnOldLeft;
129 INT32 mnOldRight;
130 INT32 mnNewLeft;
131 INT32 mnNewRight;
133 public:
134 TYPEINFO();
135 SdPageLRUndoAction( SdDrawDocument* pDoc, SdPage* pThePage,
136 INT32 nOldLft, INT32 nOldRgt,
137 INT32 nNewLft, INT32 nNewRgt ) :
138 SdUndoAction(pDoc),
139 mpPage (pThePage),
140 mnOldLeft (nOldLft),
141 mnOldRight (nOldRgt),
142 mnNewLeft (nNewLft),
143 mnNewRight (nNewRgt)
145 virtual ~SdPageLRUndoAction();
147 virtual void Undo();
148 virtual void Redo();
151 /************************************************************************/
153 class SdPageULUndoAction : public SdUndoAction
155 SdPage* mpPage;
157 INT32 mnOldUpper;
158 INT32 mnOldLower;
159 INT32 mnNewUpper;
160 INT32 mnNewLower;
162 public:
163 TYPEINFO();
164 SdPageULUndoAction( SdDrawDocument* pDoc, SdPage* pThePage,
165 INT32 nOldUpr, INT32 nOldLwr,
166 INT32 nNewUpr, INT32 nNewLwr ) :
167 SdUndoAction(pDoc),
168 mpPage (pThePage),
169 mnOldUpper (nOldUpr),
170 mnOldLower (nOldLwr),
171 mnNewUpper (nNewUpr),
172 mnNewLower (nNewLwr)
174 virtual ~SdPageULUndoAction();
176 virtual void Undo();
177 virtual void Redo();
182 #endif // _SD_UNDOPAGE_HXX