class SwUndoFormatAttr final : public SwUndo
{ friendclass SwUndoDefaultAttr;
UIName m_sFormatName;
std::optional<SfxItemSet> m_oOldSet; // old attributes
sal_Int32 m_nAnchorContentOffset;
SwNodeOffset m_nNodeIndex; const sal_uInt16 m_nFormatWhich; constbool m_bSaveDrawPt;
void SaveFlyAnchor( const SwFormat * pFormat, bool bSaveDrawPt = false ); // #i35443# - Add return value, type <bool>. // Return value indicates, if anchor attribute is restored. // Notes: - If anchor attribute is restored, all other existing attributes // are also restored. // - Anchor attribute isn't restored successfully, if it contains // an invalid anchor position and all other existing attributes // aren't restored. // This situation occurs for undo of styles. bool RestoreFlyAnchor(::sw::UndoRedoContext & rContext); // --> OD 2008-02-27 #refactorlists# - removed <rAffectedItemSet> void Init( const SwFormat & rFormat );
public: // register at the Format and save old attributes // --> OD 2008-02-27 #refactorlists# - removed <rNewSet>
SwUndoFormatAttr( SfxItemSet&& rOldSet,
SwFormat& rFormat, bool bSaveDrawPt );
SwUndoFormatAttr( const SfxPoolItem& rItem,
SwFormat& rFormat, bool bSaveDrawPt );
private: // format at which a certain attribute is reset.
SwFormat * const m_pChangedFormat; // old attribute which has been reset - needed for undo.
SfxItemSet m_aSet;
void BroadcastStyleChange();
};
class SwUndoDontExpandFormat final : public SwUndo
{ const SwNodeOffset m_nNodeIndex; const sal_Int32 m_nContentIndex;
// helper class to receive changed attribute sets class SwUndoFormatAttrHelper final : public SwClient
{
SwFormat& m_rFormat;
std::unique_ptr<SwUndoFormatAttr> m_pUndo; constbool m_bSaveDrawPt;
SwUndoFormatAttr* GetUndo() const { return m_pUndo.get(); } // release the undo object (so it is not deleted here), and return it
std::unique_ptr<SwUndoFormatAttr> ReleaseUndo() { return std::move(m_pUndo); }
};
class SwDocModifyAndUndoGuard final
{
SwDoc* doc;
std::unique_ptr<SwUndoFormatAttrHelper> helper;
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.