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 
26 class SwDoc;
27 
28 class SwUndoPageDesc : public SwUndo
29 {
32  bool bExchange;
33 
34  // To avoid duplication of (header/footer)content nodes for simple page desc changes
35  void ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDest );
36 
37 public:
38  SwUndoPageDesc(const SwPageDesc & aOld, const SwPageDesc & aNew,
39  SwDoc * pDoc);
40  virtual ~SwUndoPageDesc() override;
41 
42  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
43  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
44 
45  virtual SwRewriter GetRewriter() const override;
46 };
47 
49 {
50  const SwPageDesc * pDesc;
53 
54  void DoImpl();
55 
56 public:
57  SwUndoPageDescCreate(const SwPageDesc * pNew, SwDoc * pDoc);
58  virtual ~SwUndoPageDescCreate() override;
59 
60  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
61  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
62  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
63 
64  virtual SwRewriter GetRewriter() const override;
65 };
66 
68 {
71 
72  void DoImpl();
73 
74 public:
75  SwUndoPageDescDelete(const SwPageDesc & aOld, SwDoc * pDoc);
76  virtual ~SwUndoPageDescDelete() override;
77 
78  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
79  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
80  virtual void RepeatImpl( ::sw::RepeatContext & ) override;
81 
82  virtual SwRewriter GetRewriter() const override;
83 };
84 #endif // _SW_UNDO_PAGE_DESC_CHANGE_HXX
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwUndoPageDesc(const SwPageDesc &aOld, const SwPageDesc &aNew, SwDoc *pDoc)
virtual ~SwUndoPageDesc() override
virtual void RepeatImpl(::sw::RepeatContext &) override
virtual void RepeatImpl(::sw::RepeatContext &) override
Definition: doc.hxx:185
SwPageDescExt aOld
virtual void RedoImpl(::sw::UndoRedoContext &) override
virtual void RedoImpl(::sw::UndoRedoContext &) override
virtual void RedoImpl(::sw::UndoRedoContext &) override
const SwPageDesc * pDesc
virtual ~SwUndoPageDescCreate() override
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwPageDescExt aNew
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwUndoPageDescDelete(const SwPageDesc &aOld, SwDoc *pDoc)
SwUndoPageDescCreate(const SwPageDesc *pNew, SwDoc *pDoc)
void ExchangeContentNodes(SwPageDesc &rSource, SwPageDesc &rDest)
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
SwPageDescExt const aOld
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual ~SwUndoPageDescDelete() override
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.