2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2004-05-18 12:56:02 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 09:46:11 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-05-18 12:56:02 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2004-05-18 12:56:02 +00:00
|
|
|
*
|
2008-04-10 09:46:11 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-05-18 12:56:02 +00:00
|
|
|
*
|
2008-04-10 09:46:11 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-05-18 12:56:02 +00:00
|
|
|
*
|
2008-04-10 09:46:11 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2004-05-18 12:56:02 +00:00
|
|
|
*
|
2008-04-10 09:46:11 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2004-05-18 12:56:02 +00:00
|
|
|
*
|
2008-04-10 09:46:11 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2004-05-18 12:56:02 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
2012-06-02 13:43:01 +02:00
|
|
|
|
2010-12-15 09:14:11 +01:00
|
|
|
#ifndef SW_UNDO_PAGE_DESC_HXX
|
|
|
|
#define SW_UNDO_PAGE_DESC_HXX
|
2004-05-18 12:56:02 +00:00
|
|
|
|
|
|
|
#include <undobj.hxx>
|
2007-09-27 06:55:26 +00:00
|
|
|
#include <pagedesc.hxx>
|
2004-05-18 12:56:02 +00:00
|
|
|
|
|
|
|
class SwDoc;
|
|
|
|
class SwPageDesc;
|
|
|
|
|
|
|
|
class SwUndoPageDesc : public SwUndo
|
|
|
|
{
|
|
|
|
SwPageDescExt aOld, aNew;
|
|
|
|
SwDoc * pDoc;
|
2006-03-31 08:49:59 +00:00
|
|
|
bool bExchange;
|
|
|
|
|
|
|
|
// To avoid duplication of (header/footer)content nodes for simple page desc changes
|
|
|
|
void ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDest );
|
2004-05-18 12:56:02 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
SwUndoPageDesc(const SwPageDesc & aOld, const SwPageDesc & aNew,
|
|
|
|
SwDoc * pDoc);
|
|
|
|
virtual ~SwUndoPageDesc();
|
|
|
|
|
2010-12-15 09:14:11 +01:00
|
|
|
virtual void UndoImpl( ::sw::UndoRedoContext & );
|
|
|
|
virtual void RedoImpl( ::sw::UndoRedoContext & );
|
2004-05-18 12:56:02 +00:00
|
|
|
|
|
|
|
virtual SwRewriter GetRewriter() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
class SwUndoPageDescCreate : public SwUndo
|
|
|
|
{
|
2010-11-15 11:59:57 +00:00
|
|
|
const SwPageDesc * pDesc;
|
2004-05-18 12:56:02 +00:00
|
|
|
SwPageDescExt aNew;
|
|
|
|
SwDoc * pDoc;
|
|
|
|
|
2010-12-15 09:14:11 +01:00
|
|
|
void DoImpl();
|
|
|
|
|
2004-05-18 12:56:02 +00:00
|
|
|
public:
|
2010-11-15 11:59:57 +00:00
|
|
|
SwUndoPageDescCreate(const SwPageDesc * pNew, SwDoc * pDoc);
|
2004-05-18 12:56:02 +00:00
|
|
|
virtual ~SwUndoPageDescCreate();
|
|
|
|
|
2010-12-15 09:14:11 +01:00
|
|
|
virtual void UndoImpl( ::sw::UndoRedoContext & );
|
|
|
|
virtual void RedoImpl( ::sw::UndoRedoContext & );
|
|
|
|
virtual void RepeatImpl( ::sw::RepeatContext & );
|
2004-05-18 12:56:02 +00:00
|
|
|
|
|
|
|
virtual SwRewriter GetRewriter() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
class SwUndoPageDescDelete : public SwUndo
|
|
|
|
{
|
|
|
|
SwPageDescExt aOld;
|
|
|
|
SwDoc * pDoc;
|
|
|
|
|
2010-12-15 09:14:11 +01:00
|
|
|
void DoImpl();
|
|
|
|
|
2004-05-18 12:56:02 +00:00
|
|
|
public:
|
|
|
|
SwUndoPageDescDelete(const SwPageDesc & aOld, SwDoc * pDoc);
|
|
|
|
virtual ~SwUndoPageDescDelete();
|
|
|
|
|
2010-12-15 09:14:11 +01:00
|
|
|
virtual void UndoImpl( ::sw::UndoRedoContext & );
|
|
|
|
virtual void RedoImpl( ::sw::UndoRedoContext & );
|
|
|
|
virtual void RepeatImpl( ::sw::RepeatContext & );
|
2004-05-18 12:56:02 +00:00
|
|
|
|
|
|
|
virtual SwRewriter GetRewriter() const;
|
|
|
|
};
|
|
|
|
#endif // _SW_UNDO_PAGE_DESC_CHANGE_HXX
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|