LibreOffice Module sw (master) 1
SwUndoPageDesc.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SW_SOURCE_CORE_INC_SWUNDOPAGEDESC_HXX
21#define INCLUDED_SW_SOURCE_CORE_INC_SWUNDOPAGEDESC_HXX
22
23#include <undobj.hxx>
24#include <pagedesc.hxx>
25
26class SwDoc;
27
28class SwUndoPageDesc final : public SwUndo
29{
33
34 // To avoid duplication of (header/footer)content nodes for simple page desc changes
35 void ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDest );
36
37 // tdf#153220 use to Exit HeaderFooter EditMode
39public:
40 SwUndoPageDesc(const SwPageDesc & aOld, const SwPageDesc & aNew,
41 SwDoc * pDoc);
42 virtual ~SwUndoPageDesc() override;
43
44 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
45 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
46
47 virtual SwRewriter GetRewriter() const override;
48};
49
50class SwUndoPageDescCreate final : public SwUndo
51{
55
56 void DoImpl();
57
58public:
59 SwUndoPageDescCreate(const SwPageDesc * pNew, SwDoc * pDoc);
60 virtual ~SwUndoPageDescCreate() override;
61
62 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
63 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
64 virtual void RepeatImpl( ::sw::RepeatContext & ) override;
65
66 virtual SwRewriter GetRewriter() const override;
67};
68
69class SwUndoPageDescDelete final : public SwUndo
70{
73
74 void DoImpl();
75
76public:
77 SwUndoPageDescDelete(const SwPageDesc & aOld, SwDoc * pDoc);
78 virtual ~SwUndoPageDescDelete() override;
79
80 virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
81 virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
82 virtual void RepeatImpl( ::sw::RepeatContext & ) override;
83
84 virtual SwRewriter GetRewriter() const override;
85};
86#endif // _SW_UNDO_PAGE_DESC_CHANGE_HXX
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:197
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)
SwPageDescExt m_aNew
virtual ~SwUndoPageDesc() override
SwPageDescExt m_aOld
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