mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
src/insets/insettabular (doDispatch, insertAsciiString): fix insertion of \t- and \n-separated content from external clipboard (bug 2394)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@13519 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
820cf70cd5
commit
f2ad6169c8
@ -1,3 +1,9 @@
|
|||||||
|
2006-03-11 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
*insettabular (doDispatch, insertAsciiString):
|
||||||
|
fix insertion of \t- and \n-separated content from external
|
||||||
|
clipboard (bug 2394).
|
||||||
|
|
||||||
2006-03-23 Lars Gullik Bjønnes <larsbj@gullik.net>
|
2006-03-23 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* insettext.h: get forward declaration of ParagraphList
|
* insettext.h: get forward declaration of ParagraphList
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
using lyx::cap::dirtyTabularStack;
|
||||||
using lyx::cap::tabularStackDirty;
|
using lyx::cap::tabularStackDirty;
|
||||||
|
|
||||||
using lyx::graphics::PreviewLoader;
|
using lyx::graphics::PreviewLoader;
|
||||||
@ -467,10 +468,8 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cmd.button() == mouse_button::button2) {
|
if (cmd.button() == mouse_button::button2) {
|
||||||
// FIXME: pasting multiple cells (with insettabular's own
|
|
||||||
// LFUN_PASTESELECTION still does not work! (jspitzm)
|
|
||||||
cmd = FuncRequest(LFUN_PASTESELECTION, "paragraph");
|
cmd = FuncRequest(LFUN_PASTESELECTION, "paragraph");
|
||||||
cell(cur.idx())->dispatch(cur, cmd);
|
doDispatch(cur, cmd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -726,11 +725,15 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
|
|||||||
if (cell < cells && op < len)
|
if (cell < cells && op < len)
|
||||||
paste_tabular->getCellInset(cell)->
|
paste_tabular->getCellInset(cell)->
|
||||||
setText(clip.substr(op, len - op), font);
|
setText(clip.substr(op, len - op), font);
|
||||||
} else if (!insertAsciiString(cur.bv(), clip, true)) {
|
dirtyTabularStack(true);
|
||||||
|
} else if (insertAsciiString(cur.bv(), clip, false))
|
||||||
|
break;
|
||||||
|
else {
|
||||||
// so that the clipboard is used and it goes on
|
// so that the clipboard is used and it goes on
|
||||||
// to default
|
// to default
|
||||||
// and executes LFUN_PASTESELECTION in insettext!
|
// and executes LFUN_PASTESELECTION in insettext!
|
||||||
paste_tabular.reset();
|
paste_tabular.reset();
|
||||||
|
dirtyTabularStack(false);
|
||||||
}
|
}
|
||||||
// fall through
|
// fall through
|
||||||
}
|
}
|
||||||
@ -1885,6 +1888,7 @@ bool InsetTabular::insertAsciiString(BufferView & bv, string const & buf,
|
|||||||
new LyXTabular(bv.buffer()->params(), rows, maxCols, &bv));
|
new LyXTabular(bv.buffer()->params(), rows, maxCols, &bv));
|
||||||
loctab = paste_tabular.get();
|
loctab = paste_tabular.get();
|
||||||
cols = 0;
|
cols = 0;
|
||||||
|
dirtyTabularStack(true);
|
||||||
} else {
|
} else {
|
||||||
loctab = &tabular;
|
loctab = &tabular;
|
||||||
cell = bv.cursor().idx();
|
cell = bv.cursor().idx();
|
||||||
|
@ -94,6 +94,8 @@ What's new
|
|||||||
|
|
||||||
- Fix copy and paste for multiple cells (bug 2377).
|
- Fix copy and paste for multiple cells (bug 2377).
|
||||||
|
|
||||||
|
- Fix insertion of external multi-cell material into tabulars (bug 2394).
|
||||||
|
|
||||||
- Fix drawing of inset buttons (bug 2328)
|
- Fix drawing of inset buttons (bug 2328)
|
||||||
|
|
||||||
- Small optimizations in the way the Qt frontend updates the screen,
|
- Small optimizations in the way the Qt frontend updates the screen,
|
||||||
|
Loading…
Reference in New Issue
Block a user