2000-04-10 14:29:05 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 the LyX Team.
|
2000-04-10 14:29:05 +00:00
|
|
|
*
|
|
|
|
* ====================================================== */
|
|
|
|
|
|
|
|
#ifndef CUTANDPASTE_H
|
|
|
|
#define CUTANDPASTE_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "layout.h"
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
class Paragraph;
|
2000-04-10 14:29:05 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
class CutAndPaste {
|
|
|
|
public:
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
2001-06-25 00:06:33 +00:00
|
|
|
bool cutSelection(Paragraph * startpar, Paragraph ** endpar,
|
2001-04-03 08:34:52 +00:00
|
|
|
int start, int & end, char tc, bool doclear = false);
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
2001-06-25 00:06:33 +00:00
|
|
|
bool copySelection(Paragraph * startpar, Paragraph * endpar,
|
2001-04-03 08:34:52 +00:00
|
|
|
int start, int end, char tc);
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
2001-06-25 00:06:33 +00:00
|
|
|
bool pasteSelection(Paragraph ** par, Paragraph ** endpar,
|
2001-04-03 08:34:52 +00:00
|
|
|
int & pos, char tc);
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
|
|
|
int nrOfParagraphs();
|
2000-04-11 22:55:29 +00:00
|
|
|
/** needed to switch between different classes this works
|
|
|
|
for a list of paragraphs beginning with the specified par
|
|
|
|
return value is the number of wrong conversions
|
2000-08-07 20:58:24 +00:00
|
|
|
*/
|
|
|
|
static
|
2000-04-11 22:55:29 +00:00
|
|
|
int SwitchLayoutsBetweenClasses(LyXTextClassList::size_type class1,
|
2001-04-03 08:34:52 +00:00
|
|
|
LyXTextClassList::size_type class2,
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph * par);
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
2001-06-25 00:06:33 +00:00
|
|
|
bool checkPastePossible(Paragraph *);
|
2000-04-10 14:29:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|