void Paragraph::Pimpl::setChar(Paragraph::size_type pos,
- Paragraph::value_type c)
+ Paragraph::value_type c)
{
text[pos] = c;
}
void Paragraph::Pimpl::insertChar(Paragraph::size_type pos,
- Paragraph::value_type c,
- LyXFont const & font)
+ Paragraph::value_type c,
+ LyXFont const & font)
{
lyx::Assert(pos <= size());
// Update the font table.
FontTable search_font(pos, LyXFont());
for (FontList::iterator it = std::lower_bound(fontlist.begin(),
- fontlist.end(),
- search_font, matchFT());
+ fontlist.end(),
+ search_font, matchFT());
it != fontlist.end(); ++it)
+ {
it->pos(it->pos() + 1);
+ }
// Update the inset table.
InsetTable search_inset(pos, 0);
for (InsetList::iterator it = std::lower_bound(owner_->insetlist.begin(),
- owner_->insetlist.end(),
- search_inset, matchIT());
+ owner_->insetlist.end(),
+ search_inset, matchIT());
it != owner_->insetlist.end(); ++it)
+ {
++it->pos;
-
+ }
owner_->setFont(pos, font);
}
os << "}";
if (tmp) {
+ for (int j = 0; j < tmp; ++j) {
+ texrow.newline();
+ }
+ texrow.start(owner_, i + 1);
column = 0;
} else {
column += int(os.tellp()) - len;
}
- for (; tmp--;) {
- texrow.newline();
- }
}
}
break;
case '°': case '±': case '²': case '³':
case '×': case '÷': case '¹': case 'ª':
case 'º': case '¬': case 'µ':
- if (bparams.inputenc == "latin1" ||
+ if ((bparams.inputenc == "latin1" ||
+ bparams.inputenc == "latin9") ||
(bparams.inputenc == "auto" &&
- font.language()->encoding()->LatexName()
- == "latin1")) {
+ (font.language()->encoding()->LatexName()
+ == "latin1" ||
+ font.language()->encoding()->LatexName()
+ == "latin9"))) {
os << "\\ensuremath{"
<< c
<< '}';
while (par && par->getDepth() && !tmpfont.resolved()) {
par = par->outerHook();
if (par) {
+#ifndef INHERIT_LANGUAGE
+ tmpfont.realize(textclasslist.
+ Style(bparams.textclass,
+ par->getLayout()).font);
+#else
tmpfont.realize(textclasslist.
Style(bparams.textclass,
par->getLayout()).font, bparams.language);
+#endif
par_depth = par->getDepth();
}
}
- tmpfont.realize(textclasslist
- .TextClass(bparams.textclass)
+#ifndef INHERIT_LANGUAGE
+ tmpfont.realize(textclasslist.TextClass(bparams.textclass)
+ .defaultfont());
+#else
+ tmpfont.realize(textclasslist.TextClass(bparams.textclass)
.defaultfont(), bparams.language);
+#endif
return tmpfont;
}