22#include <config_options.h>
52namespace svx {
namespace diagram {
53 class DiagramDataState;
72 virtual bool CanRepeat(SfxRepeatTarget& rView)
const override;
73 virtual void Repeat(SfxRepeatTarget& rView)
override;
76 virtual OUString GetSdrRepeatComment()
const;
78 virtual bool CanSdrRepeat(
SdrView& rView)
const;
79 virtual void SdrRepeat(
SdrView& rView);
94 std::vector<std::unique_ptr<SdrUndoAction>>
maActions;
108 void AddAction(std::unique_ptr<SdrUndoAction> pAct);
113 virtual OUString GetSdrRepeatComment()
const override;
115 virtual void Undo()
override;
116 virtual void Redo()
override;
118 virtual bool CanSdrRepeat(
SdrView& rView)
const override;
119 virtual void SdrRepeat(
SdrView& rView)
override;
136 OUString ImpGetDescriptionStr(
TranslateId pStrCacheID,
bool bRepeat =
false)
const;
138 [[nodiscard]]
static OUString GetDescriptionStringForObject(
const SdrObject& _rForObject,
TranslateId pStrCacheID,
bool bRepeat =
false );
141 void ImpShowPageOfThisObject();
177 virtual void Undo()
override;
178 virtual void Redo()
override;
181 virtual OUString GetSdrRepeatComment()
const override;
197 virtual void Undo()
override;
198 virtual void Redo()
override;
201 virtual OUString GetSdrRepeatComment()
const override;
203 virtual void SdrRepeat(
SdrView& rView)
override;
204 virtual bool CanSdrRepeat(
SdrView& rView)
const override;
225 virtual void Undo()
override;
226 virtual void Redo()
override;
238 void implUndoRedo(
bool bUndo);
244 virtual void Undo()
override;
245 virtual void Redo()
override;
256 class ObjListListener;
257 friend class ObjListListener;
281 virtual void Undo()
override;
282 virtual void Redo()
override;
299 virtual void Undo()
override;
300 virtual void Redo()
override;
313 virtual void Undo()
override;
314 virtual void Redo()
override;
317 virtual OUString GetSdrRepeatComment()
const override;
319 virtual void SdrRepeat(
SdrView& rView)
override;
320 virtual bool CanSdrRepeat(
SdrView& rView)
const override;
334 virtual void Undo()
override;
335 virtual void Redo()
override;
356 virtual void Undo()
override;
357 virtual void Redo()
override;
382 virtual void Undo()
override;
383 virtual void Redo()
override;
395 void Do(::std::vector<sal_Int32> & rSortOrder);
399 ::std::vector<sal_Int32>
const& rSortOrder);
401 virtual void Undo()
override;
402 virtual void Redo()
override;
417 virtual void Undo()
override;
418 virtual void Redo()
override;
435 bool IsDifferent()
const;
438 virtual void Undo()
override;
439 virtual void Redo()
override;
442 virtual OUString GetSdrRepeatComment()
const override;
444 virtual void SdrRepeat(
SdrView& rView)
override;
445 virtual bool CanSdrRepeat(
SdrView& rView)
const override;
467 virtual void Undo()
override;
468 virtual void Redo()
override;
487 virtual void Undo()
override;
488 virtual void Redo()
override;
526 virtual void Undo()
override;
527 virtual void Redo()
override;
543 virtual void Undo()
override;
544 virtual void Redo()
override;
565 void ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum);
605 virtual void Undo()
override;
606 virtual void Redo()
override;
609 virtual OUString GetSdrRepeatComment()
const override;
611 virtual void SdrRepeat(
SdrView& rView)
override;
612 virtual bool CanSdrRepeat(
SdrView& rView)
const override;
615 void queryFillBitmap(
const SfxItemSet &rItemSet);
616 void clearFillBitmap();
617 void restoreFillBitmap();
630 virtual void Undo()
override;
631 virtual void Redo()
override;
667 virtual void Undo()
override;
668 virtual void Redo()
override;
707 virtual void Undo()
override;
708 virtual void Redo()
override;
727 virtual void Undo()
override;
728 virtual void Redo()
override;
744 virtual std::unique_ptr<SdrUndoAction> CreateUndoMoveObject(
SdrObject& rObject,
const Size& rDist );
745 virtual std::unique_ptr<SdrUndoAction> CreateUndoGeoObject(
SdrObject& rObject );
746 virtual std::unique_ptr<SdrUndoAction> CreateUndoAttrObject(
SdrObject& rObject,
bool bStyleSheet1 =
false,
bool bSaveText =
false );
747 virtual std::unique_ptr<SdrUndoAction> CreateUndoRemoveObject(
SdrObject& rObject);
748 virtual std::unique_ptr<SdrUndoAction> CreateUndoInsertObject(
SdrObject& rObject,
bool bOrdNumDirect =
false);
749 virtual std::unique_ptr<SdrUndoAction> CreateUndoDeleteObject(
SdrObject& rObject,
bool bOrdNumDirect =
false);
750 virtual std::unique_ptr<SdrUndoAction> CreateUndoNewObject(
SdrObject& rObject,
bool bOrdNumDirect =
false);
751 virtual std::unique_ptr<SdrUndoAction> CreateUndoCopyObject(
SdrObject& rObject,
bool bOrdNumDirect =
false);
753 virtual std::unique_ptr<SdrUndoAction> CreateUndoObjectOrdNum(
SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1);
755 virtual std::unique_ptr<SdrUndoAction> CreateUndoReplaceObject(
SdrObject& rOldObject,
SdrObject& rNewObject );
757 virtual std::unique_ptr<SdrUndoAction> CreateUndoObjectSetText(
SdrObject& rNewObj, sal_Int32 nText );
760 static std::unique_ptr<SdrUndoAction> CreateUndoObjectStrAttr(
SdrObject& rObject,
762 const OUString& sOldStr,
763 const OUString& sNewStr );
764 static std::unique_ptr<SdrUndoAction> CreateUndoObjectDecorative(
SdrObject& rObject,
765 bool const WasDecorative);
768 virtual std::unique_ptr<SdrUndoAction> CreateUndoDiagramModelData(
SdrObject& rObject, std::shared_ptr< svx::diagram::DiagramDataState >& rStartState );
771 virtual std::unique_ptr<SdrUndoAction> CreateUndoNewLayer(sal_uInt16 nLayerNum,
SdrLayerAdmin& rNewLayerAdmin,
SdrModel& rNewModel);
772 virtual std::unique_ptr<SdrUndoAction> CreateUndoDeleteLayer(sal_uInt16 nLayerNum,
SdrLayerAdmin& rNewLayerAdmin,
SdrModel& rNewModel);
775 virtual std::unique_ptr<SdrUndoAction> CreateUndoDeletePage(
SdrPage& rPage);
776 virtual std::unique_ptr<SdrUndoAction> CreateUndoNewPage(
SdrPage& rPage);
777 virtual std::unique_ptr<SdrUndoAction> CreateUndoCopyPage(
SdrPage& rPage);
778 virtual std::unique_ptr<SdrUndoAction> CreateUndoSetPageNum(
SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1);
779 static std::unique_ptr<SdrUndoAction> CreateUndoSort(
SdrPage& rPage, ::std::vector<sal_Int32>
const& rSortOrder);
782 virtual std::unique_ptr<SdrUndoAction> CreateUndoPageRemoveMasterPage(
SdrPage& rChangedPage);
783 virtual std::unique_ptr<SdrUndoAction> CreateUndoPageChangeMasterPage(
SdrPage& rChangedPage);
All geometrical data of an arbitrary object for use in undo/redo.
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Abstract base class (ABC) for all UndoActions of DrawingEngine.
ViewShellId m_nViewShellId
Changing the object attributes.
std::unique_ptr< SdrUndoGroup > pUndoGroup
std::optional< SfxItemSet > moRedoSet
std::optional< SfxItemSet > moUndoSet
rtl::Reference< SfxStyleSheetBase > mxUndoStyleSheet
rtl::Reference< SfxStyleSheetBase > mxRedoStyleSheet
std::optional< OutlinerParaObject > pTextRedo
std::optional< OutlinerParaObject > pTextUndo
SdrUndoCopyObj(SdrObject &rNewObj, bool bOrdNumDirect)
virtual OUString GetComment() const override
virtual void SdrRepeat(SdrView &rView) override
SdrUndoCopyPage(SdrPage &rNewPg)
virtual bool CanSdrRepeat(SdrView &rView) const override
virtual OUString GetComment() const override
virtual OUString GetSdrRepeatComment() const override
virtual OUString GetComment() const override
SdrUndoDelLayer(sal_uInt16 nLayerNum, SdrLayerAdmin &rNewLayerAdmin, SdrModel &rNewModel)
virtual void Redo() override
virtual void Undo() override
std::unique_ptr< SfxPoolItem > mpFillBitmapItem
std::unique_ptr< SdrUndoGroup > pUndoGroup
std::shared_ptr< svx::diagram::DiagramDataState > m_aStartState
std::shared_ptr< svx::diagram::DiagramDataState > m_aEndState
The SdrUndoFactory can be set and retrieved from the SdrModel.
Changing the geometry of an object.
std::unique_ptr< SdrUndoGroup > pUndoGroup
std::unique_ptr< SdrObjGeoData > pUndoGeo
void SetSkipChangeLayout(bool bOn)
std::unique_ptr< SdrObjGeoData > pRedoGeo
bool mbSkipChangeLayout
If we have a table object, should its layout change?
Aggregation of arbitrarily many UndoActions to a single UndoAction.
SdrUndoAction * GetAction(sal_Int32 nNum) const
void SetRepeatFunction(SdrRepeatFunc eFunc)
sal_Int32 GetActionCount() const
void SetComment(const OUString &rStr)
void SetObjDescription(const OUString &rStr)
std::vector< std::unique_ptr< SdrUndoAction > > maActions
Inserting Objects into an ObjectList.
SdrUndoInsertObj(SdrObject &rNewObj, bool bOrdNumDirect=false)
Abstract base class for all UndoActions that have something to do with SdrLayer.
SdrLayerAdmin * pLayerAdmin
SdrUndoLayer(sal_uInt16 nLayerNum, SdrLayerAdmin &rNewLayerAdmin, SdrModel &rNewModel)
virtual ~SdrUndoLayer() override
Only moving of an object.
SdrUndoMoveObj(SdrObject &rNewObj, const Size &rDist)
SdrUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin &rNewLayerAdmin, SdrModel &rNewModel)
virtual void Redo() override
virtual void Undo() override
virtual OUString GetComment() const override
SdrUndoNewObj(SdrObject &rNewObj, bool bOrdNumDirect=false)
SdrUndoNewPage(SdrPage &rNewPg)
SdrUndoObjDecorative(SdrObject &rObj, bool const WasDecorative)
bool const m_WasDecorative
virtual void Redo() override
virtual void Undo() override
virtual OUString GetComment() const override
Manipulation of an ObjList: New Object, DeleteObj, SetObjZLevel, Grouping, ... Abstract base class.
virtual OUString GetComment() const override
virtual void Redo() override
virtual void Undo() override
SdrUndoObjOrdNum(SdrObject &rNewObj, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1)
std::optional< OutlinerParaObject > pNewText
std::optional< OutlinerParaObject > pOldText
Implement Title/Description Elements UI for Writer text frames, graphics and embedded objects (#i7324...
virtual void Undo() override
virtual OUString GetComment() const override
SdrUndoObjStrAttr(SdrObject &rNewObj, const ObjStrAttrType eObjStrAttr, OUString sOldStr, OUString sNewStr)
const ObjStrAttrType meObjStrAttr
virtual void Redo() override
Abstract base class for all UndoActions that handle objects.
rtl::Reference< SdrObject > mxObj
Changing the MasterPageDescriptor (e.g.
virtual void Undo() override
virtual void Redo() override
sal_uInt16 maNewMasterPageNumber
virtual OUString GetComment() const override
SdrUndoPageChangeMasterPage(SdrPage &rChangedPage)
ABC for manipulation of a PageList: New Page, DeletePage, MovePage (ChangePageNum).
ABC for all UndoActions that have something to do with MasterPage relationships.
UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) virtual ~SdrUndoPageMasterPage() override
SdrUndoPageMasterPage(SdrPage &rChangedPage)
sal_uInt16 maOldMasterPageNumber
ABC for all UndoActions that have something to do with SdrPages.
static OUString ImpGetDescriptionStr(TranslateId pStrCacheID)
SdrUndoPage(SdrPage &rNewPg)
void ImpInsertPage(sal_uInt16 nNum)
void ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum)
void ImpRemovePage(sal_uInt16 nNum)
rtl::Reference< SdrPage > mxPage
Removing an Object from an ObjectList.
SdrUndoRemoveObj(SdrObject &rNewObj, bool bOrdNumDirect=false)
rtl::Reference< SdrObject > mxNewObj
Moving a Page within the List.
SdrUndoSetPageNum(SdrPage &rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1)
virtual void Redo() override
virtual OUString GetComment() const override
virtual void Undo() override
virtual void Redo() override
void Do(::std::vector< sal_Int32 > &rSortOrder)
::std::vector< sal_Int32 > m_NewSortOrder
SdrUndoSort(const SdrPage &rPage, ::std::vector< sal_Int32 > const &rSortOrder)
virtual OUString GetComment() const override
virtual void Undo() override
::std::vector< sal_Int32 > m_OldSortOrder
virtual void Repeat(SfxRepeatTarget &)
virtual OUString GetRepeatComment(SfxRepeatTarget &) const
virtual ViewShellId GetViewShellId() const
virtual OUString GetComment() const
virtual bool CanRepeat(SfxRepeatTarget &) const
#define SVXCORE_DLLPUBLIC
o3tl::enumarray< SvxBoxItemLine, sal_uInt16 > aDistance