1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SW_SOURCE_CORE_INC_SWUNDOPAGEDESC_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_SWUNDOPAGEDESC_HXX
24 #include <pagedesc.hxx>
28 class SwUndoPageDesc final
: public SwUndo
30 SwPageDescExt m_aOld
, m_aNew
;
34 // To avoid duplication of (header/footer)content nodes for simple page desc changes
35 void ExchangeContentNodes( SwPageDesc
& rSource
, SwPageDesc
&rDest
);
37 // tdf#153220 use to Exit HeaderFooter EditMode
38 void ExitHeaderFooterEdit();
40 SwUndoPageDesc(const SwPageDesc
& aOld
, const SwPageDesc
& aNew
,
42 virtual ~SwUndoPageDesc() override
;
44 virtual void UndoImpl( ::sw::UndoRedoContext
& ) override
;
45 virtual void RedoImpl( ::sw::UndoRedoContext
& ) override
;
47 virtual SwRewriter
GetRewriter() const override
;
50 class SwUndoPageDescCreate final
: public SwUndo
52 const SwPageDesc
* m_pDesc
;
59 SwUndoPageDescCreate(const SwPageDesc
* pNew
, SwDoc
* pDoc
);
60 virtual ~SwUndoPageDescCreate() override
;
62 virtual void UndoImpl( ::sw::UndoRedoContext
& ) override
;
63 virtual void RedoImpl( ::sw::UndoRedoContext
& ) override
;
64 virtual void RepeatImpl( ::sw::RepeatContext
& ) override
;
66 virtual SwRewriter
GetRewriter() const override
;
69 class SwUndoPageDescDelete final
: public SwUndo
77 SwUndoPageDescDelete(const SwPageDesc
& aOld
, SwDoc
* pDoc
);
78 virtual ~SwUndoPageDescDelete() override
;
80 virtual void UndoImpl( ::sw::UndoRedoContext
& ) override
;
81 virtual void RedoImpl( ::sw::UndoRedoContext
& ) override
;
82 virtual void RepeatImpl( ::sw::RepeatContext
& ) override
;
84 virtual SwRewriter
GetRewriter() const override
;
86 #endif // _SW_UNDO_PAGE_DESC_CHANGE_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */