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 .
19 #ifndef INCLUDED_SW_INC_SWUNDOFIELD_HXX
20 #define INCLUDED_SW_INC_SWUNDOFIELD_HXX
24 #include <com/sun/star/uno/Any.h>
30 class SwUndoField
: public SwUndo
32 sal_uLong m_nNodeIndex
;
37 SwPosition
GetPosition();
40 SwUndoField(const SwPosition
& rPos
);
41 virtual ~SwUndoField() override
;
44 class SwUndoFieldFromDoc final
: public SwUndoField
46 std::unique_ptr
<SwField
> m_pOldField
, m_pNewField
;
47 SwMsgPoolItem
* m_pHint
;
53 SwUndoFieldFromDoc(const SwPosition
& rPos
, const SwField
& aOldField
,
54 const SwField
& aNewField
,
55 SwMsgPoolItem
* pHint
, bool bUpdate
);
57 virtual ~SwUndoFieldFromDoc() override
;
59 virtual void UndoImpl( ::sw::UndoRedoContext
& ) override
;
60 virtual void RedoImpl( ::sw::UndoRedoContext
& ) override
;
61 virtual void RepeatImpl( ::sw::RepeatContext
& ) override
;
64 class SwUndoFieldFromAPI final
: public SwUndoField
66 css::uno::Any m_aOldVal
, m_aNewVal
;
72 SwUndoFieldFromAPI(const SwPosition
& rPos
,
73 const css::uno::Any
& rOldVal
,
74 const css::uno::Any
& rNewVal
,
76 virtual ~SwUndoFieldFromAPI() override
;
78 virtual void UndoImpl( ::sw::UndoRedoContext
& ) override
;
79 virtual void RedoImpl( ::sw::UndoRedoContext
& ) override
;
80 virtual void RepeatImpl( ::sw::RepeatContext
& ) override
;
83 #endif // INCLUDED_SW_INC_SWUNDOFIELD_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */