LibreOffice Module sw (master)  1
UndoBookmark.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_UNDOBOOKMARK_HXX
21 #define INCLUDED_SW_SOURCE_CORE_INC_UNDOBOOKMARK_HXX
22 
23 #include <memory>
24 #include <undobj.hxx>
25 
26 class SwHistoryBookmark;
29 
30 namespace sw {
31  namespace mark {
32  class IMark;
33  class IFieldmark;
34  }
35 }
36 
37 class SwDoc;
38 
39 class SwUndoBookmark : public SwUndo
40 {
41  const std::unique_ptr<SwHistoryBookmark> m_pHistoryBookmark;
42 
43 protected:
44  SwUndoBookmark( SwUndoId nUndoId, const ::sw::mark::IMark& );
45 
46  void SetInDoc( SwDoc* );
47  void ResetInDoc( SwDoc* );
48 
49 public:
50  virtual ~SwUndoBookmark() override;
51 
64  virtual SwRewriter GetRewriter() const override;
65 };
66 
68 {
69 public:
70  SwUndoInsBookmark( const ::sw::mark::IMark& );
71 
72  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
73  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
74 };
75 
77 {
78 public:
79  SwUndoDeleteBookmark( const ::sw::mark::IMark& );
80 
81  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
82  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
83 };
84 
86 {
87  const OUString m_sOldName;
88  const OUString m_sNewName;
89 
90 public:
91  SwUndoRenameBookmark( const OUString& rOldName, const OUString& rNewName, const SwDoc* pDoc );
92  virtual ~SwUndoRenameBookmark() override;
93 
94 private:
95  virtual SwRewriter GetRewriter() const override;
96  static void Rename( ::sw::UndoRedoContext const &, const OUString& sFrom, const OUString& sTo );
97  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
98  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
99 };
100 
103 {
104 private:
105  const std::unique_ptr<SwHistoryNoTextFieldmark> m_pHistoryNoTextFieldmark;
106 
107 public:
108  SwUndoInsNoTextFieldmark(const ::sw::mark::IFieldmark& rFieldmark);
109 
110  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
111  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
112 };
113 
116 {
117 private:
118  const std::unique_ptr<SwHistoryTextFieldmark> m_pHistoryTextFieldmark;
119 
120 public:
121  SwUndoInsTextFieldmark(const ::sw::mark::IFieldmark& rFieldmark);
122 
123  virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
124  virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
125 };
126 
127 #endif // INCLUDED_SW_SOURCE_CORE_INC_UNDOBOOKMARK_HXX
128 
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
History object containing all information used during undo / redo of text form field insertion...
Definition: rolbck.hxx:281
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:178
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:146
SwUndoId
Definition: swundo.hxx:29
virtual ~SwUndoBookmark() override
Definition: unbkmk.cxx:41
void SetInDoc(SwDoc *)
Definition: unbkmk.cxx:45
const std::unique_ptr< SwHistoryNoTextFieldmark > m_pHistoryNoTextFieldmark
Definition: doc.hxx:185
SwUndoInsTextFieldmark(const ::sw::mark::IFieldmark &rFieldmark)
Definition: unbkmk.cxx:167
Dialog to specify the properties of date form field.
Definition: accfrmobj.cxx:40
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:157
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
Definition: unbkmk.cxx:122
virtual ~SwUndoRenameBookmark() override
Definition: unbkmk.cxx:111
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:162
SwUndoRenameBookmark(const OUString &rOldName, const OUString &rNewName, const SwDoc *pDoc)
Definition: unbkmk.cxx:104
void ResetInDoc(SwDoc *)
Definition: unbkmk.cxx:50
History object containing all information used during undo / redo of checkbox and drop-down form fiel...
Definition: rolbck.hxx:266
const std::unique_ptr< SwHistoryBookmark > m_pHistoryBookmark
SwUndoInsBookmark(const ::sw::mark::IMark &)
Definition: unbkmk.cxx:74
static void Rename(::sw::UndoRedoContext const &, const OUString &sFrom, const OUString &sTo)
Definition: unbkmk.cxx:131
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this undo object.
Definition: unbkmk.cxx:65
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:141
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:173
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:84
SwUndoInsNoTextFieldmark(const ::sw::mark::IFieldmark &rFieldmark)
Definition: unbkmk.cxx:151
Handling undo / redo of text form field insertion.
virtual void RedoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:99
const std::unique_ptr< SwHistoryTextFieldmark > m_pHistoryTextFieldmark
SwUndoDeleteBookmark(const ::sw::mark::IMark &)
Definition: unbkmk.cxx:89
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:94
const OUString m_sOldName
virtual void UndoImpl(::sw::UndoRedoContext &) override
Definition: unbkmk.cxx:79
SwUndoBookmark(SwUndoId nUndoId, const ::sw::mark::IMark &)
Definition: unbkmk.cxx:34
const OUString m_sNewName
Handling undo / redo of checkbox and drop-down form field insertion.