31#include <osl/diagnose.h>
40 m_aOld(_aOld, _pDoc), m_aNew(_aNew, _pDoc), m_pDoc(_pDoc), m_bExchange( false )
42 OSL_ENSURE(
nullptr !=
m_pDoc,
"no document?");
131 OSL_ENSURE(
m_bExchange,
"You shouldn't do that." );
139 std::unique_ptr<SwFormatHeader> pNewItem(pItem->
Clone());
146 pNewItem.reset(pItem->
Clone());
147 pNewFormat = pNewItem->GetHeaderFormat();
155 pNewItem.reset(pItem->
Clone());
156 pNewFormat = pNewItem->GetHeaderFormat();
159 pNewItem.reset(pItem->
Clone());
160 pNewFormat = pNewItem->GetHeaderFormat();
168 pNewItem.reset(pItem->
Clone());
169 pNewFormat = pNewItem->GetHeaderFormat();
172 pNewItem.reset(pItem->
Clone());
173 pNewFormat = pNewItem->GetHeaderFormat();
185 std::unique_ptr<SwFormatFooter> pNewItem(pItem->
Clone());
190 pNewItem.reset(pItem->
Clone());
191 pNewFormat = pNewItem->GetFooterFormat();
198 pNewItem.reset(pItem->
Clone());
199 pNewFormat = pNewItem->GetFooterFormat();
202 pNewItem.reset(pItem->
Clone());
203 pNewFormat = pNewItem->GetFooterFormat();
211 pNewItem.reset(pItem->
Clone());
212 pNewFormat = pNewItem->GetFooterFormat();
215 pNewItem.reset(pItem->
Clone());
216 pNewFormat = pNewItem->GetFooterFormat();
263 OSL_ENSURE(
nullptr !=
m_pDoc,
"no document?");
314 OSL_ENSURE(
nullptr !=
m_pDoc,
"no document?");
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
IDocumentUndoRedo & GetIDocumentUndoRedo()
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
SwEditShell const * GetEditShell() const
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
void DelPageDesc(const OUString &rName, bool bBroadcast=false)
Content, content of frame (header, footer, fly).
OUString const & GetName() const
const OUString & GetName() const
SwFrameFormat & GetMaster()
bool IsHeaderShared() const
bool IsFirstShared() const
bool IsFooterShared() const
SwFrameFormat & GetFirstMaster()
SwFrameFormat & GetLeft()
const SwPageDesc * GetFollow() const
void AddRule(SwUndoArg eWhat, const OUString &rWith)
const SwPageDesc * m_pDesc
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual ~SwUndoPageDescCreate() override
SwUndoPageDescCreate(const SwPageDesc *pNew, SwDoc *pDoc)
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
virtual void RepeatImpl(::sw::RepeatContext &) override
virtual void RedoImpl(::sw::UndoRedoContext &) override
virtual ~SwUndoPageDescDelete() override
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual void RepeatImpl(::sw::RepeatContext &) override
SwUndoPageDescDelete(const SwPageDesc &aOld, SwDoc *pDoc)
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
virtual void RedoImpl(::sw::UndoRedoContext &) override
void ExchangeContentNodes(SwPageDesc &rSource, SwPageDesc &rDest)
virtual ~SwUndoPageDesc() override
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
void ExitHeaderFooterEdit()
SwUndoPageDesc(const SwPageDesc &aOld, const SwPageDesc &aNew, SwDoc *pDoc)
virtual void RedoImpl(::sw::UndoRedoContext &) override
virtual void UndoImpl(::sw::UndoRedoContext &) override
bool IsHeaderFooterEdit() const
Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags.
void ToggleHeaderFooterEdit()
Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags.
virtual OUString GetName() const override
constexpr TypedWhichId< SwFormatHeader > RES_HEADER(102)
constexpr TypedWhichId< SwFormatFooter > RES_FOOTER(103)
OUString SwResId(TranslateId aId)