1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: undoobjects.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SD_UNDOOBJECTS_HXX
32 #define _SD_UNDOOBJECTS_HXX
34 #include <svx/svdundo.hxx>
35 #include <svx/svdpage.hxx>
36 #include <svx/svdobj.hxx>
46 ///////////////////////////////////////////////////////////////////////
48 class UndoRemovePresObjectImpl
51 UndoRemovePresObjectImpl( SdrObject
& rObject
);
52 virtual ~UndoRemovePresObjectImpl();
58 SfxUndoAction
* mpUndoUsercall
;
59 SfxUndoAction
* mpUndoAnimation
;
60 SfxUndoAction
* mpUndoPresObj
;
63 ///////////////////////////////////////////////////////////////////////
65 class UndoRemoveObject
: public SdrUndoRemoveObj
, public UndoRemovePresObjectImpl
68 UndoRemoveObject( SdrObject
& rObject
, bool bOrdNumDirect
);
74 SdrObjectWeakRef mxSdrObject
;
77 ///////////////////////////////////////////////////////////////////////
79 class UndoDeleteObject
: public SdrUndoDelObj
, public UndoRemovePresObjectImpl
82 UndoDeleteObject( SdrObject
& rObject
, bool bOrdNumDirect
);
88 SdrObjectWeakRef mxSdrObject
;
91 ///////////////////////////////////////////////////////////////////////
93 class UndoReplaceObject
: public SdrUndoReplaceObj
, public UndoRemovePresObjectImpl
96 UndoReplaceObject( SdrObject
& rOldObject
, SdrObject
& rNewObject
, bool bOrdNumDirect
);
102 SdrObjectWeakRef mxSdrObject
;
105 ///////////////////////////////////////////////////////////////////////
107 class UndoObjectSetText
: public SdrUndoObjSetText
110 UndoObjectSetText( SdrObject
& rNewObj
, sal_Int32 nText
);
111 virtual ~UndoObjectSetText();
117 SfxUndoAction
* mpUndoAnimation
;
118 bool mbNewEmptyPresObj
;
119 SdrObjectWeakRef mxSdrObject
;
122 //////////////////////////////////////////////////////////////////////////////
123 // Undo for SdrObject::SetUserCall()
125 class UndoObjectUserCall
: public SdrUndoObj
128 UndoObjectUserCall(SdrObject
& rNewObj
);
134 SdrObjUserCall
* mpOldUserCall
;
135 SdrObjUserCall
* mpNewUserCall
;
136 SdrObjectWeakRef mxSdrObject
;
139 //////////////////////////////////////////////////////////////////////////////
140 // Undo for SdPage::InsertPresObj() and SdPage::RemovePresObj()
142 class UndoObjectPresentationKind
: public SdrUndoObj
145 UndoObjectPresentationKind(SdrObject
& rObject
);
151 PresObjKind meOldKind
;
152 PresObjKind meNewKind
;
153 SdrPageWeakRef mxPage
;
154 SdrObjectWeakRef mxSdrObject
;
157 //////////////////////////////////////////////////////////////////////////////
158 // Restores correct position and size for presentation shapes with user call
161 class UndoAutoLayoutPosAndSize
: public SfxUndoAction
164 UndoAutoLayoutPosAndSize( SdPage
& rPage
);
170 SdrPageWeakRef mxPage
;
173 //////////////////////////////////////////////////////////////////////////////
175 class UndoGeoObject
: public SdrUndoGeoObj
178 UndoGeoObject( SdrObject
& rNewObj
);
184 SdrPageWeakRef mxPage
;
185 SdrObjectWeakRef mxSdrObject
;
188 //////////////////////////////////////////////////////////////////////////////
190 class UndoAttrObject
: public SdrUndoAttrObj
193 UndoAttrObject( SdrObject
& rObject
, bool bStyleSheet1
, bool bSaveText
);
199 SdrPageWeakRef mxPage
;
200 SdrObjectWeakRef mxSdrObject
;
205 #endif // _SD_UNDOOBJECTS_HXX