Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / svdundo.hxx
bloba6c9f2468c67034908e94f0afe627c3d4c2d4e8b
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_SVX_SVDUNDO_HXX
21 #define INCLUDED_SVX_SVDUNDO_HXX
23 #include <svl/solar.hrc>
24 #include <svl/undo.hxx>
25 #include <svl/style.hxx>
26 #include <tools/gen.hxx>
27 #include <svx/svdtypes.hxx>
28 #include <svx/svdsob.hxx>
29 #include <svx/svxdllapi.h>
31 class SfxItemSet;
32 class SfxStyleSheet;
33 class SdrView;
34 class SdrPageView;
35 class SdrModel;
36 class SdrObject;
37 class SdrPage;
38 class SdrObjList;
39 class SdrLayer;
40 class SdrLayerAdmin;
41 class SdrObjGeoData;
42 class OutlinerParaObject;
44 /**
45 * Abstract base class (ABC) for all UndoActions of DrawingEngine
48 class SVX_DLLPUBLIC SdrUndoAction : public SfxUndoAction
50 protected:
51 SdrModel& rMod;
53 protected:
54 SdrUndoAction(SdrModel& rNewMod)
55 : rMod(rNewMod)
58 public:
59 TYPEINFO_OVERRIDE();
60 virtual ~SdrUndoAction();
62 virtual bool CanRepeat(SfxRepeatTarget& rView) const SAL_OVERRIDE;
63 virtual void Repeat(SfxRepeatTarget& rView) SAL_OVERRIDE;
65 virtual OUString GetRepeatComment(SfxRepeatTarget& rView) const SAL_OVERRIDE;
66 virtual OUString GetSdrRepeatComment(SdrView& rView) const;
68 virtual bool CanSdrRepeat(SdrView& rView) const;
69 virtual void SdrRepeat(SdrView& rView);
72 /**
73 * Aggregation of arbitrarily many UndoActions to a single UndoAction.
74 * Undo() executes the single UndoActions backwards (LIFO, first the last
75 * ones attached), Redo() executes the UndoActions in the order they were
76 * added (FIFO).
79 class SVX_DLLPUBLIC SdrUndoGroup : public SdrUndoAction
81 protected:
82 std::vector<SdrUndoAction*> aBuf;
84 // No expanded description of the Action (contains %O)
85 OUString aComment;
86 OUString aObjDescription;
88 SdrRepeatFunc eFunction;
90 public:
91 SdrUndoGroup(SdrModel& rNewMod);
92 virtual ~SdrUndoGroup();
94 void Clear();
95 sal_uIntPtr GetActionCount() const { return aBuf.size(); }
96 SdrUndoAction* GetAction(sal_uIntPtr nNum) const { return aBuf[nNum]; }
97 void AddAction(SdrUndoAction* pAct);
99 void SetComment(const OUString& rStr) { aComment=rStr; }
100 void SetObjDescription(const OUString& rStr) { aObjDescription=rStr; }
101 virtual OUString GetComment() const SAL_OVERRIDE;
102 virtual OUString GetSdrRepeatComment(SdrView& rView) const SAL_OVERRIDE;
104 virtual void Undo() SAL_OVERRIDE;
105 virtual void Redo() SAL_OVERRIDE;
107 virtual bool CanSdrRepeat(SdrView& rView) const SAL_OVERRIDE;
108 virtual void SdrRepeat(SdrView& rView) SAL_OVERRIDE;
109 void SetRepeatFunction(SdrRepeatFunc eFunc) { eFunction=eFunc; }
110 SdrRepeatFunc GetRepeatFunction() const { return eFunction; }
114 * Abstract base class for all UndoActions that handle objects.
117 class SVX_DLLPUBLIC SdrUndoObj : public SdrUndoAction
119 protected:
120 SdrObject* pObj;
122 protected:
123 SdrUndoObj(SdrObject& rNewObj);
125 void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, bool bRepeat = false) const;
127 static SAL_WARN_UNUSED_RESULT OUString GetDescriptionStringForObject( const SdrObject& _rForObject, sal_uInt16 nStrCacheID, bool bRepeat = false );
129 // #94278# new method for evtl. PageChange at UNDO/REDO
130 void ImpShowPageOfThisObject();
134 * Changing the object attributes.
135 * Create Action right before setting the new attributes.
136 * Also for StyleSheets.
139 class SVX_DLLPUBLIC SdrUndoAttrObj : public SdrUndoObj
141 protected:
142 SfxItemSet* pUndoSet;
143 SfxItemSet* pRedoSet;
144 SfxItemSet* pRepeatSet;
146 // FIXME: Or should we better remember the StyleSheetNames?
147 rtl::Reference< SfxStyleSheetBase > mxUndoStyleSheet;
148 rtl::Reference< SfxStyleSheetBase > mxRedoStyleSheet;
149 bool bStyleSheet;
150 bool bHaveToTakeRedoSet;
152 // When assigning TextItems to a drawing object with text:
153 OutlinerParaObject* pTextUndo;
154 // #i8508#
155 // The text rescue mechanism needs also to be implemented for redo actions.
156 OutlinerParaObject* pTextRedo;
158 // If we have a group object:
159 SdrUndoGroup* pUndoGroup;
161 // Helper to ensure StyleSheet is in pool (provided by SdrModel from SdrObject)
162 static void ensureStyleSheetInStyleSheetPool(SfxStyleSheetBasePool& rStyleSheetPool, SfxStyleSheet& rSheet);
164 public:
165 SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1 = false, bool bSaveText = false);
166 virtual ~SdrUndoAttrObj();
167 virtual void Undo() SAL_OVERRIDE;
168 virtual void Redo() SAL_OVERRIDE;
170 virtual OUString GetComment() const SAL_OVERRIDE;
171 virtual OUString GetSdrRepeatComment(SdrView& rView) const SAL_OVERRIDE;
173 virtual void SdrRepeat(SdrView& rView) SAL_OVERRIDE;
174 virtual bool CanSdrRepeat(SdrView& rView) const SAL_OVERRIDE;
178 * Only moving of an object.
179 * Create Action right before moving.
182 class SVX_DLLPUBLIC SdrUndoMoveObj : public SdrUndoObj
184 protected:
185 Size aDistance; // Distance by which we move
187 public:
188 SdrUndoMoveObj(SdrObject& rNewObj): SdrUndoObj(rNewObj) {}
189 SdrUndoMoveObj(SdrObject& rNewObj, const Size& rDist): SdrUndoObj(rNewObj),aDistance(rDist) {}
190 virtual ~SdrUndoMoveObj();
192 void SetDistance(const Size& rDist) { aDistance=rDist; }
193 const Size& GetDistance() const { return aDistance; }
195 virtual void Undo() SAL_OVERRIDE;
196 virtual void Redo() SAL_OVERRIDE;
198 virtual OUString GetComment() const SAL_OVERRIDE;
199 virtual OUString GetSdrRepeatComment(SdrView& rView) const SAL_OVERRIDE;
201 virtual void SdrRepeat(SdrView& rView) SAL_OVERRIDE;
202 virtual bool CanSdrRepeat(SdrView& rView) const SAL_OVERRIDE;
206 * Changing the geometry of an object.
207 * Create Action right before the geometric transformation.
210 class SVX_DLLPUBLIC SdrUndoGeoObj : public SdrUndoObj
212 protected:
213 SdrObjGeoData* pUndoGeo;
214 SdrObjGeoData* pRedoGeo;
215 // If we have a group object:
216 SdrUndoGroup* pUndoGroup;
218 public:
219 SdrUndoGeoObj(SdrObject& rNewObj);
220 virtual ~SdrUndoGeoObj();
222 virtual void Undo() SAL_OVERRIDE;
223 virtual void Redo() SAL_OVERRIDE;
225 virtual OUString GetComment() const SAL_OVERRIDE;
229 * Manipulation of an ObjList: New Object, DeleteObj, SetObjZLevel, Grouping, ...
230 * Abstract base class.
233 class SVX_DLLPUBLIC SdrUndoObjList : public SdrUndoObj {
234 class ObjListListener;
235 friend class ObjListListener;
237 private:
238 bool bOwner;
240 protected:
241 SdrObjList* pObjList;
242 SdrView* pView; // To be able to re-create the selection for a
243 SdrPageView* pPageView; // for a ObjDel, Undo
244 sal_uInt32 nOrdNum;
246 protected:
247 SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect = false);
248 virtual ~SdrUndoObjList();
250 void SetView(SdrView* pView1, SdrPageView* pPageView1) { pView=pView1; pPageView=pPageView1; }
251 bool IsOwner() { return bOwner; }
252 void SetOwner(bool bNew);
254 private:
255 sal_uInt32 GetOrdNum() const { return nOrdNum;}
256 void SetOrdNum(sal_uInt32 nOrdNum_);
260 * Removing an Object from an ObjectList.
261 * To be used with corresponding Inserts within a UndoGroup.
263 * Create Action before removing from the ObjList.
266 class SVX_DLLPUBLIC SdrUndoRemoveObj : public SdrUndoObjList
268 public:
269 SdrUndoRemoveObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
270 : SdrUndoObjList(rNewObj,bOrdNumDirect) {}
272 virtual void Undo() SAL_OVERRIDE;
273 virtual void Redo() SAL_OVERRIDE;
275 virtual ~SdrUndoRemoveObj();
279 * Inserting Objects into a ObjectList.
280 * Use with corresponding Removes within an UndoGroup.
281 * Create Action before removal from ObjList.
284 class SVX_DLLPUBLIC SdrUndoInsertObj : public SdrUndoObjList
286 public:
287 SdrUndoInsertObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
288 : SdrUndoObjList(rNewObj,bOrdNumDirect) {}
290 virtual void Undo() SAL_OVERRIDE;
291 virtual void Redo() SAL_OVERRIDE;
295 * Deleting an Object.
296 * Create Action before removing from ObjList.
299 class SVX_DLLPUBLIC SdrUndoDelObj : public SdrUndoRemoveObj
301 public:
302 SdrUndoDelObj(SdrObject& rNewObj, bool bOrdNumDirect = false);
304 virtual void Undo() SAL_OVERRIDE;
305 virtual void Redo() SAL_OVERRIDE;
307 virtual OUString GetComment() const SAL_OVERRIDE;
308 virtual OUString GetSdrRepeatComment(SdrView& rView) const SAL_OVERRIDE;
310 virtual void SdrRepeat(SdrView& rView) SAL_OVERRIDE;
311 virtual bool CanSdrRepeat(SdrView& rView) const SAL_OVERRIDE;
315 * Inserting a NEW Object.
316 * Create Actio after insertion into the ObjList.
319 class SVX_DLLPUBLIC SdrUndoNewObj : public SdrUndoInsertObj
321 public:
322 SdrUndoNewObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
323 : SdrUndoInsertObj(rNewObj,bOrdNumDirect) {}
325 virtual void Undo() SAL_OVERRIDE;
326 virtual void Redo() SAL_OVERRIDE;
328 virtual OUString GetComment() const SAL_OVERRIDE;
330 static OUString GetComment(const SdrObject& _rForObject);
334 * Replacing an Object.
335 * Create Action before Replace in ObjList.
338 class SVX_DLLPUBLIC SdrUndoReplaceObj : public SdrUndoObj
340 bool bOldOwner;
341 bool bNewOwner;
343 protected:
344 SdrObjList* pObjList;
345 sal_uInt32 nOrdNum;
346 SdrObject* pNewObj;
348 public:
349 SdrUndoReplaceObj(SdrObject& rOldObj1, SdrObject& rNewObj1, bool bOrdNumDirect = false);
350 virtual ~SdrUndoReplaceObj();
352 virtual void Undo() SAL_OVERRIDE;
353 virtual void Redo() SAL_OVERRIDE;
355 bool IsNewOwner() { return bNewOwner; }
356 void SetNewOwner(bool bNew);
358 bool IsOldOwner() { return bOldOwner; }
359 void SetOldOwner(bool bNew);
363 * Copying an Object.
364 * Create Action before inserting into the ObjList.
367 class SdrUndoCopyObj : public SdrUndoNewObj
369 public:
370 SdrUndoCopyObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
371 : SdrUndoNewObj(rNewObj,bOrdNumDirect) {}
373 virtual OUString GetComment() const SAL_OVERRIDE;
376 class SdrUndoObjOrdNum : public SdrUndoObj
378 protected:
379 sal_uInt32 nOldOrdNum;
380 sal_uInt32 nNewOrdNum;
382 public:
383 SdrUndoObjOrdNum(SdrObject& rNewObj, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1);
385 virtual void Undo() SAL_OVERRIDE;
386 virtual void Redo() SAL_OVERRIDE;
388 virtual OUString GetComment() const SAL_OVERRIDE;
392 // #i11702#
394 class SVX_DLLPUBLIC SdrUndoObjectLayerChange : public SdrUndoObj
396 protected:
397 SdrLayerID maOldLayer;
398 SdrLayerID maNewLayer;
400 public:
401 SdrUndoObjectLayerChange(SdrObject& rObj, SdrLayerID aOldLayer, SdrLayerID aNewLayer);
403 virtual void Undo() SAL_OVERRIDE;
404 virtual void Redo() SAL_OVERRIDE;
407 class SVX_DLLPUBLIC SdrUndoObjSetText : public SdrUndoObj
409 protected:
410 OutlinerParaObject* pOldText;
411 OutlinerParaObject* pNewText;
412 bool bNewTextAvailable;
413 bool bEmptyPresObj;
414 sal_Int32 mnText;
416 public:
417 SdrUndoObjSetText(SdrObject& rNewObj, sal_Int32 nText );
418 virtual ~SdrUndoObjSetText();
420 bool IsDifferent() const { return pOldText!=pNewText; }
421 void AfterSetText();
423 virtual void Undo() SAL_OVERRIDE;
424 virtual void Redo() SAL_OVERRIDE;
426 virtual OUString GetComment() const SAL_OVERRIDE;
427 virtual OUString GetSdrRepeatComment(SdrView& rView) const SAL_OVERRIDE;
429 virtual void SdrRepeat(SdrView& rView) SAL_OVERRIDE;
430 virtual bool CanSdrRepeat(SdrView& rView) const SAL_OVERRIDE;
434 * Implement Title/Description Elements UI for Writer
435 * text frames, graphics and embedded objects (#i73249#)
437 class SdrUndoObjStrAttr : public SdrUndoObj
439 public:
440 enum ObjStrAttrType
442 OBJ_NAME,
443 OBJ_TITLE,
444 OBJ_DESCRIPTION
447 protected:
448 const ObjStrAttrType meObjStrAttr;
449 const OUString msOldStr;
450 const OUString msNewStr;
452 public:
453 SdrUndoObjStrAttr( SdrObject& rNewObj,
454 const ObjStrAttrType eObjStrAttr,
455 const OUString& sOldStr,
456 const OUString& sNewStr);
458 virtual void Undo() SAL_OVERRIDE;
459 virtual void Redo() SAL_OVERRIDE;
461 virtual OUString GetComment() const SAL_OVERRIDE;
466 * Layer
470 * Abstract base class for all UndoActions that have something to do with SdrLayer.
473 class SdrUndoLayer : public SdrUndoAction
475 protected:
476 SdrLayer* pLayer;
477 SdrLayerAdmin* pLayerAdmin;
478 sal_uInt16 nNum;
479 bool bItsMine;
481 protected:
482 SdrUndoLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
483 virtual ~SdrUndoLayer();
487 * Inserting a new Layer.
488 * Create Action after Insertion.
491 class SdrUndoNewLayer : public SdrUndoLayer
493 public:
494 SdrUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel)
495 : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel) {}
497 virtual void Undo() SAL_OVERRIDE;
498 virtual void Redo() SAL_OVERRIDE;
500 virtual OUString GetComment() const SAL_OVERRIDE;
504 * Deleting a Layer.
505 * Create Action before the Remove.
508 class SdrUndoDelLayer : public SdrUndoLayer
510 public:
511 SdrUndoDelLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel)
512 : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel) { bItsMine=true; }
514 virtual void Undo() SAL_OVERRIDE;
515 virtual void Redo() SAL_OVERRIDE;
517 virtual OUString GetComment() const SAL_OVERRIDE;
521 * Moving a Layer.
522 * Create Action before the Move.
525 class SdrUndoMoveLayer : public SdrUndoLayer
527 sal_uInt16 nNeuPos;
529 public:
530 SdrUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNeuPos1)
531 : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel), nNeuPos(nNeuPos1) {}
533 virtual void Undo() SAL_OVERRIDE;
534 virtual void Redo() SAL_OVERRIDE;
536 virtual OUString GetComment() const SAL_OVERRIDE;
541 * Pages
545 * ABC for all UndoActions that have something to do with SdrPages.
548 class SVX_DLLPUBLIC SdrUndoPage : public SdrUndoAction
550 protected:
551 SdrPage& mrPage;
553 protected:
554 void ImpInsertPage(sal_uInt16 nNum);
555 void ImpRemovePage(sal_uInt16 nNum);
556 void ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum);
558 protected:
559 SdrUndoPage(SdrPage& rNewPg);
561 static void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 n=0, bool bRepeat = false);
565 * ABC for manipulation of a PageList: New Page, DeletePage, MovePage (ChangePageNum).
568 class SVX_DLLPUBLIC SdrUndoPageList : public SdrUndoPage
570 protected:
571 sal_uInt16 nPageNum;
573 // It's possible that the object is re-assigned during a Undo/Redo.
574 // The Page is deleted in the dtor, if bItsMine==TRUE
575 bool bItsMine;
577 protected:
578 SdrUndoPageList(SdrPage& rNewPg);
579 virtual ~SdrUndoPageList();
583 * Deleting a Page.
584 * Create Action before removing from the List.
587 class SVX_DLLPUBLIC SdrUndoDelPage : public SdrUndoPageList
589 // When deleting a MasterPage, we remember all relations of the
590 // Character Page with the MasterPage in this UndoGroup.
591 SdrUndoGroup* pUndoGroup;
593 public:
594 SdrUndoDelPage(SdrPage& rNewPg);
595 virtual ~SdrUndoDelPage();
597 virtual void Undo() SAL_OVERRIDE;
598 virtual void Redo() SAL_OVERRIDE;
600 virtual OUString GetComment() const SAL_OVERRIDE;
601 virtual OUString GetSdrRepeatComment(SdrView& rView) const SAL_OVERRIDE;
603 virtual void SdrRepeat(SdrView& rView) SAL_OVERRIDE;
604 virtual bool CanSdrRepeat(SdrView& rView) const SAL_OVERRIDE;
608 * Inserting a new Page.
609 * Create Action after inserting into the List.
612 class SVX_DLLPUBLIC SdrUndoNewPage : public SdrUndoPageList
614 public:
615 SdrUndoNewPage(SdrPage& rNewPg): SdrUndoPageList(rNewPg) {}
617 virtual void Undo() SAL_OVERRIDE;
618 virtual void Redo() SAL_OVERRIDE;
620 virtual OUString GetComment() const SAL_OVERRIDE;
624 * Copying a Page.
625 * Create Action after inserting into the List.
628 class SdrUndoCopyPage : public SdrUndoNewPage
630 public:
631 SdrUndoCopyPage(SdrPage& rNewPg): SdrUndoNewPage(rNewPg) {}
633 virtual OUString GetComment() const SAL_OVERRIDE;
634 virtual OUString GetSdrRepeatComment(SdrView& rView) const SAL_OVERRIDE;
636 virtual void SdrRepeat(SdrView& rView) SAL_OVERRIDE;
637 virtual bool CanSdrRepeat(SdrView& rView) const SAL_OVERRIDE;
641 * Moving a Page within the List.
642 * Create Action before moving the Page.
645 class SVX_DLLPUBLIC SdrUndoSetPageNum : public SdrUndoPage
647 protected:
648 sal_uInt16 nOldPageNum;
649 sal_uInt16 nNewPageNum;
651 public:
652 SdrUndoSetPageNum(SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1)
653 : SdrUndoPage(rNewPg),nOldPageNum(nOldPageNum1),nNewPageNum(nNewPageNum1) {}
655 virtual void Undo() SAL_OVERRIDE;
656 virtual void Redo() SAL_OVERRIDE;
658 virtual OUString GetComment() const SAL_OVERRIDE;
663 * Masterpages
667 * ABC for all UndoActions that have something to do with
668 * MasterPage relationships.
671 class SdrUndoPageMasterPage : public SdrUndoPage
673 protected:
674 bool mbOldHadMasterPage;
675 SetOfByte maOldSet;
676 sal_uInt16 maOldMasterPageNumber;
678 protected:
679 SdrUndoPageMasterPage(SdrPage& rChangedPage);
681 public:
682 SVX_DLLPUBLIC virtual ~SdrUndoPageMasterPage();
686 * Removal of a MasterPage from a Character Page.
687 * Create Action before removing the MasterPageDescriptor.
690 class SdrUndoPageRemoveMasterPage : public SdrUndoPageMasterPage
692 public:
693 SdrUndoPageRemoveMasterPage(SdrPage& rChangedPage);
695 virtual void Undo() SAL_OVERRIDE;
696 virtual void Redo() SAL_OVERRIDE;
698 virtual OUString GetComment() const SAL_OVERRIDE;
702 * Changing the MasterPageDescriptor (e.g. change of the VisibleLayer).
703 * Create Action before changing the MasterPageDescriptors.
706 class SVX_DLLPUBLIC SdrUndoPageChangeMasterPage : public SdrUndoPageMasterPage
708 protected:
709 bool mbNewHadMasterPage;
710 SetOfByte maNewSet;
711 sal_uInt16 maNewMasterPageNumber;
713 public:
714 SdrUndoPageChangeMasterPage(SdrPage& rChangedPage);
716 virtual void Undo() SAL_OVERRIDE;
717 virtual void Redo() SAL_OVERRIDE;
719 virtual OUString GetComment() const SAL_OVERRIDE;
725 * The SdrUndoFactory can be set and retrieved from the SdrModel.
726 * It is used by the drawing layer implementations to create undo actions.
727 * It can be used by applications to create application specific undo actions.
729 class SVX_DLLPUBLIC SdrUndoFactory
731 public:
732 // Shapes
733 virtual ~SdrUndoFactory();
734 virtual SdrUndoAction* CreateUndoMoveObject( SdrObject& rObject );
735 virtual SdrUndoAction* CreateUndoMoveObject( SdrObject& rObject, const Size& rDist );
736 virtual SdrUndoAction* CreateUndoGeoObject( SdrObject& rObject );
737 virtual SdrUndoAction* CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1 = false, bool bSaveText = false );
738 virtual SdrUndoAction* CreateUndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect = false);
739 virtual SdrUndoAction* CreateUndoInsertObject( SdrObject& rObject, bool bOrdNumDirect = false);
740 virtual SdrUndoAction* CreateUndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect = false);
741 virtual SdrUndoAction* CreateUndoNewObject( SdrObject& rObject, bool bOrdNumDirect = false);
742 virtual SdrUndoAction* CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect = false);
744 virtual SdrUndoAction* CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1);
746 virtual SdrUndoAction* CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect = false );
747 virtual SdrUndoAction* CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer );
748 virtual SdrUndoAction* CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText );
750 // Implement Title/Description Elements UI for Writer text frames, graphics and embedded objects (#i73249#)
751 static SdrUndoAction* CreateUndoObjectStrAttr( SdrObject& rObject,
752 SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType,
753 const OUString& sOldStr,
754 const OUString& sNewStr );
756 // Layer
757 virtual SdrUndoAction* CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
758 virtual SdrUndoAction* CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
759 virtual SdrUndoAction* CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNeuPos1);
761 // Page
762 virtual SdrUndoAction* CreateUndoDeletePage(SdrPage& rPage);
763 virtual SdrUndoAction* CreateUndoNewPage(SdrPage& rPage);
764 virtual SdrUndoAction* CreateUndoCopyPage(SdrPage& rPage);
765 virtual SdrUndoAction* CreateUndoSetPageNum(SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1);
767 // Master page
768 virtual SdrUndoAction* CreateUndoPageRemoveMasterPage(SdrPage& rChangedPage);
769 virtual SdrUndoAction* CreateUndoPageChangeMasterPage(SdrPage& rChangedPage);
772 #endif // INCLUDED_SVX_SVDUNDO_HXX
774 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */