2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02: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 .
|
|
|
|
*/
|
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: */
|