2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-11-05 02:17:53 +01:00
|
|
|
#ifndef INCLUDED_SW_INC_SWUNDOFIELD_HXX
|
|
|
|
#define INCLUDED_SW_INC_SWUNDOFIELD_HXX
|
2004-05-18 12:55:49 +00:00
|
|
|
|
|
|
|
#include <undobj.hxx>
|
|
|
|
|
2010-12-15 09:14:14 +01:00
|
|
|
#include <com/sun/star/uno/Any.h>
|
|
|
|
|
2006-08-14 14:14:54 +00:00
|
|
|
class SwDoc;
|
2004-05-18 12:55:49 +00:00
|
|
|
class SwField;
|
|
|
|
class SwMsgPoolItem;
|
|
|
|
|
|
|
|
class SwUndoField : public SwUndo
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uLong nNodeIndex;
|
2014-01-15 10:14:52 +00:00
|
|
|
sal_Int32 nOffset;
|
2004-05-18 12:55:49 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
SwDoc * pDoc;
|
|
|
|
SwPosition GetPosition();
|
|
|
|
|
|
|
|
public:
|
2008-04-03 15:49:30 +00:00
|
|
|
SwUndoField(const SwPosition & rPos, SwUndoId nId = UNDO_FIELD );
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SwUndoField() override;
|
2004-05-18 12:55:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class SwUndoFieldFromDoc : public SwUndoField
|
|
|
|
{
|
|
|
|
SwField * pOldField, * pNewField;
|
2015-05-20 13:05:49 +02:00
|
|
|
SwMsgPoolItem * pHint;
|
2014-04-25 14:00:35 +02:00
|
|
|
bool bUpdate;
|
2004-05-18 12:55:49 +00:00
|
|
|
|
2010-12-15 09:14:11 +01:00
|
|
|
void DoImpl();
|
2004-05-18 12:55:49 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & aOldField,
|
|
|
|
const SwField & aNewField,
|
2016-09-08 09:23:17 +02:00
|
|
|
SwMsgPoolItem * pHint, bool bUpdate);
|
2010-12-15 09:14:11 +01:00
|
|
|
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SwUndoFieldFromDoc() override;
|
2004-05-18 12:55:49 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
|
|
|
|
virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
|
|
|
|
virtual void RepeatImpl( ::sw::RepeatContext & ) override;
|
2004-05-18 12:55:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class SwUndoFieldFromAPI : public SwUndoField
|
|
|
|
{
|
2015-11-05 15:55:58 +02:00
|
|
|
css::uno::Any aOldVal, aNewVal;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich;
|
2004-05-18 12:55:49 +00:00
|
|
|
|
2010-12-15 09:14:11 +01:00
|
|
|
void DoImpl();
|
2004-05-18 12:55:49 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
SwUndoFieldFromAPI(const SwPosition & rPos,
|
2015-11-05 15:55:58 +02:00
|
|
|
const css::uno::Any & rOldVal,
|
|
|
|
const css::uno::Any & rNewVal,
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nWhich);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SwUndoFieldFromAPI() override;
|
2004-05-18 12:55:49 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void UndoImpl( ::sw::UndoRedoContext & ) override;
|
|
|
|
virtual void RedoImpl( ::sw::UndoRedoContext & ) override;
|
|
|
|
virtual void RepeatImpl( ::sw::RepeatContext & ) override;
|
2004-05-18 12:55:49 +00:00
|
|
|
};
|
|
|
|
|
2013-11-05 02:17:53 +01:00
|
|
|
#endif // INCLUDED_SW_INC_SWUNDOFIELD_HXX
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|