/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
class SfxPoolItem; class SfxStyleSheet; class SdrView; class SdrModel; class SdrObject; class SdrPage; class SdrObjList; class SdrLayer; class SdrLayerAdmin; class SdrObjGeoData;
namespace svx { namespace diagram { class DiagramDataState;
}}
/** * Abstract base class (ABC) for all UndoActions of DrawingEngine
*/
class SVXCORE_DLLPUBLIC SdrUndoAction : public SfxUndoAction
{ protected:
SdrModel& m_rMod;
ViewShellId m_nViewShellId;
/// See SfxUndoAction::GetViewShellId().
ViewShellId GetViewShellId() const override;
};
/** * Aggregation of arbitrarily many UndoActions to a single UndoAction. * Undo() executes the single UndoActions backwards (LIFO, first the last * ones attached), Redo() executes the UndoActions in the order they were * added (FIFO).
*/
class SVXCORE_DLLPUBLIC SdrUndoGroup final : public SdrUndoAction
{
std::vector<std::unique_ptr<SdrUndoAction>> maActions;
// No expanded description of the Action (contains %O)
OUString m_aComment;
OUString m_aObjDescription;
// #94278# new method for evtl. PageChange at UNDO/REDO void ImpShowPageOfThisObject();
};
/** * Changing the object attributes. * Create Action right before setting the new attributes. * Also for StyleSheets.
*/
class SVXCORE_DLLPUBLIC SdrUndoAttrObj : public SdrUndoObj
{
std::optional<SfxItemSet> moUndoSet;
std::optional<SfxItemSet> moRedoSet;
// FIXME: Or should we better remember the StyleSheetNames?
rtl::Reference< SfxStyleSheet > mxUndoStyleSheet;
rtl::Reference< SfxStyleSheet > mxRedoStyleSheet; bool m_bStyleSheet; bool m_bHaveToTakeRedoSet;
// When assigning TextItems to a drawing object with text:
std::optional<OutlinerParaObject> m_pTextUndo; // #i8508# // The text rescue mechanism needs also to be implemented for redo actions.
std::optional<OutlinerParaObject> m_pTextRedo;
// If we have a group object:
std::unique_ptr<SdrUndoGroup> m_pUndoGroup;
protected: // Helper to ensure StyleSheet is in pool (provided by SdrModel from SdrObject) staticvoid ensureStyleSheetInStyleSheetPool(SfxStyleSheetBasePool& rStyleSheetPool, SfxStyleSheet& rSheet);
/** * Changing the geometry of an object. * Create Action right before the geometric transformation.
*/
class SVXCORE_DLLPUBLIC SdrUndoGeoObj : public SdrUndoObj
{
std::unique_ptr<SdrObjGeoData> m_pUndoGeo;
std::unique_ptr<SdrObjGeoData> m_pRedoGeo; // If we have a group object:
std::unique_ptr<SdrUndoGroup> m_pUndoGroup; /// If we have a table object, should its layout change? bool mbSkipChangeLayout;
/** * Removing an Object from an ObjectList. * To be used with corresponding Inserts within a UndoGroup. * * Create Action before removing from the ObjList.
*/
class SVXCORE_DLLPUBLIC SdrUndoRemoveObj : public SdrUndoObjList
{ public:
SdrUndoRemoveObj(SdrObject& rNewObj, bool bOrdNumDirect = false)
: SdrUndoObjList(rNewObj,bOrdNumDirect) {}
/** * Copying an Object. * Create Action before inserting into the ObjList.
*/
class SdrUndoCopyObj final : public SdrUndoNewObj
{ public:
SdrUndoCopyObj(SdrObject& rNewObj, bool bOrdNumDirect)
: SdrUndoNewObj(rNewObj,bOrdNumDirect) {}
virtual OUString GetComment() const override;
};
class SdrUndoObjOrdNum final : public SdrUndoObj
{
sal_uInt32 m_nOldOrdNum;
sal_uInt32 m_nNewOrdNum;
class SdrUndoSort final : public SdrUndoAction
{ private:
::std::vector<sal_Int32> m_OldSortOrder;
::std::vector<sal_Int32> m_NewSortOrder;
sal_uInt16 const m_nPage;
/** * Implement Title/Description Elements UI for Writer * text frames, graphics and embedded objects (#i73249#)
*/ class SdrUndoObjStrAttr final : public SdrUndoObj
{ public: enumclass ObjStrAttrType
{
Name,
Title,
Description
};
/** * Deleting a Page. * Create Action before removing from the List.
*/
class SVXCORE_DLLPUBLIC SdrUndoDelPage final : public SdrUndoPageList
{ // When deleting a MasterPage, we remember all relations of the // Character Page with the MasterPage in this UndoGroup.
std::unique_ptr<SdrUndoGroup> m_pUndoGroup;
std::unique_ptr<SfxPoolItem> mpFillBitmapItem; bool mbHasFillBitmap;
/** * Changing the MasterPageDescriptor (e.g. change of the VisibleLayer). * Create Action before changing the MasterPageDescriptors.
*/
class SdrUndoPageChangeMasterPage final : public SdrUndoPageMasterPage
{ bool mbNewHadMasterPage;
SdrLayerIDSet maNewSet;
sal_uInt16 maNewMasterPageNumber;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.