LibreOffice Module svx (master)  1
svdundo.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #pragma once
21 
22 #include <config_options.h>
23 #include <sal/config.h>
24 
25 #include <memory>
26 #include <vector>
27 
28 #include <editeng/outlobj.hxx>
29 #include <svl/itemset.hxx>
30 #include <svl/undo.hxx>
31 #include <svl/style.hxx>
32 #include <tools/gen.hxx>
33 #include <svx/svdtypes.hxx>
34 #include <svx/svdsob.hxx>
35 #include <svx/svxdllapi.h>
36 #include <unotools/resmgr.hxx>
37 
38 class SfxItemSet;
39 class SfxPoolItem;
40 class SfxStyleSheet;
41 class SdrView;
42 class SdrPageView;
43 class SdrModel;
44 class SdrObject;
45 class SdrPage;
46 class SdrObjList;
47 class SdrLayer;
48 class SdrLayerAdmin;
49 class SdrObjGeoData;
50 class OutlinerParaObject;
51 
52 namespace svx { namespace diagram {
53  class DiagramDataState;
54 }}
55 
61 {
62 protected:
65 
66 protected:
67  SdrUndoAction(SdrModel& rNewMod);
68 
69 public:
70  virtual ~SdrUndoAction() override;
71 
72  virtual bool CanRepeat(SfxRepeatTarget& rView) const override;
73  virtual void Repeat(SfxRepeatTarget& rView) override;
74 
75  virtual OUString GetRepeatComment(SfxRepeatTarget& rView) const override;
76  virtual OUString GetSdrRepeatComment() const;
77 
78  virtual bool CanSdrRepeat(SdrView& rView) const;
79  virtual void SdrRepeat(SdrView& rView);
80 
82  ViewShellId GetViewShellId() const override;
83 };
84 
93 {
94  std::vector<std::unique_ptr<SdrUndoAction>> maActions;
95 
96  // No expanded description of the Action (contains %O)
97  OUString aComment;
98  OUString aObjDescription;
99 
101 
102 public:
103  SdrUndoGroup(SdrModel& rNewMod);
104  virtual ~SdrUndoGroup() override;
105 
106  sal_Int32 GetActionCount() const { return maActions.size(); }
107  SdrUndoAction* GetAction(sal_Int32 nNum) const { return maActions[nNum].get(); }
108  void AddAction(std::unique_ptr<SdrUndoAction> pAct);
109 
110  void SetComment(const OUString& rStr) { aComment=rStr; }
111  void SetObjDescription(const OUString& rStr) { aObjDescription=rStr; }
112  virtual OUString GetComment() const override;
113  virtual OUString GetSdrRepeatComment() const override;
114 
115  virtual void Undo() override;
116  virtual void Redo() override;
117 
118  virtual bool CanSdrRepeat(SdrView& rView) const override;
119  virtual void SdrRepeat(SdrView& rView) override;
120  void SetRepeatFunction(SdrRepeatFunc eFunc) { eFunction=eFunc; }
121 };
122 
128 {
129 protected:
131 
132 protected:
133  SdrUndoObj(SdrObject& rNewObj);
134 
135  OUString ImpGetDescriptionStr(TranslateId pStrCacheID, bool bRepeat = false) const;
136 
137  [[nodiscard]] static OUString GetDescriptionStringForObject( const SdrObject& _rForObject, TranslateId pStrCacheID, bool bRepeat = false );
138 
139  // #94278# new method for evtl. PageChange at UNDO/REDO
140  void ImpShowPageOfThisObject();
141 };
142 
150 {
151 protected:
152  std::optional<SfxItemSet> moUndoSet;
153  std::optional<SfxItemSet> moRedoSet;
154 
155  // FIXME: Or should we better remember the StyleSheetNames?
160 
161  // When assigning TextItems to a drawing object with text:
163  // #i8508#
164  // The text rescue mechanism needs also to be implemented for redo actions.
166 
167  // If we have a group object:
168  std::unique_ptr<SdrUndoGroup> pUndoGroup;
169 
170  // Helper to ensure StyleSheet is in pool (provided by SdrModel from SdrObject)
171  static void ensureStyleSheetInStyleSheetPool(SfxStyleSheetBasePool& rStyleSheetPool, SfxStyleSheet& rSheet);
172 
173 public:
174  SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1 = false, bool bSaveText = false);
175  virtual ~SdrUndoAttrObj() override;
176  virtual void Undo() override;
177  virtual void Redo() override;
178 
179  virtual OUString GetComment() const override;
180  virtual OUString GetSdrRepeatComment() const override;
181 };
182 
189 {
190  Size aDistance; // Distance by which we move
191 
192 public:
193  SdrUndoMoveObj(SdrObject& rNewObj, const Size& rDist): SdrUndoObj(rNewObj),aDistance(rDist) {}
194  virtual ~SdrUndoMoveObj() override;
195 
196  virtual void Undo() override;
197  virtual void Redo() override;
198 
199  virtual OUString GetComment() const override;
200  virtual OUString GetSdrRepeatComment() const override;
201 
202  virtual void SdrRepeat(SdrView& rView) override;
203  virtual bool CanSdrRepeat(SdrView& rView) const override;
204 };
205 
212 {
213  std::unique_ptr<SdrObjGeoData> pUndoGeo;
214  std::unique_ptr<SdrObjGeoData> pRedoGeo;
215  // If we have a group object:
216  std::unique_ptr<SdrUndoGroup> pUndoGroup;
219 
220 public:
221  SdrUndoGeoObj(SdrObject& rNewObj);
222  virtual ~SdrUndoGeoObj() override;
223 
224  virtual void Undo() override;
225  virtual void Redo() override;
226 
227  virtual OUString GetComment() const override;
228  void SetSkipChangeLayout(bool bOn) { mbSkipChangeLayout=bOn; }
229 };
230 
231 // Diagram ModelData changes
233 {
234  std::shared_ptr< svx::diagram::DiagramDataState > m_aStartState;
235  std::shared_ptr< svx::diagram::DiagramDataState > m_aEndState;
236 
237  void implUndoRedo(bool bUndo);
238 
239 public:
240  SdrUndoDiagramModelData(SdrObject& rNewObj, std::shared_ptr< svx::diagram::DiagramDataState >& rStartState);
241  virtual ~SdrUndoDiagramModelData() override;
242 
243  virtual void Undo() override;
244  virtual void Redo() override;
245 
246  virtual OUString GetComment() const override;
247 };
248 
255  class ObjListListener;
256  friend class ObjListListener;
257 
258 private:
259  bool bOwner;
260 
261 protected:
263  sal_uInt32 nOrdNum;
264 
265 protected:
266  SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect);
267  virtual ~SdrUndoObjList() override;
268 
269  bool IsOwner() const { return bOwner; }
270  void SetOwner(bool bNew);
271 };
272 
281 {
282 public:
283  SdrUndoRemoveObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
284  : SdrUndoObjList(rNewObj,bOrdNumDirect) {}
285 
286  virtual void Undo() override;
287  virtual void Redo() override;
288 
289  virtual ~SdrUndoRemoveObj() override;
290 };
291 
299 {
300 public:
301  SdrUndoInsertObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
302  : SdrUndoObjList(rNewObj,bOrdNumDirect) {}
303 
304  virtual void Undo() override;
305  virtual void Redo() override;
306 };
307 
314 {
315 public:
316  SdrUndoDelObj(SdrObject& rNewObj, bool bOrdNumDirect = false);
317 
318  virtual void Undo() override;
319  virtual void Redo() override;
320 
321  virtual OUString GetComment() const override;
322  virtual OUString GetSdrRepeatComment() const override;
323 
324  virtual void SdrRepeat(SdrView& rView) override;
325  virtual bool CanSdrRepeat(SdrView& rView) const override;
326 };
327 
334 {
335 public:
336  SdrUndoNewObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
337  : SdrUndoInsertObj(rNewObj,bOrdNumDirect) {}
338 
339  virtual void Undo() override;
340  virtual void Redo() override;
341 
342  virtual OUString GetComment() const override;
343 
344  static OUString GetComment(const SdrObject& _rForObject);
345 };
346 
353 {
354  bool bOldOwner;
355  bool bNewOwner;
356 
359 
360 public:
361  SdrUndoReplaceObj(SdrObject& rOldObj1, SdrObject& rNewObj1);
362  virtual ~SdrUndoReplaceObj() override;
363 
364  virtual void Undo() override;
365  virtual void Redo() override;
366 
367  bool IsNewOwner() const { return bNewOwner; }
368  void SetNewOwner(bool bNew);
369 
370  bool IsOldOwner() const { return bOldOwner; }
371  void SetOldOwner(bool bNew);
372 };
373 
379 class SdrUndoCopyObj final : public SdrUndoNewObj
380 {
381 public:
382  SdrUndoCopyObj(SdrObject& rNewObj, bool bOrdNumDirect)
383  : SdrUndoNewObj(rNewObj,bOrdNumDirect) {}
384 
385  virtual OUString GetComment() const override;
386 };
387 
388 class SdrUndoObjOrdNum final : public SdrUndoObj
389 {
390  sal_uInt32 nOldOrdNum;
391  sal_uInt32 nNewOrdNum;
392 
393 public:
394  SdrUndoObjOrdNum(SdrObject& rNewObj, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1);
395 
396  virtual void Undo() override;
397  virtual void Redo() override;
398 
399  virtual OUString GetComment() const override;
400 };
401 
402 class SdrUndoSort final : public SdrUndoAction
403 {
404 private:
405  ::std::vector<sal_Int32> m_OldSortOrder;
406  ::std::vector<sal_Int32> m_NewSortOrder;
407  sal_uInt16 const m_nPage;
408 
409  void Do(::std::vector<sal_Int32> & rSortOrder);
410 
411 public:
412  SdrUndoSort(const SdrPage & rPage,
413  ::std::vector<sal_Int32> const& rSortOrder);
414 
415  virtual void Undo() override;
416  virtual void Redo() override;
417 
418  virtual OUString GetComment() const override;
419 };
420 
421 // #i11702#
422 
424 {
427 
428 public:
429  SdrUndoObjectLayerChange(SdrObject& rObj, SdrLayerID aOldLayer, SdrLayerID aNewLayer);
430 
431  virtual void Undo() override;
432  virtual void Redo() override;
433 };
434 
436 {
437 protected:
444  sal_Int32 mnText;
445 
446 public:
447  SdrUndoObjSetText(SdrObject& rNewObj, sal_Int32 nText );
448  virtual ~SdrUndoObjSetText() override;
449 
450  bool IsDifferent() const;
451  void AfterSetText();
452 
453  virtual void Undo() override;
454  virtual void Redo() override;
455 
456  virtual OUString GetComment() const override;
457  virtual OUString GetSdrRepeatComment() const override;
458 
459  virtual void SdrRepeat(SdrView& rView) override;
460  virtual bool CanSdrRepeat(SdrView& rView) const override;
461 };
462 
467 class SdrUndoObjStrAttr final : public SdrUndoObj
468 {
469 public:
470  enum class ObjStrAttrType
471  {
472  Name,
473  Title,
475  };
476 
477  SdrUndoObjStrAttr( SdrObject& rNewObj,
478  const ObjStrAttrType eObjStrAttr,
479  const OUString& sOldStr,
480  const OUString& sNewStr);
481 
482  virtual void Undo() override;
483  virtual void Redo() override;
484 
485  virtual OUString GetComment() const override;
486 
487 private:
489  const OUString msOldStr;
490  const OUString msNewStr;
491 
492 };
493 
494 
495 /*
496  * Layer
497  */
498 
504 {
505 protected:
508  sal_uInt16 nNum;
509  bool bItsMine;
510 
511 protected:
512  SdrUndoLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
513  virtual ~SdrUndoLayer() override;
514 };
515 
521 class SdrUndoNewLayer final : public SdrUndoLayer
522 {
523 public:
524  SdrUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel)
525  : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel) {}
526 
527  virtual void Undo() override;
528  virtual void Redo() override;
529 
530  virtual OUString GetComment() const override;
531 };
532 
538 class SdrUndoDelLayer final : public SdrUndoLayer
539 {
540 public:
541  SdrUndoDelLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel)
542  : SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel) { bItsMine=true; }
543 
544  virtual void Undo() override;
545  virtual void Redo() override;
546 
547  virtual OUString GetComment() const override;
548 };
549 
550 /*
551  * Pages
552  */
553 
559 {
560 protected:
562 
563 protected:
564  void ImpInsertPage(sal_uInt16 nNum);
565  void ImpRemovePage(sal_uInt16 nNum);
566  void ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum);
567 
568 protected:
569  SdrUndoPage(SdrPage& rNewPg);
570  ~SdrUndoPage();
571 
572  static OUString ImpGetDescriptionStr(TranslateId pStrCacheID);
573 };
574 
580 {
581 protected:
582  sal_uInt16 nPageNum;
583 
584 protected:
585  SdrUndoPageList(SdrPage& rNewPg);
586  virtual ~SdrUndoPageList() override;
587 };
588 
595 {
596  // When deleting a MasterPage, we remember all relations of the
597  // Character Page with the MasterPage in this UndoGroup.
598  std::unique_ptr<SdrUndoGroup> pUndoGroup;
599  std::unique_ptr<SfxPoolItem> mpFillBitmapItem;
601 
602 public:
603  SdrUndoDelPage(SdrPage& rNewPg);
604  virtual ~SdrUndoDelPage() override;
605 
606  virtual void Undo() override;
607  virtual void Redo() override;
608 
609  virtual OUString GetComment() const override;
610  virtual OUString GetSdrRepeatComment() const override;
611 
612  virtual void SdrRepeat(SdrView& rView) override;
613  virtual bool CanSdrRepeat(SdrView& rView) const override;
614 
615 private:
616  void queryFillBitmap(const SfxItemSet &rItemSet);
617  void clearFillBitmap();
618  void restoreFillBitmap();
619 };
620 
627 {
628 public:
630 
631  virtual void Undo() override;
632  virtual void Redo() override;
633 
634  virtual OUString GetComment() const override;
635 };
636 
642 class SdrUndoCopyPage final : public SdrUndoNewPage
643 {
644 public:
646 
647  virtual OUString GetComment() const override;
648  virtual OUString GetSdrRepeatComment() const override;
649 
650  virtual void SdrRepeat(SdrView& rView) override;
651  virtual bool CanSdrRepeat(SdrView& rView) const override;
652 };
653 
659 class SdrUndoSetPageNum final : public SdrUndoPage
660 {
661  sal_uInt16 nOldPageNum;
662  sal_uInt16 nNewPageNum;
663 
664 public:
665  SdrUndoSetPageNum(SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1)
666  : SdrUndoPage(rNewPg),nOldPageNum(nOldPageNum1),nNewPageNum(nNewPageNum1) {}
667 
668  virtual void Undo() override;
669  virtual void Redo() override;
670 
671  virtual OUString GetComment() const override;
672 };
673 
674 
675 /*
676  * Masterpages
677  */
678 
685 {
686 protected:
690 
691 protected:
692  SdrUndoPageMasterPage(SdrPage& rChangedPage);
693 
694 public:
696 };
697 
704 {
705 public:
706  SdrUndoPageRemoveMasterPage(SdrPage& rChangedPage);
707 
708  virtual void Undo() override;
709  virtual void Redo() override;
710 
711  virtual OUString GetComment() const override;
712 };
713 
720 {
724 
725 public:
726  SdrUndoPageChangeMasterPage(SdrPage& rChangedPage);
727 
728  virtual void Undo() override;
729  virtual void Redo() override;
730 
731  virtual OUString GetComment() const override;
732 };
733 
734 
741 {
742 public:
743  // Shapes
744  virtual ~SdrUndoFactory();
745  virtual std::unique_ptr<SdrUndoAction> CreateUndoMoveObject( SdrObject& rObject, const Size& rDist );
746  virtual std::unique_ptr<SdrUndoAction> CreateUndoGeoObject( SdrObject& rObject );
747  virtual std::unique_ptr<SdrUndoAction> CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1 = false, bool bSaveText = false );
748  virtual std::unique_ptr<SdrUndoAction> CreateUndoRemoveObject(SdrObject& rObject);
749  virtual std::unique_ptr<SdrUndoAction> CreateUndoInsertObject( SdrObject& rObject, bool bOrdNumDirect = false);
750  virtual std::unique_ptr<SdrUndoAction> CreateUndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect = false);
751  virtual std::unique_ptr<SdrUndoAction> CreateUndoNewObject( SdrObject& rObject, bool bOrdNumDirect = false);
752  virtual std::unique_ptr<SdrUndoAction> CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect = false);
753 
754  virtual std::unique_ptr<SdrUndoAction> CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1);
755 
756  virtual std::unique_ptr<SdrUndoAction> CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject );
757  virtual std::unique_ptr<SdrUndoAction> CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer );
758  virtual std::unique_ptr<SdrUndoAction> CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText );
759 
760  // Implement Title/Description Elements UI for Writer text frames, graphics and embedded objects (#i73249#)
761  static std::unique_ptr<SdrUndoAction> CreateUndoObjectStrAttr( SdrObject& rObject,
762  SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType,
763  const OUString& sOldStr,
764  const OUString& sNewStr );
765 
766  // Diagram ModelData changes
767  virtual std::unique_ptr<SdrUndoAction> CreateUndoDiagramModelData( SdrObject& rObject, std::shared_ptr< svx::diagram::DiagramDataState >& rStartState );
768 
769  // Layer
770  virtual std::unique_ptr<SdrUndoAction> CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
771  virtual std::unique_ptr<SdrUndoAction> CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
772 
773  // Page
774  virtual std::unique_ptr<SdrUndoAction> CreateUndoDeletePage(SdrPage& rPage);
775  virtual std::unique_ptr<SdrUndoAction> CreateUndoNewPage(SdrPage& rPage);
776  virtual std::unique_ptr<SdrUndoAction> CreateUndoCopyPage(SdrPage& rPage);
777  virtual std::unique_ptr<SdrUndoAction> CreateUndoSetPageNum(SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1);
778  static std::unique_ptr<SdrUndoAction> CreateUndoSort(SdrPage& rPage, ::std::vector<sal_Int32> const& rSortOrder);
779 
780  // Master page
781  virtual std::unique_ptr<SdrUndoAction> CreateUndoPageRemoveMasterPage(SdrPage& rChangedPage);
782  virtual std::unique_ptr<SdrUndoAction> CreateUndoPageChangeMasterPage(SdrPage& rChangedPage);
783 };
784 
785 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Redo() override
Definition: svdundo.cxx:1345
Manipulation of an ObjList: New Object, DeleteObj, SetObjZLevel, Grouping, ...
Definition: svdundo.hxx:254
Inserting Objects into an ObjectList.
Definition: svdundo.hxx:298
virtual OUString GetComment() const override
Definition: svdundo.cxx:1332
OUString aComment
Definition: svdundo.hxx:97
sal_uInt32 nOldOrdNum
Definition: svdundo.hxx:390
virtual void Redo() override
Definition: svdundo.cxx:777
virtual void Redo() override
Definition: svdundo.cxx:1003
Inserting a new Page.
Definition: svdundo.hxx:626
Implement Title/Description Elements UI for Writer text frames, graphics and embedded objects (#i7324...
Definition: svdundo.hxx:467
void SetSkipChangeLayout(bool bOn)
Definition: svdundo.hxx:228
std::optional< SfxItemSet > moRedoSet
Definition: svdundo.hxx:153
virtual void Undo() override
Definition: svdundo.cxx:989
bool IsOwner() const
Definition: svdundo.hxx:269
SdrObjList * pObjList
Definition: svdundo.hxx:357
SdrUndoLayer(sal_uInt16 nLayerNum, SdrLayerAdmin &rNewLayerAdmin, SdrModel &rNewModel)
Definition: svdundo.cxx:1299
bool bItsMine
Definition: svdundo.hxx:509
virtual bool CanSdrRepeat(SdrView &rView) const
Definition: svdundo.cxx:91
ABC for all UndoActions that have something to do with SdrPages.
Definition: svdundo.hxx:558
sal_uInt16 nNewPageNum
Definition: svdundo.hxx:662
virtual void Undo()
virtual OUString GetComment() const override
Definition: svdundo.cxx:1017
SdrLayerIDSet maOldSet
Definition: svdundo.hxx:688
SdrUndoPage(SdrPage &rNewPg)
Definition: svdundo.cxx:1359
Abstract base class (ABC) for all UndoActions of DrawingEngine.
Definition: svdundo.hxx:60
SdrLayer * pLayer
Definition: svdundo.hxx:506
Deleting a Layer.
Definition: svdundo.hxx:538
Only moving of an object.
Definition: svdundo.hxx:188
std::unique_ptr< SdrUndoGroup > pUndoGroup
Definition: svdundo.hxx:168
virtual void Undo() override
Definition: svdundo.cxx:714
Changing the geometry of an object.
Definition: svdundo.hxx:211
virtual ~SdrUndoLayer() override
Definition: svdundo.cxx:1308
Removal of a MasterPage from a Character Page.
Definition: svdundo.hxx:703
sal_uInt16 const m_nPage
Definition: svdundo.hxx:407
virtual void SdrRepeat(SdrView &rView)
Definition: svdundo.cxx:96
std::optional< OutlinerParaObject > pNewText
Definition: svdundo.hxx:441
virtual void Redo() override
Definition: svdundo.cxx:1325
ABC for manipulation of a PageList: New Page, DeletePage, MovePage (ChangePageNum).
Definition: svdundo.hxx:579
All geometrical data of an arbitrary object for use in undo/redo.
Definition: svdobj.hxx:173
sal_Int32 GetActionCount() const
Definition: svdundo.hxx:106
std::shared_ptr< svx::diagram::DiagramDataState > m_aStartState
Definition: svdundo.hxx:234
sal_Int32 mnText
Definition: svdundo.hxx:444
virtual void Redo() override
Definition: svdundo.cxx:1055
Deleting an Object.
Definition: svdundo.hxx:313
Copying an Object.
Definition: svdundo.hxx:379
SdrModel & rMod
Definition: svdundo.hxx:63
SdrUndoObjStrAttr(SdrObject &rNewObj, const ObjStrAttrType eObjStrAttr, const OUString &sOldStr, const OUString &sNewStr)
Definition: svdundo.cxx:1231
SdrRepeatFunc
Definition: svdtypes.hxx:65
SdrUndoDelLayer(sal_uInt16 nLayerNum, SdrLayerAdmin &rNewLayerAdmin, SdrModel &rNewModel)
Definition: svdundo.hxx:541
virtual OUString GetSdrRepeatComment() const
Definition: svdundo.cxx:100
UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) virtual ~SdrUndoPageMasterPage() override
void SetObjDescription(const OUString &rStr)
Definition: svdundo.hxx:111
ViewShellId m_nViewShellId
Definition: svdundo.hxx:64
std::unique_ptr< SdrUndoGroup > pUndoGroup
Definition: svdundo.hxx:216
void SetComment(const OUString &rStr)
Definition: svdundo.hxx:110
virtual OUString GetComment() const override
Definition: svdundo.cxx:1592
virtual void Undo() override
Definition: svdundo.cxx:1317
virtual OUString GetComment() const override
Definition: svdundo.cxx:1353
Replacing an Object.
Definition: svdundo.hxx:352
const OUString msOldStr
Definition: svdundo.hxx:489
SdrUndoCopyPage(SdrPage &rNewPg)
Definition: svdundo.hxx:645
virtual void Undo() override
Definition: svdundo.cxx:762
void ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum)
Definition: svdundo.cxx:1401
bool mbSkipChangeLayout
If we have a table object, should its layout change?
Definition: svdundo.hxx:218
rtl::Reference< SdrPage > mxPage
Definition: svdundo.hxx:561
virtual void Undo() override
Definition: svdundo.cxx:1613
std::unique_ptr< SfxPoolItem > mpFillBitmapItem
Definition: svdundo.hxx:599
sal_uInt16 nNum
Definition: svdundo.hxx:508
::std::vector< sal_Int32 > m_OldSortOrder
Definition: svdundo.hxx:405
virtual OUString GetComment() const override
Definition: svdundo.cxx:954
std::unique_ptr< SdrObjGeoData > pUndoGeo
Definition: svdundo.hxx:213
virtual void Undo() override
Definition: svdundo.cxx:1050
Removing an Object from an ObjectList.
Definition: svdundo.hxx:280
Abstract base class for all UndoActions that have something to do with SdrLayer.
Definition: svdundo.hxx:503
virtual void Redo() override
Definition: svdundo.cxx:1260
::std::vector< sal_Int32 > m_NewSortOrder
Definition: svdundo.hxx:406
void ImpInsertPage(sal_uInt16 nNum)
Definition: svdundo.cxx:1367
The SdrUndoFactory can be set and retrieved from the SdrModel.
Definition: svdundo.hxx:740
bool IsOldOwner() const
Definition: svdundo.hxx:370
SdrUndoPageMasterPage(SdrPage &rChangedPage)
Definition: svdundo.cxx:1628
SdrObject * pObj
Definition: svdundo.hxx:130
void ImpRemovePage(sal_uInt16 nNum)
Definition: svdundo.cxx:1383
static OUString ImpGetDescriptionStr(TranslateId pStrCacheID)
Definition: svdundo.cxx:1417
bool IsNewOwner() const
Definition: svdundo.hxx:367
Abstract DrawObject.
Definition: svdobj.hxx:259
const ObjStrAttrType meObjStrAttr
Definition: svdundo.hxx:488
std::optional< OutlinerParaObject > pTextUndo
Definition: svdundo.hxx:162
virtual OUString GetComment() const override
Definition: svdundo.cxx:1623
sal_uInt16 maOldMasterPageNumber
Definition: svdundo.hxx:689
Aggregation of arbitrarily many UndoActions to a single UndoAction.
Definition: svdundo.hxx:92
bool bHaveToTakeRedoSet
Definition: svdundo.hxx:159
SdrObjList * pObjList
Definition: svdundo.hxx:262
virtual OUString GetRepeatComment(SfxRepeatTarget &) const
bool bNewTextAvailable
Definition: svdundo.hxx:442
std::unique_ptr< SdrObjGeoData > pRedoGeo
Definition: svdundo.hxx:214
virtual ViewShellId GetViewShellId() const
ABC for all UndoActions that have something to do with MasterPage relationships.
Definition: svdundo.hxx:684
SdrUndoRemoveObj(SdrObject &rNewObj, bool bOrdNumDirect=false)
Definition: svdundo.hxx:283
Abstract base class for all UndoActions that handle objects.
Definition: svdundo.hxx:127
SdrLayerAdmin * pLayerAdmin
Definition: svdundo.hxx:507
bool mbHasFillBitmap
Definition: svdundo.hxx:600
SdrUndoCopyObj(SdrObject &rNewObj, bool bOrdNumDirect)
Definition: svdundo.hxx:382
virtual OUString GetComment() const
Inserting a NEW Object.
Definition: svdundo.hxx:333
SdrUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin &rNewLayerAdmin, SdrModel &rNewModel)
Definition: svdundo.hxx:524
SdrUndoSetPageNum(SdrPage &rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1)
Definition: svdundo.hxx:665
sal_uInt32 nNewOrdNum
Definition: svdundo.hxx:391
std::optional< OutlinerParaObject > pOldText
Definition: svdundo.hxx:439
sal_uInt16 nOldPageNum
Definition: svdundo.hxx:661
virtual void Undo() override
Definition: svdundo.cxx:1338
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
virtual void Redo() override
Definition: svdundo.cxx:743
sal_uInt16 maNewMasterPageNumber
Definition: svdundo.hxx:723
Deleting a Page.
Definition: svdundo.hxx:594
virtual void Repeat(SfxRepeatTarget &)
void Do(::std::vector< sal_Int32 > &rSortOrder)
Definition: svdundo.cxx:1036
virtual void Undo() override
Definition: svdundo.cxx:1242
virtual OUString GetComment() const override
Definition: svdundo.cxx:1278
SQLUSMALLINT SQLCHAR SQLSMALLINT SQLSMALLINT SQLCHAR * Description
OUString aObjDescription
Definition: svdundo.hxx:98
void SetRepeatFunction(SdrRepeatFunc eFunc)
Definition: svdundo.hxx:120
SdrUndoNewPage(SdrPage &rNewPg)
Definition: svdundo.hxx:629
SdrUndoSort(const SdrPage &rPage,::std::vector< sal_Int32 > const &rSortOrder)
Definition: svdundo.cxx:1022
rtl::Reference< SfxStyleSheetBase > mxRedoStyleSheet
Definition: svdundo.hxx:157
Changing the object attributes.
Definition: svdundo.hxx:149
virtual void SdrRepeat(SdrView &rView) override
Definition: svdundo.cxx:1602
virtual bool CanRepeat(SfxRepeatTarget &) const
sal_uInt32 nOrdNum
Definition: svdundo.hxx:263
bool bStyleSheet
Definition: svdundo.hxx:158
std::vector< std::unique_ptr< SdrUndoAction > > maActions
Definition: svdundo.hxx:94
SdrUndoObjOrdNum(SdrObject &rNewObj, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1)
Definition: svdundo.cxx:982
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:373
Copying a Page.
Definition: svdundo.hxx:642
virtual void Redo()
SdrUndoNewObj(SdrObject &rNewObj, bool bOrdNumDirect=false)
Definition: svdundo.hxx:336
sal_uInt16 nPageNum
Definition: svdundo.hxx:582
SdrRepeatFunc eFunction
Definition: svdundo.hxx:100
std::optional< SfxItemSet > moUndoSet
Definition: svdundo.hxx:152
const OUString msNewStr
Definition: svdundo.hxx:490
virtual OUString GetComment() const override
Definition: svdundo.cxx:1060
Inserting a new Layer.
Definition: svdundo.hxx:521
virtual OUString GetSdrRepeatComment() const override
Definition: svdundo.cxx:1597
std::shared_ptr< svx::diagram::DiagramDataState > m_aEndState
Definition: svdundo.hxx:235
Changing the MasterPageDescriptor (e.g.
Definition: svdundo.hxx:719
SdrObject * pNewObj
Definition: svdundo.hxx:358
Moving a Page within the List.
Definition: svdundo.hxx:659
rtl::Reference< SfxStyleSheetBase > mxUndoStyleSheet
Definition: svdundo.hxx:156
SdrUndoInsertObj(SdrObject &rNewObj, bool bOrdNumDirect=false)
Definition: svdundo.hxx:301
std::optional< OutlinerParaObject > pTextRedo
Definition: svdundo.hxx:165
virtual void Redo() override
Definition: svdundo.cxx:1618
SdrUndoMoveObj(SdrObject &rNewObj, const Size &rDist)
Definition: svdundo.hxx:193
SdrUndoAction * GetAction(sal_Int32 nNum) const
Definition: svdundo.hxx:107
std::unique_ptr< SdrUndoGroup > pUndoGroup
Definition: svdundo.hxx:598
virtual bool CanSdrRepeat(SdrView &rView) const override
Definition: svdundo.cxx:1607