The previous commit inadvertently contained some of this one, which is just a renaming.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26110 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-08-09 16:29:25 +00:00
parent bcedd63443
commit ebfe9d60d7
2 changed files with 14 additions and 11 deletions

View File

@ -72,8 +72,11 @@ public:
/// selection active?
bool & selection() { return selection_; }
/// do we have a multicell selection?
bool isMultiCell() const
bool selIsMultiCell() const
{ return selection_ && selBegin().idx() != selEnd().idx(); }
/// do we have a multiline selection?
bool selIsMultiLine() const
{ return selection_ && selBegin().pit() != selEnd().pit(); }
/// did we place the anchor?
bool mark() const { return mark_; }
/// did we place the anchor?

View File

@ -2995,7 +2995,7 @@ void InsetTabular::drawSelection(PainterInfo & pi, int x, int y) const
//resetPos(cur);
if (cur.isMultiCell()) {
if (cur.selIsMultiCell()) {
row_type rs, re;
col_type cs, ce;
getSelection(cur, rs, re, cs, ce);
@ -3166,7 +3166,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
// some cells (bug 2715).
if (cmd.button() == mouse_button::button3
&& &bvcur.selBegin().inset() == this
&& bvcur.isMultiCell())
&& bvcur.selIsMultiCell())
;
else
// Let InsetTableCell do it
@ -3214,7 +3214,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
bvcur.selection() = true;
// if this is a multicell selection, we just set the cursor to
// the beginning of the cell's text.
if (bvcur.isMultiCell()) {
if (bvcur.selIsMultiCell()) {
bvcur.pit() = 0;
bvcur.pos() = 0;
}
@ -3279,7 +3279,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
}
// if we don't have a multicell selection...
if (!cur.isMultiCell() ||
if (!cur.selIsMultiCell() ||
// ...or we're not doing some LFUN_*_SELECT thing, anyway...
(cmd.action != LFUN_CHAR_FORWARD_SELECT &&
cmd.action != LFUN_CHAR_BACKWARD_SELECT &&
@ -3423,7 +3423,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
}
case LFUN_CUT:
if (cur.isMultiCell()) {
if (cur.selIsMultiCell()) {
if (copySelection(cur)) {
cur.recordUndoInset(DELETE_UNDO);
cutSelection(cur);
@ -3435,7 +3435,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
case LFUN_CHAR_DELETE_BACKWARD:
case LFUN_CHAR_DELETE_FORWARD:
if (cur.isMultiCell()) {
if (cur.selIsMultiCell()) {
cur.recordUndoInset(DELETE_UNDO);
cutSelection(cur);
}
@ -3446,7 +3446,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
case LFUN_COPY:
if (!cur.selection())
break;
if (cur.isMultiCell()) {
if (cur.selIsMultiCell()) {
cur.finishUndo();
copySelection(cur);
} else
@ -3507,7 +3507,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
case LFUN_WORD_UPCASE:
case LFUN_WORD_LOWCASE:
case LFUN_CHARS_TRANSPOSE:
if (cur.isMultiCell()) {
if (cur.selIsMultiCell()) {
row_type rs, re;
col_type cs, ce;
getSelection(cur, rs, re, cs, ce);
@ -3779,7 +3779,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_BRANCH_INSERT:
case LFUN_WRAP_INSERT:
case LFUN_ERT_INSERT: {
if (cur.isMultiCell()) {
if (cur.selIsMultiCell()) {
status.setEnabled(false);
return true;
} else
@ -3801,7 +3801,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
return true;
case LFUN_PASTE:
if (cur.isMultiCell()) {
if (cur.selIsMultiCell()) {
status.setEnabled(false);
status.message(_("You cannot paste into a multicell selection."));
return true;