#include "insets/insetcharstyle.h"
#include "insets/insettabular.h"
-#include "mathed/math_data.h"
-#include "mathed/math_inset.h"
-#include "mathed/math_support.h"
+#include "mathed/MathData.h"
+#include "mathed/InsetMath.h"
+#include "mathed/MathSupport.h"
#include "support/lstrings.h"
// to the buffer language.
if (p.ownerCode() == InsetBase::ERT_CODE) {
p.changeLanguage(buffer_.params(), latex_language,
- buffer_.getLanguage());
+ buffer_.getLanguage());
}
p.setInsetOwner(0);
}
it->layout(tclass2.defaultLayout());
if (!hasLayout && name != tclass1.defaultLayoutName()) {
- string const s = bformat(
- _("Layout had to be changed from\n%1$s to %2$s\n"
- "because of class conversion from\n%3$s to %4$s"),
- name, it->layout()->name(), tclass1.name(), tclass2.name());
+ docstring const s = bformat(
+ _("Layout had to be changed from\n%1$s to %2$s\n"
+ "because of class conversion from\n%3$s to %4$s"),
+ lyx::from_utf8(name), lyx::from_utf8(it->layout()->name()),
+ lyx::from_utf8(tclass1.name()), lyx::from_utf8(tclass2.name()));
// To warn the user that something had to be done.
errorlist.push_back(ErrorItem(_("Changed Layout"), s,
it->id(), 0,
if (found_cs == tclass2.charstyles().end()) {
// The character style is undefined in tclass2
inset.setUndefined();
- string const s = bformat(_(
+ docstring const s = bformat(_(
"Character style %1$s is "
"undefined because of class "
"conversion from\n%2$s to %3$s"),
- name, tclass1.name(), tclass2.name());
+ lyx::from_utf8(name), lyx::from_utf8(tclass1.name()),
+ lyx::from_utf8(tclass2.name()));
// To warn the user that something had to be done.
errorlist.push_back(ErrorItem(
- _("Undefined character style"),
- s, it.paragraph().id(),
- it.pos(), it.pos() + 1));
+ _("Undefined character style"),
+ s, it.paragraph().id(), it.pos(), it.pos() + 1));
} else if (inset.undefined()) {
// The character style is undefined in
// tclass1 and is defined in tclass2
// faster we need to be more clever and probably also have more
// calls to cur.bv().owner()->gui().selection().put. (Lgb)
// cur.bv().owner()->gui().selection().put(cur.selectionAsString(true));
-
+
// make sure that the depth behind the selection are restored, too
recordUndoSelection(cur);
text->setCursor(cur, ppp.first, ppp.second);
}
- // mathed is handled in MathNestInset/MathGridInset
+ // mathed is handled in InsetMathNest/InsetMathGrid
BOOST_ASSERT(!cur.inMathed());
}
//lyxerr << "LCursor::eraseSelection begin: " << cur << endl;
CursorSlice const & i1 = cur.selBegin();
CursorSlice const & i2 = cur.selEnd();
- if (i1.inset().asMathInset()) {
+ if (i1.inset().asInsetMath()) {
cur.top() = i1;
if (i1.idx() == i2.idx()) {
i1.cell().erase(i1.pos(), i2.pos());
if (cur.pos() > cur.lastpos())
cur.pos() = cur.lastpos();
} else {
- MathInset * p = i1.asMathInset();
+ InsetMath * p = i1.asInsetMath();
InsetBase::row_type r1, r2;
InsetBase::col_type c1, c2;
region(i1, i2, r1, r2, c1, c2);
CursorSlice i2 = cur.selEnd();
if (i1.idx() == i2.idx()) {
- if (i1.inset().asMathInset()) {
+ if (i1.inset().asInsetMath()) {
MathArray::const_iterator it = i1.cell().begin();
return asString(MathArray(it + i1.pos(), it + i2.pos()));
} else {
region(i1, i2, r1, r2, c1, c2);
string data;
- if (i1.inset().asMathInset()) {
+ if (i1.inset().asInsetMath()) {
for (InsetBase::row_type row = r1; row <= r2; ++row) {
if (row > r1)
data += "\\\\";
for (InsetBase::col_type col = c1; col <= c2; ++col) {
if (col > c1)
data += '&';
- data += asString(i1.asMathInset()->
- cell(i1.asMathInset()->index(row, col)));
+ data += asString(i1.asInsetMath()->
+ cell(i1.asInsetMath()->index(row, col)));
}
}
} else {