Some small patches

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/lyx-1_1_5@1183 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-11-02 15:03:04 +00:00
parent f42e02fa63
commit 99b05c2c7c
6 changed files with 908 additions and 1165 deletions

View File

@ -1,3 +1,17 @@
2000-11-02 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lib/reLyX/MakePreamble.pm (translate_preamble): fix reading of
class names with non-letter characters (from Yves Bastide).
2000-10-30 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/buffer.C (readFile): compare float with float, not with int.
2000-10-25 Dekel Tsur <dekelts@tau.ac.il>
* src/mathed/formula.C (mathed_string_width): Use string instead
of a constant size char array.
2000-10-24 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr> 2000-10-24 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lib/kbd/latvian.kmap: new file from Janne Pänkälä (epa@iki.fi) * lib/kbd/latvian.kmap: new file from Janne Pänkälä (epa@iki.fi)

View File

@ -179,7 +179,7 @@ sub translate_preamble {
# Read the document class, in braces, then convert it to a textclass # Read the document class, in braces, then convert it to a textclass
# However, if the user input a different class with the -c option, use that # However, if the user input a different class with the -c option, use that
s/\s*\{(\w+)\}//; s/\s*\{(\S+)\s*\}//;
my $class = $1; my $class = $1;
$class = $true_class if $true_class; # override from -c option $class = $true_class if $true_class; # override from -c option
die "no document class in file, no -c option given\n" unless $class; die "no document class in file, no -c option given\n" unless $class;

View File

@ -1,3 +1,7 @@
2000-10-27 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* pl.po: update from Pawel Dziekonski
2000-10-05 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr> 2000-10-05 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* fi.po: update from Pauli Virtanen * fi.po: update from Pauli Virtanen

2015
po/pl.po

File diff suppressed because it is too large Load Diff

View File

@ -1094,7 +1094,7 @@ bool Buffer::readFile(LyXLex & lex, LyXParagraph * par)
if (token == "\\lyxformat") { // the first token _must_ be... if (token == "\\lyxformat") { // the first token _must_ be...
lex.EatLine(); lex.EatLine();
format = lex.GetFloat(); format = lex.GetFloat();
if (format > 1) { if (format > 1.0) {
if (LYX_FORMAT - format > 0.05) { if (LYX_FORMAT - format > 0.05) {
printf(_("Warning: need lyxformat %.2f but found %.2f\n"), printf(_("Warning: need lyxformat %.2f but found %.2f\n"),
LYX_FORMAT, format); LYX_FORMAT, format);

View File

@ -200,21 +200,18 @@ LyXFont mathed_get_font(short type, int size)
int mathed_string_width(short type, int size, byte const * s, int ls) int mathed_string_width(short type, int size, byte const * s, int ls)
{ {
LyXFont f = WhichFont(type, size); string st;
if (MathIsBinary(type))
for (int i = 0; i < ls; ++i) {
st += ' ';
st += s[i];
st += ' ';
}
else
st = string(reinterpret_cast<char const *>(s), ls);
byte sx[80]; LyXFont const f = WhichFont(type, size);
if (MathIsBinary(type)) { return lyxfont::width(st, f);
byte * ps = &sx[0];
for (int i = 0; i < ls && i < 75; ++i) {
*(ps++) = ' ';
*(ps++) = s[i];
*(ps++) = ' ';
}
*(ps++) = '\0';
ls *= 3;
s = &sx[0];
}
return lyxfont::width(reinterpret_cast<char const *>(s), ls, f);
} }
@ -256,11 +253,14 @@ void MathedInset::drawStr(Painter & pain, short type, int siz,
string st; string st;
if (MathIsBinary(type)) { if (MathIsBinary(type)) {
for (int i = 0; i < ls; ++i) { for (int i = 0; i < ls; ++i) {
st += string(" ") + char(s[i]) + ' '; st += ' ';
st += char(s[i]);
st += ' ';
} }
} else { } else {
st = string(reinterpret_cast<char const *>(s), ls); st = string(reinterpret_cast<char const *>(s), ls);
} }
LyXFont mf = mathed_get_font(type, siz); LyXFont mf = mathed_get_font(type, siz);
pain.text(x, y, st, mf); pain.text(x, y, st, mf);
} }