1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 _SD_UNDOOBJECTS_HXX
21 #define _SD_UNDOOBJECTS_HXX
23 #include <svx/svdundo.hxx>
24 #include <svx/svdpage.hxx>
25 #include <svx/svdobj.hxx>
33 ///////////////////////////////////////////////////////////////////////
35 class UndoRemovePresObjectImpl
38 UndoRemovePresObjectImpl( SdrObject
& rObject
);
39 virtual ~UndoRemovePresObjectImpl();
45 SfxUndoAction
* mpUndoUsercall
;
46 SfxUndoAction
* mpUndoAnimation
;
47 SfxUndoAction
* mpUndoPresObj
;
50 ///////////////////////////////////////////////////////////////////////
52 class UndoRemoveObject
: public SdrUndoRemoveObj
, public UndoRemovePresObjectImpl
55 UndoRemoveObject( SdrObject
& rObject
, bool bOrdNumDirect
);
61 SdrObjectWeakRef mxSdrObject
;
64 ///////////////////////////////////////////////////////////////////////
66 class UndoDeleteObject
: public SdrUndoDelObj
, public UndoRemovePresObjectImpl
69 UndoDeleteObject( SdrObject
& rObject
, bool bOrdNumDirect
);
75 SdrObjectWeakRef mxSdrObject
;
78 ///////////////////////////////////////////////////////////////////////
80 class UndoReplaceObject
: public SdrUndoReplaceObj
, public UndoRemovePresObjectImpl
83 UndoReplaceObject( SdrObject
& rOldObject
, SdrObject
& rNewObject
, bool bOrdNumDirect
);
89 SdrObjectWeakRef mxSdrObject
;
92 ///////////////////////////////////////////////////////////////////////
94 class UndoObjectSetText
: public SdrUndoObjSetText
97 UndoObjectSetText( SdrObject
& rNewObj
, sal_Int32 nText
);
98 virtual ~UndoObjectSetText();
104 SfxUndoAction
* mpUndoAnimation
;
105 bool mbNewEmptyPresObj
;
106 SdrObjectWeakRef mxSdrObject
;
109 //////////////////////////////////////////////////////////////////////////////
110 // Undo for SdrObject::SetUserCall()
112 class UndoObjectUserCall
: public SdrUndoObj
115 UndoObjectUserCall(SdrObject
& rNewObj
);
121 SdrObjUserCall
* mpOldUserCall
;
122 SdrObjUserCall
* mpNewUserCall
;
123 SdrObjectWeakRef mxSdrObject
;
126 //////////////////////////////////////////////////////////////////////////////
127 // Undo for SdPage::InsertPresObj() and SdPage::RemovePresObj()
129 class UndoObjectPresentationKind
: public SdrUndoObj
132 UndoObjectPresentationKind(SdrObject
& rObject
);
138 PresObjKind meOldKind
;
139 PresObjKind meNewKind
;
140 SdrPageWeakRef mxPage
;
141 SdrObjectWeakRef mxSdrObject
;
144 //////////////////////////////////////////////////////////////////////////////
145 // Restores correct position and size for presentation shapes with user call
148 class UndoAutoLayoutPosAndSize
: public SfxUndoAction
151 UndoAutoLayoutPosAndSize( SdPage
& rPage
);
157 SdrPageWeakRef mxPage
;
160 //////////////////////////////////////////////////////////////////////////////
162 class UndoGeoObject
: public SdrUndoGeoObj
165 UndoGeoObject( SdrObject
& rNewObj
);
171 SdrPageWeakRef mxPage
;
172 SdrObjectWeakRef mxSdrObject
;
175 //////////////////////////////////////////////////////////////////////////////
177 class UndoAttrObject
: public SdrUndoAttrObj
180 UndoAttrObject( SdrObject
& rObject
, bool bStyleSheet1
, bool bSaveText
);
186 SdrPageWeakRef mxPage
;
187 SdrObjectWeakRef mxSdrObject
;
192 #endif // _SD_UNDOOBJECTS_HXX
194 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */