#include "support/convert.h"
#include "support/lyxtime.h"
-#include "mathed/math_hullinset.h"
-#include "mathed/math_macrotemplate.h"
+#include "mathed/InsetMathHull.h"
+#include "mathed/MathMacroTemplate.h"
#include <boost/current_function.hpp>
if (sel.empty()) {
const int old_pos = cur.pos();
- cur.insert(new MathHullInset(hullSimple));
+ cur.insert(new InsetMathHull(hullSimple));
BOOST_ASSERT(old_pos == cur.pos());
cur.nextInset()->edit(cur, true);
// don't do that also for LFUN_MATH_MODE
if (sel.find("\\newcommand") == string::npos
&& sel.find("\\def") == string::npos)
{
- MathHullInset * formula = new MathHullInset;
+ InsetMathHull * formula = new InsetMathHull;
LyXLex lex(0, 0);
lex.setStream(is);
formula->read(cur.buffer(), lex);
if (edit)
inset->edit(cur, true);
- if (gotsel && pastesel)
+ if (gotsel && pastesel) {
cur.bv().owner()->dispatch(FuncRequest(LFUN_PASTE));
+ // reset first par to default
+ if (cur.lastpit() != 0 || cur.lastpos() != 0) {
+ LyXLayout_ptr const layout =
+ cur.buffer().params().getLyXTextClass().defaultLayout();
+ cur.text()->paragraphs().begin()->layout(layout);
+ }
+ }
return true;
}
case LFUN_CHAR_DELETE_BACKWARD:
if (!cur.selection()) {
- if (bv->owner()->getIntl().getTransManager().backspace()) {
+ if (bv->getIntl().getTransManager().backspace()) {
// Par boundary, full-screen update
if (cur.pos() == 0)
singleParUpdate = false;
docstring::const_iterator end = cmd.argument().end();
for (; cit != end; ++cit)
#if 0
- bv->owner()->getIntl().getTransManager().
+ bv->getIntl().getTransManager().
translateAndInsert(*cit, this);
#else
insertChar(bv->cursor(), *cit);
case LFUN_MATH_MATRIX:
case LFUN_MATH_DELIM:
case LFUN_MATH_BIGDELIM: {
- cur.insert(new MathHullInset(hullSimple));
+ cur.insert(new InsetMathHull(hullSimple));
cur.dispatch(FuncRequest(LFUN_CHAR_FORWARD));
cur.dispatch(cmd);
break;
bv->owner()->getLyXFunc().handleKeyFunc(cmd.action);
if (!cmd.argument().empty())
// FIXME: Are all these characters encoded in one byte in utf8?
- bv->owner()->getIntl().getTransManager()
+ bv->getIntl().getTransManager()
.translateAndInsert(cmd.argument()[0], this);
break;