Fixed \foreignlanguage outputs and small fix to x return on ERTInsets Button.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3969 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2002-04-11 13:35:03 +00:00
parent 8da53f1fc9
commit c55ff9a13d
5 changed files with 16 additions and 5 deletions

View File

@ -1,5 +1,7 @@
2002-04-11 Juergen Vigna <jug@sad.it>
* paragraph.C (simpleTeXOnePar): fix closing of foreignlanguage tags.
* BufferView2.C (showLockedInsetCursor): use iy
(fitLockedInsetCursor): ditto

View File

@ -1,3 +1,7 @@
2002-04-11 Juergen Vigna <jug@sad.it>
* insetert.C (draw): fix the x return for collapsed version.
2002-04-07 Herbert Voss <voss@perce.de>
* insetgraphic.C (readFigInset): fix bug with subcaption and

View File

@ -567,7 +567,6 @@ void InsetERT::draw(BufferView * bv, LyXFont const & f,
if (!isOpen()) {
draw_collapsed(pain, baseline, x);
x += TEXT_TO_INSET_OFFSET;
return;
}

View File

@ -814,7 +814,7 @@ int LyXFont::latexWriteStartChanges(ostream & os, LyXFont const & base,
bool env = false;
if (language()->babel() != base.language()->babel() &&
language()->babel() != prev.language()->babel()) {
language() != prev.language()) {
if (isRightToLeft() != prev.isRightToLeft()) {
if (isRightToLeft()) {
os << "\\R{";

View File

@ -1633,7 +1633,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
// Fully instantiated font
LyXFont font = getFont(bparams, i);
LyXFont const & last_font = running_font;
LyXFont const last_font = running_font;
// Spaces at end of font change are simulated to be
// outside font change, i.e. we write "\textXX{text} "
@ -1647,7 +1647,10 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
}
// We end font definition before blanks
if (font != running_font && open_font) {
if (open_font &&
(font != running_font ||
font.language() != running_font.language()))
{
column += running_font.latexWriteEndChanges(os,
basefont,
(i == main_body-1) ? basefont : font);
@ -1665,7 +1668,10 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
}
// Do we need to change font?
if (font != running_font && i != main_body - 1) {
if ((font != running_font ||
font.language() != running_font.language()) &&
i != main_body - 1)
{
column += font.latexWriteStartChanges(os, basefont,
last_font);
running_font = font;