cid#1607171 Data race condition
[LibreOffice.git] / sd / source / ui / inc / undopage.hxx
blob87d5b5b21748459a068d6c74f9441293b8ba448c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include <tools/gen.hxx>
23 #include <vcl/prntypes.hxx>
25 #include <sdundo.hxx>
27 class SdDrawDocument;
28 class SdPage;
30 /************************************************************************/
32 class SdPageFormatUndoAction final : public SdUndoAction
34 SdPage* mpPage;
36 Size maOldSize;
37 sal_Int32 mnOldLeft;
38 sal_Int32 mnOldRight;
39 sal_Int32 mnOldUpper;
40 sal_Int32 mnOldLower;
41 Orientation meOldOrientation;
42 sal_uInt16 mnOldPaperBin;
43 bool mbOldFullSize;
45 Size maNewSize;
46 sal_Int32 mnNewLeft;
47 sal_Int32 mnNewRight;
48 sal_Int32 mnNewUpper;
49 sal_Int32 mnNewLower;
50 bool mbNewScale;
51 Orientation meNewOrientation;
52 sal_uInt16 mnNewPaperBin;
53 bool mbNewFullSize;
55 public:
56 SdPageFormatUndoAction( SdDrawDocument* pDoc,
57 SdPage* pThePage,
58 const Size& rOldSz,
59 sal_Int32 nOldLft,
60 sal_Int32 nOldRgt,
61 sal_Int32 nOldUpr,
62 sal_Int32 nOldLwr,
63 Orientation eOldOrient,
64 sal_uInt16 nOPaperBin,
65 bool bOFullSize,
67 const Size& rNewSz,
68 sal_Int32 nNewLft,
69 sal_Int32 nNewRgt,
70 sal_Int32 nNewUpr,
71 sal_Int32 nNewLwr,
72 bool bNewScl,
73 Orientation eNewOrient,
74 sal_uInt16 nNPaperBin,
75 bool bNFullSize
76 ) :
77 SdUndoAction(pDoc),
78 mpPage (pThePage),
79 maOldSize (rOldSz),
80 mnOldLeft (nOldLft),
81 mnOldRight (nOldRgt),
82 mnOldUpper (nOldUpr),
83 mnOldLower (nOldLwr),
84 meOldOrientation(eOldOrient),
85 mnOldPaperBin (nOPaperBin),
86 mbOldFullSize (bOFullSize),
88 maNewSize (rNewSz),
89 mnNewLeft (nNewLft),
90 mnNewRight (nNewRgt),
91 mnNewUpper (nNewUpr),
92 mnNewLower (nNewLwr),
93 mbNewScale (bNewScl),
94 meNewOrientation(eNewOrient),
95 mnNewPaperBin (nNPaperBin),
96 mbNewFullSize (bNFullSize)
99 virtual ~SdPageFormatUndoAction() override;
101 virtual void Undo() override;
102 virtual void Redo() override;
105 /************************************************************************/
107 class SdPageLRUndoAction final : public SdUndoAction
109 SdPage* mpPage;
111 sal_Int32 mnOldLeft;
112 sal_Int32 mnOldRight;
113 sal_Int32 mnNewLeft;
114 sal_Int32 mnNewRight;
116 public:
117 SdPageLRUndoAction( SdDrawDocument* pDoc, SdPage* pThePage,
118 sal_Int32 nOldLft, sal_Int32 nOldRgt,
119 sal_Int32 nNewLft, sal_Int32 nNewRgt ) :
120 SdUndoAction(pDoc),
121 mpPage (pThePage),
122 mnOldLeft (nOldLft),
123 mnOldRight (nOldRgt),
124 mnNewLeft (nNewLft),
125 mnNewRight (nNewRgt)
127 virtual ~SdPageLRUndoAction() override;
129 virtual void Undo() override;
130 virtual void Redo() override;
133 /************************************************************************/
135 class SdPageULUndoAction final : public SdUndoAction
137 SdPage* mpPage;
139 sal_Int32 mnOldUpper;
140 sal_Int32 mnOldLower;
141 sal_Int32 mnNewUpper;
142 sal_Int32 mnNewLower;
144 public:
145 SdPageULUndoAction( SdDrawDocument* pDoc, SdPage* pThePage,
146 sal_Int32 nOldUpr, sal_Int32 nOldLwr,
147 sal_Int32 nNewUpr, sal_Int32 nNewLwr ) :
148 SdUndoAction(pDoc),
149 mpPage (pThePage),
150 mnOldUpper (nOldUpr),
151 mnOldLower (nOldLwr),
152 mnNewUpper (nNewUpr),
153 mnNewLower (nNewLwr)
155 virtual ~SdPageULUndoAction() override;
157 virtual void Undo() override;
158 virtual void Redo() override;
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */