fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sd / inc / undo / undoobjects.hxx
blobb05c7f605dfeb771e42cf5dc4567851d302ae371
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 #ifndef INCLUDED_SD_INC_UNDO_UNDOOBJECTS_HXX
21 #define INCLUDED_SD_INC_UNDO_UNDOOBJECTS_HXX
23 #include <svx/svdundo.hxx>
24 #include <svx/svdpage.hxx>
25 #include <svx/svdobj.hxx>
26 #include "pres.hxx"
28 class SdrObjUserCall;
29 class SdPage;
31 namespace sd
34 class UndoRemovePresObjectImpl
36 protected:
37 UndoRemovePresObjectImpl( SdrObject& rObject );
38 virtual ~UndoRemovePresObjectImpl();
40 virtual void Undo();
41 virtual void Redo();
43 private:
44 SfxUndoAction* mpUndoUsercall;
45 SfxUndoAction* mpUndoAnimation;
46 SfxUndoAction* mpUndoPresObj;
49 class UndoRemoveObject : public SdrUndoRemoveObj, public UndoRemovePresObjectImpl
51 public:
52 UndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect );
54 virtual void Undo() SAL_OVERRIDE;
55 virtual void Redo() SAL_OVERRIDE;
57 private:
58 SdrObjectWeakRef mxSdrObject;
61 class UndoDeleteObject : public SdrUndoDelObj, public UndoRemovePresObjectImpl
63 public:
64 UndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect );
66 virtual void Undo() SAL_OVERRIDE;
67 virtual void Redo() SAL_OVERRIDE;
69 private:
70 SdrObjectWeakRef mxSdrObject;
73 class UndoReplaceObject : public SdrUndoReplaceObj, public UndoRemovePresObjectImpl
75 public:
76 UndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect );
78 virtual void Undo() SAL_OVERRIDE;
79 virtual void Redo() SAL_OVERRIDE;
81 private:
82 SdrObjectWeakRef mxSdrObject;
85 class UndoObjectSetText : public SdrUndoObjSetText
87 public:
88 UndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText );
89 virtual ~UndoObjectSetText();
91 virtual void Undo() SAL_OVERRIDE;
92 virtual void Redo() SAL_OVERRIDE;
94 private:
95 SfxUndoAction* mpUndoAnimation;
96 bool mbNewEmptyPresObj;
97 SdrObjectWeakRef mxSdrObject;
100 // Undo for SdrObject::SetUserCall()
102 class UndoObjectUserCall : public SdrUndoObj
104 public:
105 UndoObjectUserCall(SdrObject& rNewObj);
107 virtual void Undo() SAL_OVERRIDE;
108 virtual void Redo() SAL_OVERRIDE;
110 protected:
111 SdrObjUserCall* mpOldUserCall;
112 SdrObjUserCall* mpNewUserCall;
113 SdrObjectWeakRef mxSdrObject;
116 // Undo for SdPage::InsertPresObj() and SdPage::RemovePresObj()
118 class UndoObjectPresentationKind : public SdrUndoObj
120 public:
121 UndoObjectPresentationKind(SdrObject& rObject);
123 virtual void Undo() SAL_OVERRIDE;
124 virtual void Redo() SAL_OVERRIDE;
126 protected:
127 PresObjKind meOldKind;
128 PresObjKind meNewKind;
129 SdrPageWeakRef mxPage;
130 SdrObjectWeakRef mxSdrObject;
133 // Restores correct position and size for presentation shapes with user call
134 // on undo
136 class UndoAutoLayoutPosAndSize : public SfxUndoAction
138 public:
139 UndoAutoLayoutPosAndSize( SdPage& rPage );
141 virtual void Undo() SAL_OVERRIDE;
142 virtual void Redo() SAL_OVERRIDE;
144 protected:
145 SdrPageWeakRef mxPage;
148 class UndoGeoObject : public SdrUndoGeoObj
150 public:
151 UndoGeoObject( SdrObject& rNewObj );
153 virtual void Undo() SAL_OVERRIDE;
154 virtual void Redo() SAL_OVERRIDE;
156 protected:
157 SdrPageWeakRef mxPage;
158 SdrObjectWeakRef mxSdrObject;
161 class UndoAttrObject : public SdrUndoAttrObj
163 public:
164 UndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText );
166 virtual void Undo() SAL_OVERRIDE;
167 virtual void Redo() SAL_OVERRIDE;
169 protected:
170 SdrPageWeakRef mxPage;
171 SdrObjectWeakRef mxSdrObject;
174 } // namespace sd
176 #endif // INCLUDED_SD_INC_UNDO_UNDOOBJECTS_HXX
178 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */