2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 20:25:33 +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-10-28 04:06:23 +01:00
|
|
|
#ifndef INCLUDED_VCL_SOURCE_EDIT_TEXTUND2_HXX
|
|
|
|
#define INCLUDED_VCL_SOURCE_EDIT_TEXTUND2_HXX
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2012-08-30 10:18:14 +02:00
|
|
|
#include "textundo.hxx"
|
|
|
|
#include <vcl/textdata.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
class TextUndoDelPara : public TextUndo
|
|
|
|
{
|
|
|
|
private:
|
2013-05-22 09:11:28 +09:00
|
|
|
bool mbDelObject;
|
2013-05-04 16:34:02 -04:00
|
|
|
sal_uLong mnPara;
|
|
|
|
TextNode* mpNode; // points at the valid not-destroyed object
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
public:
|
2014-03-26 11:54:10 +01:00
|
|
|
TYPEINFO_OVERRIDE();
|
2011-01-12 15:56:50 +01:00
|
|
|
TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, sal_uLong nPara );
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~TextUndoDelPara();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual void Undo() SAL_OVERRIDE;
|
|
|
|
virtual void Redo() SAL_OVERRIDE;
|
2012-08-30 10:18:14 +02:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual OUString GetComment () const SAL_OVERRIDE;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class TextUndoConnectParas : public TextUndo
|
|
|
|
{
|
|
|
|
private:
|
2011-01-12 15:56:50 +01:00
|
|
|
sal_uLong mnPara;
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 mnSepPos;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
public:
|
2014-03-26 11:54:10 +01:00
|
|
|
TYPEINFO_OVERRIDE();
|
2011-01-12 15:56:50 +01:00
|
|
|
TextUndoConnectParas( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nSepPos );
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~TextUndoConnectParas();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual void Undo() SAL_OVERRIDE;
|
|
|
|
virtual void Redo() SAL_OVERRIDE;
|
2012-08-30 10:18:14 +02:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual OUString GetComment () const SAL_OVERRIDE;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class TextUndoSplitPara : public TextUndo
|
|
|
|
{
|
|
|
|
private:
|
2011-01-12 15:56:50 +01:00
|
|
|
sal_uLong mnPara;
|
2010-11-05 10:31:15 +08:00
|
|
|
sal_uInt16 mnSepPos;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
public:
|
2014-03-26 11:54:10 +01:00
|
|
|
TYPEINFO_OVERRIDE();
|
2011-01-12 15:56:50 +01:00
|
|
|
TextUndoSplitPara( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nSepPos );
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~TextUndoSplitPara();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual void Undo() SAL_OVERRIDE;
|
|
|
|
virtual void Redo() SAL_OVERRIDE;
|
2012-08-30 10:18:14 +02:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual OUString GetComment () const SAL_OVERRIDE;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class TextUndoInsertChars : public TextUndo
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
TextPaM maTextPaM;
|
2013-08-11 17:00:11 +01:00
|
|
|
OUString maText;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
public:
|
2014-03-26 11:54:10 +01:00
|
|
|
TYPEINFO_OVERRIDE();
|
2013-08-11 17:00:11 +01:00
|
|
|
TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual void Undo() SAL_OVERRIDE;
|
|
|
|
virtual void Redo() SAL_OVERRIDE;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual bool Merge( SfxUndoAction *pNextAction ) SAL_OVERRIDE;
|
2012-08-30 10:18:14 +02:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual OUString GetComment () const SAL_OVERRIDE;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class TextUndoRemoveChars : public TextUndo
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
TextPaM maTextPaM;
|
2013-08-11 17:00:11 +01:00
|
|
|
OUString maText;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
public:
|
2014-03-26 11:54:10 +01:00
|
|
|
TYPEINFO_OVERRIDE();
|
2013-08-11 17:00:11 +01:00
|
|
|
TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual void Undo() SAL_OVERRIDE;
|
|
|
|
virtual void Redo() SAL_OVERRIDE;
|
2012-08-30 10:18:14 +02:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual OUString GetComment () const SAL_OVERRIDE;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class TextUndoSetAttribs: public TextUndo
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
TextSelection maSelection;
|
|
|
|
|
|
|
|
public:
|
2014-03-26 11:54:10 +01:00
|
|
|
TYPEINFO_OVERRIDE();
|
2000-09-18 16:07:07 +00:00
|
|
|
TextUndoSetAttribs( TextEngine* pTextEngine, const TextSelection& rESel );
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~TextUndoSetAttribs();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual void Undo() SAL_OVERRIDE;
|
|
|
|
virtual void Redo() SAL_OVERRIDE;
|
2012-08-30 10:18:14 +02:00
|
|
|
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual OUString GetComment () const SAL_OVERRIDE;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
2013-10-28 04:06:23 +01:00
|
|
|
#endif // INCLUDED_VCL_SOURCE_EDIT_TEXTUND2_HXX
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|