1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SD_UNDOPAGE_HXX 29 #define _SD_UNDOPAGE_HXX 30 31 #include <tools/gen.hxx> 32 #include <vcl/prntypes.hxx> 33 34 #include "sdundo.hxx" 35 36 class SdDrawDocument; 37 class SdPage; 38 39 /************************************************************************/ 40 41 class SdPageFormatUndoAction : public SdUndoAction 42 { 43 SdPage* mpPage; 44 45 Size maOldSize; 46 sal_Int32 mnOldLeft; 47 sal_Int32 mnOldRight; 48 sal_Int32 mnOldUpper; 49 sal_Int32 mnOldLower; 50 sal_Bool mbOldScale; 51 Orientation meOldOrientation; 52 sal_uInt16 mnOldPaperBin; 53 sal_Bool mbOldFullSize; 54 55 Size maNewSize; 56 sal_Int32 mnNewLeft; 57 sal_Int32 mnNewRight; 58 sal_Int32 mnNewUpper; 59 sal_Int32 mnNewLower; 60 sal_Bool mbNewScale; 61 Orientation meNewOrientation; 62 sal_uInt16 mnNewPaperBin; 63 sal_Bool mbNewFullSize; 64 65 public: 66 TYPEINFO(); 67 SdPageFormatUndoAction( SdDrawDocument* pDoc, 68 SdPage* pThePage, 69 const Size& rOldSz, 70 sal_Int32 nOldLft, 71 sal_Int32 nOldRgt, 72 sal_Int32 nOldUpr, 73 sal_Int32 nOldLwr, 74 sal_Bool bOldScl, 75 Orientation eOldOrient, 76 sal_uInt16 nOPaperBin, 77 sal_Bool bOFullSize, 78 79 const Size& rNewSz, 80 sal_Int32 nNewLft, 81 sal_Int32 nNewRgt, 82 sal_Int32 nNewUpr, 83 sal_Int32 nNewLwr, 84 sal_Bool bNewScl, 85 Orientation eNewOrient, 86 sal_uInt16 nNPaperBin, 87 sal_Bool bNFullSize 88 ) : 89 SdUndoAction(pDoc), 90 mpPage (pThePage), 91 maOldSize (rOldSz), 92 mnOldLeft (nOldLft), 93 mnOldRight (nOldRgt), 94 mnOldUpper (nOldUpr), 95 mnOldLower (nOldLwr), 96 mbOldScale (bOldScl), 97 meOldOrientation(eOldOrient), 98 mnOldPaperBin (nOPaperBin), 99 mbOldFullSize (bOFullSize), 100 101 102 maNewSize (rNewSz), 103 mnNewLeft (nNewLft), 104 mnNewRight (nNewRgt), 105 mnNewUpper (nNewUpr), 106 mnNewLower (nNewLwr), 107 mbNewScale (bNewScl), 108 meNewOrientation(eNewOrient), 109 mnNewPaperBin (nNPaperBin), 110 mbNewFullSize (bNFullSize) 111 112 {} 113 virtual ~SdPageFormatUndoAction(); 114 115 virtual void Undo(); 116 virtual void Redo(); 117 }; 118 119 /************************************************************************/ 120 121 class SdPageLRUndoAction : public SdUndoAction 122 { 123 SdPage* mpPage; 124 125 sal_Int32 mnOldLeft; 126 sal_Int32 mnOldRight; 127 sal_Int32 mnNewLeft; 128 sal_Int32 mnNewRight; 129 130 public: 131 TYPEINFO(); 132 SdPageLRUndoAction( SdDrawDocument* pDoc, SdPage* pThePage, 133 sal_Int32 nOldLft, sal_Int32 nOldRgt, 134 sal_Int32 nNewLft, sal_Int32 nNewRgt ) : 135 SdUndoAction(pDoc), 136 mpPage (pThePage), 137 mnOldLeft (nOldLft), 138 mnOldRight (nOldRgt), 139 mnNewLeft (nNewLft), 140 mnNewRight (nNewRgt) 141 {} 142 virtual ~SdPageLRUndoAction(); 143 144 virtual void Undo(); 145 virtual void Redo(); 146 }; 147 148 /************************************************************************/ 149 150 class SdPageULUndoAction : public SdUndoAction 151 { 152 SdPage* mpPage; 153 154 sal_Int32 mnOldUpper; 155 sal_Int32 mnOldLower; 156 sal_Int32 mnNewUpper; 157 sal_Int32 mnNewLower; 158 159 public: 160 TYPEINFO(); 161 SdPageULUndoAction( SdDrawDocument* pDoc, SdPage* pThePage, 162 sal_Int32 nOldUpr, sal_Int32 nOldLwr, 163 sal_Int32 nNewUpr, sal_Int32 nNewLwr ) : 164 SdUndoAction(pDoc), 165 mpPage (pThePage), 166 mnOldUpper (nOldUpr), 167 mnOldLower (nOldLwr), 168 mnNewUpper (nNewUpr), 169 mnNewLower (nNewLwr) 170 {} 171 virtual ~SdPageULUndoAction(); 172 173 virtual void Undo(); 174 virtual void Redo(); 175 }; 176 177 178 179 #endif // _SD_UNDOPAGE_HXX 180 181