mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
bug 778
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6832 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f403a65ad6
commit
c5e48cabc7
@ -613,25 +613,6 @@ void BufferView::redo()
|
||||
}
|
||||
|
||||
|
||||
void BufferView::copyEnvironment()
|
||||
{
|
||||
if (available()) {
|
||||
text->copyEnvironmentType();
|
||||
owner()->message(_("Paragraph environment type copied"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BufferView::pasteEnvironment()
|
||||
{
|
||||
if (available()) {
|
||||
text->pasteEnvironmentType();
|
||||
owner()->message(_("Paragraph environment type set"));
|
||||
update(text, BufferView::SELECT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// these functions are for the spellchecker
|
||||
WordLangTuple const BufferView::nextWord(float & value)
|
||||
{
|
||||
|
@ -146,11 +146,6 @@ public:
|
||||
/// move cursor to the named label
|
||||
void gotoLabel(string const & label);
|
||||
|
||||
/// copy the environment type from current paragraph
|
||||
void copyEnvironment();
|
||||
/// set the current paragraph's environment type
|
||||
void pasteEnvironment();
|
||||
|
||||
/// undo last action
|
||||
void undo();
|
||||
/// redo last action
|
||||
|
@ -975,15 +975,6 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev_in)
|
||||
// a tabular-inset
|
||||
break;
|
||||
|
||||
case LFUN_LAYOUT_COPY:
|
||||
bv_->copyEnvironment();
|
||||
break;
|
||||
|
||||
case LFUN_LAYOUT_PASTE:
|
||||
bv_->pasteEnvironment();
|
||||
switchKeyMap();
|
||||
break;
|
||||
|
||||
case LFUN_FILE_INSERT:
|
||||
MenuInsertLyXFile(ev.argument);
|
||||
break;
|
||||
|
@ -1,3 +1,13 @@
|
||||
2003-04-18 John Levon <levon@movementarian.org>
|
||||
|
||||
* BufferView.h:
|
||||
* BufferView.C:
|
||||
* BufferView_pimpl.C:
|
||||
* lfuns.h:
|
||||
* LyXAction.C:
|
||||
* lyxtext.h:
|
||||
* text2.C: remove layout-copy/paste (bug 778)
|
||||
|
||||
2003-04-16 Alfredo Braunstein <abraunst@libero.it>
|
||||
|
||||
* text2.C (redoParagraphs): eliminate good_prevrit, rewrite a loop
|
||||
|
@ -190,10 +190,8 @@ void LyXAction::init()
|
||||
{ LFUN_LATEX_LOG, "latex-view-log", ReadOnly },
|
||||
{ LFUN_LAYOUT, "layout", Noop },
|
||||
{ LFUN_LAYOUT_CHARACTER, "layout-character", ReadOnly },
|
||||
{ LFUN_LAYOUT_COPY, "layout-copy", Noop },
|
||||
{ LFUN_LAYOUT_DOCUMENT, "layout-document", ReadOnly },
|
||||
{ LFUN_LAYOUT_PARAGRAPH, "layout-paragraph", ReadOnly },
|
||||
{ LFUN_LAYOUT_PASTE, "layout-paste", Noop },
|
||||
{ LFUN_LAYOUT_PREAMBLE, "layout-preamble", ReadOnly },
|
||||
{ LFUN_LAYOUT_TABULAR, "layout-tabular", Noop },
|
||||
{ LFUN_HOME, "line-begin", ReadOnly },
|
||||
|
40
src/lfuns.h
40
src/lfuns.h
@ -225,115 +225,113 @@ enum kb_action {
|
||||
LFUN_INDEX_PRINT, // Lgb 97-02-27
|
||||
// 165
|
||||
LFUN_LATEX_LOG, // Lgb 97-04-05
|
||||
LFUN_LAYOUT_COPY, // Asger 1997-05-04
|
||||
LFUN_LAYOUT_PASTE, // Asger 1997-05-04
|
||||
LFUN_CELL_SPLIT,
|
||||
LFUN_CHILDOPEN, // Ale 970528
|
||||
// 170
|
||||
LFUN_TOC_INSERT, // Lgb 97-05-27
|
||||
LFUN_FLOAT_LIST, // Lgb 20010503
|
||||
// 170
|
||||
LFUN_READ_ONLY_TOGGLE, // Lgb 97-05-27
|
||||
LFUN_VC_REGISTER, // Lgb 97-07-01
|
||||
LFUN_VC_CHECKIN, // Lgb 97-07-01
|
||||
// 175
|
||||
LFUN_VC_CHECKOUT, // Lgb 97-07-01
|
||||
LFUN_VC_REVERT, // Lgb 97-07-01
|
||||
// 175
|
||||
LFUN_VC_UNDO, // Lgb 97-07-01
|
||||
LFUN_VC_HISTORY, // Lgb 97-07-01
|
||||
LFUN_EXPORT, // Lgb 97-07-29
|
||||
// 180
|
||||
LFUN_REF_GOTO, // Ale 970806
|
||||
LFUN_PARENTINSERT, // Ale 970813
|
||||
// 180
|
||||
LFUN_REMOVEERRORS, // Asger 970906
|
||||
LFUN_LDOTS, // Asger 970929
|
||||
LFUN_END_OF_SENTENCE, // Asger 970929
|
||||
// 185
|
||||
LFUN_RUNCHKTEX, // Asger 971030
|
||||
LFUN_TOGGLECURSORFOLLOW, // ARRae 971202
|
||||
LFUN_RUNCHKTEX, // Asger 971030
|
||||
// 185
|
||||
LFUN_HTMLURL, // CFO-G 971121
|
||||
LFUN_URL, // CFO-G 971121
|
||||
LFUN_WORDFINDFORWARD, // Etienne 980216
|
||||
// 190
|
||||
LFUN_WORDFINDBACKWARD, // Etienne 980220
|
||||
LFUN_APPENDIX, // ettrich 980505
|
||||
// 190
|
||||
LFUN_IMPORT, // Asger 980724
|
||||
LFUN_MENU_SEPARATOR, // Asger 990220
|
||||
LFUN_SEQUENCE, // Andre' 991111
|
||||
// 195
|
||||
LFUN_DIALOG_PREFERENCES, // ARRae 20000726
|
||||
LFUN_SAVEPREFERENCES, // Lgb 991127
|
||||
// 195
|
||||
LFUN_HELP_OPEN, // Jug 990627
|
||||
LFUN_DATE_INSERT, // jdblair 20000131
|
||||
LFUN_LANGUAGE, // Dekel 20000203
|
||||
// 200
|
||||
LFUN_INSET_ERT, // Jug 20000218
|
||||
LFUN_INSET_FOOTNOTE, // Jug 20000307
|
||||
// 200
|
||||
LFUN_PARAGRAPH_SPACING, // Lgb 20000411
|
||||
LFUN_TABULAR_INSERT, // Jug 20000412
|
||||
LFUN_LOFVIEW, // Dekel 20000519
|
||||
// 205
|
||||
LFUN_LOTVIEW, // Dekel 20000519
|
||||
LFUN_LOAVIEW, // Dekel 20000519
|
||||
// 205
|
||||
LFUN_SET_COLOR, // SLior 20000611
|
||||
LFUN_INSET_MARGINAL, // Lgb 20000626
|
||||
LFUN_INSET_MINIPAGE, // Lgb 20000627
|
||||
// 210
|
||||
LFUN_INSET_FLOAT, // Lgb 20000627
|
||||
LFUN_INSET_WIDE_FLOAT, // Lgb 20010531
|
||||
// 210
|
||||
LFUN_INSET_CAPTION, // Lgb 20000718
|
||||
LFUN_SWITCHBUFFER,
|
||||
LFUN_TABULAR_FEATURE, // Jug 20000728
|
||||
// 215
|
||||
LFUN_LAYOUT_TABULAR, // Jug 20000731
|
||||
LFUN_SCROLL_INSET, // Jug 20000801
|
||||
// 215
|
||||
LFUN_UPDATE, // Dekel 20000805
|
||||
LFUN_INDEX_INSERT, // Angus 20000803
|
||||
LFUN_SCREEN_FONT_UPDATE, // ARRae 20000813
|
||||
// 220
|
||||
LFUN_GOTO_PARAGRAPH, // Dekel 20000826
|
||||
LFUN_REFERENCE_GOTO, // Dekel 20010114
|
||||
// 220
|
||||
LFUN_BOOKMARK_SAVE, // Dekel 20010127
|
||||
LFUN_BOOKMARK_GOTO, // Dekel 20010127
|
||||
LFUN_SELECT_FILE_SYNC, // Levon 20010214
|
||||
// 225
|
||||
LFUN_MESSAGE, // Lgb 20010408
|
||||
LFUN_TRANSPOSE_CHARS, // Lgb 20010425
|
||||
// 225
|
||||
LFUN_ESCAPE, // Lgb 20010517
|
||||
LFUN_HELP_ABOUTLYX, // Edwin 20010712
|
||||
LFUN_THESAURUS_ENTRY, // Levon 20010720
|
||||
// 230
|
||||
LFUN_HELP_TEXINFO, // Herbert 20011001
|
||||
LFUN_FORKS_SHOW, // Angus 16 Feb 2002
|
||||
// 230
|
||||
LFUN_FORKS_KILL, // Angus 16 Feb 2002
|
||||
LFUN_TOOLTIPS_TOGGLE, // Angus 8 Mar 2002
|
||||
LFUN_INSET_OPTARG, // Martin 12 Aug 2002
|
||||
// 235
|
||||
LFUN_MOUSE_PRESS, // André 9 Aug 2002
|
||||
LFUN_MOUSE_MOTION, // André 9 Aug 2002
|
||||
// 235
|
||||
LFUN_MOUSE_RELEASE, // André 9 Aug 2002
|
||||
LFUN_MOUSE_DOUBLE, // André 9 Aug 2002
|
||||
LFUN_MOUSE_TRIPLE, // André 9 Aug 2002
|
||||
// 240
|
||||
LFUN_EDIT, // André 16 Aug 2002
|
||||
LFUN_INSET_WRAP, // Dekel 7 Apr 2002
|
||||
// 240
|
||||
LFUN_TRACK_CHANGES, // Levon 20021001 (cool date !)
|
||||
LFUN_MERGE_CHANGES, // Levon 20021016
|
||||
LFUN_ACCEPT_CHANGE, // Levon 20021016
|
||||
// 245
|
||||
LFUN_REJECT_CHANGE, // Levon 20021016
|
||||
LFUN_ACCEPT_ALL_CHANGES, // Levon 20021016
|
||||
// 245
|
||||
LFUN_REJECT_ALL_CHANGES, // Levon 20021016
|
||||
LFUN_INSERT_BIBITEM, // André 14 Feb 2003
|
||||
LFUN_DIALOG_SHOW_NEW_INSET,
|
||||
// 250
|
||||
LFUN_DIALOG_SHOW_NEXT_INSET,
|
||||
LFUN_DIALOG_UPDATE,
|
||||
// 250
|
||||
LFUN_DIALOG_HIDE,
|
||||
LFUN_DIALOG_DISCONNECT_INSET,
|
||||
LFUN_INSET_APPLY,
|
||||
// 255
|
||||
LFUN_INSET_INSERT,
|
||||
LFUN_INSET_MODIFY,
|
||||
// 255
|
||||
LFUN_INSET_DIALOG_UPDATE,
|
||||
LFUN_PARAGRAPH_APPLY,
|
||||
LFUN_PARAGRAPH_UPDATE,
|
||||
|
@ -419,10 +419,6 @@ public:
|
||||
void copySelection();
|
||||
///
|
||||
void pasteSelection();
|
||||
///
|
||||
void copyEnvironmentType();
|
||||
///
|
||||
void pasteEnvironmentType();
|
||||
|
||||
/** the DTP switches for paragraphs. LyX will store the top settings
|
||||
always in the first physical paragraph, the bottom settings in the
|
||||
@ -505,12 +501,6 @@ private:
|
||||
*/
|
||||
void redoDrawingOfParagraph(LyXCursor const & cursor);
|
||||
|
||||
/** Copybuffer for copy environment type.
|
||||
Asger has learned that this should be a buffer-property instead
|
||||
Lgb has learned that 'char' is a lousy type for non-characters
|
||||
*/
|
||||
string copylayouttype;
|
||||
|
||||
/// removes the row and reset the touched counters
|
||||
void removeRow(RowList::iterator rit);
|
||||
|
||||
|
@ -92,8 +92,6 @@ public:
|
||||
|
||||
/// return the unique ID of this paragraph
|
||||
int id() const;
|
||||
///
|
||||
void read();
|
||||
|
||||
///
|
||||
int startTeXParParams(BufferParams const &, std::ostream &, bool) const;
|
||||
|
15
src/text2.C
15
src/text2.C
@ -79,7 +79,6 @@ void LyXText::init(BufferView * bview, bool reinit)
|
||||
rowlist_.clear();
|
||||
need_break_row = rows().end();
|
||||
width = height = 0;
|
||||
copylayouttype.erase();
|
||||
top_y(0);
|
||||
clearPaint();
|
||||
} else if (!rowlist_.empty())
|
||||
@ -1273,20 +1272,6 @@ void LyXText::insertInset(Inset * inset)
|
||||
}
|
||||
|
||||
|
||||
void LyXText::copyEnvironmentType()
|
||||
{
|
||||
copylayouttype = cursor.par()->layout()->name();
|
||||
}
|
||||
|
||||
|
||||
void LyXText::pasteEnvironmentType()
|
||||
{
|
||||
// do nothing if there has been no previous copyEnvironmentType()
|
||||
if (!copylayouttype.empty())
|
||||
setLayout(copylayouttype);
|
||||
}
|
||||
|
||||
|
||||
void LyXText::cutSelection(bool doclear, bool realcut)
|
||||
{
|
||||
// Stuff what we got on the clipboard. Even if there is no selection.
|
||||
|
Loading…
Reference in New Issue
Block a user