1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SD_UNDOPAGE_HXX 25 #define _SD_UNDOPAGE_HXX 26 27 #include <tools/gen.hxx> 28 #include <vcl/prntypes.hxx> 29 30 #include "sdundo.hxx" 31 32 class SdDrawDocument; 33 class SdPage; 34 35 /************************************************************************/ 36 37 class SdPageFormatUndoAction : public SdUndoAction 38 { 39 SdPage* mpPage; 40 41 Size maOldSize; 42 sal_Int32 mnOldLeft; 43 sal_Int32 mnOldRight; 44 sal_Int32 mnOldUpper; 45 sal_Int32 mnOldLower; 46 sal_Bool mbOldScale; 47 Orientation meOldOrientation; 48 sal_uInt16 mnOldPaperBin; 49 sal_Bool mbOldFullSize; 50 51 Size maNewSize; 52 sal_Int32 mnNewLeft; 53 sal_Int32 mnNewRight; 54 sal_Int32 mnNewUpper; 55 sal_Int32 mnNewLower; 56 sal_Bool mbNewScale; 57 Orientation meNewOrientation; 58 sal_uInt16 mnNewPaperBin; 59 sal_Bool mbNewFullSize; 60 61 public: 62 TYPEINFO(); 63 SdPageFormatUndoAction( SdDrawDocument* pDoc, 64 SdPage* pThePage, 65 const Size& rOldSz, 66 sal_Int32 nOldLft, 67 sal_Int32 nOldRgt, 68 sal_Int32 nOldUpr, 69 sal_Int32 nOldLwr, 70 sal_Bool bOldScl, 71 Orientation eOldOrient, 72 sal_uInt16 nOPaperBin, 73 sal_Bool bOFullSize, 74 75 const Size& rNewSz, 76 sal_Int32 nNewLft, 77 sal_Int32 nNewRgt, 78 sal_Int32 nNewUpr, 79 sal_Int32 nNewLwr, 80 sal_Bool bNewScl, 81 Orientation eNewOrient, 82 sal_uInt16 nNPaperBin, 83 sal_Bool bNFullSize 84 ) : 85 SdUndoAction(pDoc), 86 mpPage (pThePage), 87 maOldSize (rOldSz), 88 mnOldLeft (nOldLft), 89 mnOldRight (nOldRgt), 90 mnOldUpper (nOldUpr), 91 mnOldLower (nOldLwr), 92 mbOldScale (bOldScl), 93 meOldOrientation(eOldOrient), 94 mnOldPaperBin (nOPaperBin), 95 mbOldFullSize (bOFullSize), 96 97 98 maNewSize (rNewSz), 99 mnNewLeft (nNewLft), 100 mnNewRight (nNewRgt), 101 mnNewUpper (nNewUpr), 102 mnNewLower (nNewLwr), 103 mbNewScale (bNewScl), 104 meNewOrientation(eNewOrient), 105 mnNewPaperBin (nNPaperBin), 106 mbNewFullSize (bNFullSize) 107 108 {} 109 virtual ~SdPageFormatUndoAction(); 110 111 virtual void Undo(); 112 virtual void Redo(); 113 }; 114 115 /************************************************************************/ 116 117 class SdPageLRUndoAction : public SdUndoAction 118 { 119 SdPage* mpPage; 120 121 sal_Int32 mnOldLeft; 122 sal_Int32 mnOldRight; 123 sal_Int32 mnNewLeft; 124 sal_Int32 mnNewRight; 125 126 public: 127 TYPEINFO(); 128 SdPageLRUndoAction( SdDrawDocument* pDoc, SdPage* pThePage, 129 sal_Int32 nOldLft, sal_Int32 nOldRgt, 130 sal_Int32 nNewLft, sal_Int32 nNewRgt ) : 131 SdUndoAction(pDoc), 132 mpPage (pThePage), 133 mnOldLeft (nOldLft), 134 mnOldRight (nOldRgt), 135 mnNewLeft (nNewLft), 136 mnNewRight (nNewRgt) 137 {} 138 virtual ~SdPageLRUndoAction(); 139 140 virtual void Undo(); 141 virtual void Redo(); 142 }; 143 144 /************************************************************************/ 145 146 class SdPageULUndoAction : public SdUndoAction 147 { 148 SdPage* mpPage; 149 150 sal_Int32 mnOldUpper; 151 sal_Int32 mnOldLower; 152 sal_Int32 mnNewUpper; 153 sal_Int32 mnNewLower; 154 155 public: 156 TYPEINFO(); 157 SdPageULUndoAction( SdDrawDocument* pDoc, SdPage* pThePage, 158 sal_Int32 nOldUpr, sal_Int32 nOldLwr, 159 sal_Int32 nNewUpr, sal_Int32 nNewLwr ) : 160 SdUndoAction(pDoc), 161 mpPage (pThePage), 162 mnOldUpper (nOldUpr), 163 mnOldLower (nOldLwr), 164 mnNewUpper (nNewUpr), 165 mnNewLower (nNewLwr) 166 {} 167 virtual ~SdPageULUndoAction(); 168 169 virtual void Undo(); 170 virtual void Redo(); 171 }; 172 173 174 175 #endif // _SD_UNDOPAGE_HXX 176 177