#include "cursor.h"
#include "debug.h"
#include "funcrequest.h"
+#include "undo.h"
#include "frontends/Painter.h"
-#include "support/std_sstream.h"
-
#include "insets/mailinset.h"
+#include <sstream>
+
using std::endl;
using std::max;
using std::min;
}
-auto_ptr<InsetBase> MathGridInset::clone() const
+auto_ptr<InsetBase> MathGridInset::doClone() const
{
return auto_ptr<InsetBase>(new MathGridInset(*this));
}
}
-void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
{
//lyxerr << "*** MathGridInset: request: " << cmd << endl;
switch (cmd.action) {
// GridInsetMailer(*this).showDialog();
// return DispatchResult(true, true);
//}
- MathNestInset::priv_dispatch(cur, cmd);
+ MathNestInset::doDispatch(cur, cmd);
break;
case LFUN_INSET_DIALOG_UPDATE:
// insert file functions
case LFUN_DELETE_LINE_FORWARD:
+ recordUndo(cur);
//autocorrect_ = false;
//macroModeClose();
//if (selection_) {
break;
case LFUN_CELL_SPLIT:
- ////recordUndo(cur, Undo::ATOMIC);
+ recordUndo(cur);
splitCell(cur);
break;
case LFUN_BREAKLINE: {
- ////recordUndo(cur, Undo::INSERT);
+ recordUndo(cur);
row_type const r = cur.row();
addRow(r);
swap(cell(cur.idx()), cell(cur.idx() + ncols() - 1));
if (cur.idx() > 0)
--cur.idx();
- cur.idx() = cur.lastpos();
+ cur.pos() = cur.lastpos();
//mathcursor->normalize();
- cmd = FuncRequest(LFUN_FINISHED_LEFT);
+ //cmd = FuncRequest(LFUN_FINISHED_LEFT);
break;
}
case LFUN_TABULAR_FEATURE: {
+ recordUndo(cur);
//lyxerr << "handling tabular-feature " << cmd.argument << endl;
istringstream is(cmd.argument);
string s;
}
case LFUN_PASTE: {
+ recordUndo(cur);
lyxerr << "MathGridInset: PASTE: " << cmd << std::endl;
istringstream is(cmd.argument);
int n = 0;
break;
default:
- MathNestInset::priv_dispatch(cur, cmd);
+ MathNestInset::doDispatch(cur, cmd);
}
}