while (par && par_depth && !tmpfont.resolved()) {
par = par->outerHook();
if (par) {
+#ifndef INHERIT_LANGUAGE
+ tmpfont.realize(textclasslist.
+ Style(buf->params.textclass,
+ par->getLayout()).font);
+#else
tmpfont.realize(textclasslist.
Style(buf->params.textclass,
par->getLayout()).font,
- buf->params.language);
+ buf->params.language);
+#endif
par_depth = par->getDepth();
}
}
+#ifndef INHERIT_LANGUAGE
+ tmpfont.realize(textclasslist.TextClass(buf->params.textclass).defaultfont());
+#else
tmpfont.realize(textclasslist.TextClass(buf->params.textclass).defaultfont(),
buf->params.language);
+#endif
return tmpfont;
}
// 1% goes here
LyXFont f = par->getFontSettings(buf->params,
pos);
+#ifndef INHERIT_LANGUAGE
+ return f.realize(layout.reslabelfont);
+#else
return f.realize(layout.reslabelfont, buf->params.language);
+#endif
} else {
LyXFont f = par->getFontSettings(buf->params, pos);
+#ifndef INHERIT_LANGUAGE
+ return f.realize(layout.resfont);
+#else
return f.realize(layout.resfont, buf->params.language);
+#endif
}
}
}
LyXFont tmpfont = par->getFontSettings(buf->params, pos);
+#ifndef INHERIT_LANGUAGE
+ tmpfont.realize(layoutfont);
+#else
tmpfont.realize(layoutfont, buf->params.language);
+#endif
return realizeFont(tmpfont, buf, par);
}
{
Buffer const * buf = bv->buffer();
LyXFont font = getFont(buf, par, pos);
- font.update(fnt, toggleall);
+ font.update(fnt, buf->params.language, toggleall);
// Let the insets convert their font
if (par->getChar(pos) == Paragraph::META_INSET) {
Inset * inset = par->getInset(pos);
while (!layoutfont.resolved() && tp && tp->getDepth()) {
tp = tp->outerHook();
if (tp)
+#ifndef INHERIT_LANGUAGE
+ layoutfont.realize(textclasslist.
+ Style(buf->params.textclass,
+ tp->getLayout()).font);
+#else
layoutfont.realize(textclasslist.
Style(buf->params.textclass,
tp->getLayout()).font,
buf->params.language);
+#endif
}
}
+#ifndef INHERIT_LANGUAGE
+ layoutfont.realize(textclasslist.TextClass(buf->params.textclass).defaultfont());
+#else
layoutfont.realize(textclasslist.TextClass(buf->params.textclass).defaultfont(),
buf->params.language);
+#endif
// Now, reduce font against full layout font
font.reduce(layoutfont);
while (!layoutfont.resolved() && tp && tp->getDepth()) {
tp = tp->outerHook();
if (tp)
+#ifndef INHERIT_LANGUAGE
+ layoutfont.realize(textclasslist.
+ Style(buf->params.textclass,
+ tp->getLayout()).font);
+#else
layoutfont.realize(textclasslist.
Style(buf->params.textclass,
tp->getLayout()).font,
buf->params.language);
+#endif
}
}
+#ifndef INHERIT_LANGUAGE
+ layoutfont.realize(textclasslist.TextClass(buf->params.textclass).defaultfont());
+#else
layoutfont.realize(textclasslist.TextClass(buf->params.textclass).defaultfont(),
buf->params.language);
+#endif
// Now, reduce font against full layout font
font.reduce(layoutfont);
cursor.par());
}
// Update current font
- real_current_font.update(font, toggleall);
+ real_current_font.update(font,
+ bview->buffer()->params.language,
+ toggleall);
// Reduce to implicit settings
current_font = real_current_font;
current_font.reduce(layoutfont);
// And resolve it completely
+#ifndef INHERIT_LANGUAGE
+ real_current_font.realize(layoutfont);
+#else
real_current_font.realize(layoutfont,
bview->buffer()->params.language);
+#endif
return;
}
bool pagebreak_top, bool pagebreak_bottom,
VSpace const & space_top,
VSpace const & space_bottom,
+ Spacing const & spacing,
LyXAlignment align,
string labelwidthstring,
bool noindent)
cursor.par()->params().pagebreakBottom(pagebreak_bottom);
cursor.par()->params().spaceTop(space_top);
cursor.par()->params().spaceBottom(space_bottom);
+ cursor.par()->params().spacing(spacing);
// does the layout allow the new alignment?
if (align == LYX_ALIGN_LAYOUT)
align = textclasslist
}
-void LyXText::cutSelection(BufferView * bview, bool doclear)
+void LyXText::cutSelection(BufferView * bview, bool doclear, bool realcut)
{
// Stuff what we got on the clipboard. Even if there is no selection.
endpar = selection.end.par();
int pos = selection.end.pos();
CutAndPaste::cutSelection(selection.start.par(), &endpar,
- selection.start.pos(), pos,
- bview->buffer()->params.textclass, doclear);
+ selection.start.pos(), pos,
+ bview->buffer()->params.textclass, doclear,
+ realcut);
selection.end.pos(pos);
} else {
endpar = selection.end.par();
int pos = selection.end.pos();
CutAndPaste::cutSelection(selection.start.par(), &endpar,
- selection.start.pos(), pos,
- bview->buffer()->params.textclass, doclear);
+ selection.start.pos(), pos,
+ bview->buffer()->params.textclass, doclear,
+ realcut);
cursor.par(endpar);
selection.end.par(endpar);
selection.end.pos(pos);
}
// Cut the selection
- cutSelection(bview);
+ cutSelection(bview, true, false);
unFreezeUndo();
}
void LyXText::setCursor(BufferView * bview, Paragraph * par,
- Paragraph::size_type pos,
- bool setfont, bool boundary) const
+ Paragraph::size_type pos,
+ bool setfont, bool boundary) const
{
LyXCursor old_cursor = cursor;
setCursorIntern(bview, par, pos, setfont, boundary);
{
InsetText * it = static_cast<InsetText *>(par->inInset());
if (it) {
- lyxerr << "InsetText is " << it << endl;
- lyxerr << "inset_owner is " << inset_owner << endl;
if (it != inset_owner) {
+ lyxerr << "InsetText is " << it << endl;
+ lyxerr << "inset_owner is " << inset_owner << endl;
#warning I belive this code is wrong. (Lgb)
#warning Jürgen, have a look at this. (Lgb)
+#warning Hmmm, I guess you are right but we
+#warning should verify when this is needed
// Jürgen, would you like to have a look?
// I guess we need to move the outer cursor
// and open and lock the inset (bla bla bla)
// stuff I don't know... so can you have a look?
// (Lgb)
+ // I moved the lyxerr stuff in here so we can see if this
+ // is actually really needed and where!
+ // (Jug)
it->getLyXText(bview)->setCursorIntern(bview, par, pos, setfont,
- boundary);
+ boundary);
return;
}
}