mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
paperpackage fix, hopefully without side effects
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@8839 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
561bf5d97f
commit
1d4b2ab362
@ -1,3 +1,9 @@
|
||||
2004-07-15 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* buffer.C (parseSingleLyXformat2Token): fix the off-by-one-error
|
||||
in the paperpackage selection without modifying the file format
|
||||
with help from Jean-Marc Lasgouttes
|
||||
|
||||
2004-07-04 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* tex-strings.C: revert paperpackage fix from 2004-06-27 as it
|
||||
|
27
src/buffer.C
27
src/buffer.C
@ -751,12 +751,27 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
|
||||
else
|
||||
params.papersize2 = tmpret;
|
||||
} else if (token == "\\paperpackage") {
|
||||
int tmpret = lex.findToken(string_paperpackages);
|
||||
if (tmpret == -1) {
|
||||
++tmpret;
|
||||
params.paperpackage = BufferParams::PACKAGE_NONE;
|
||||
} else
|
||||
params.paperpackage = tmpret;
|
||||
// string_paperpackages is missing the first entry "none".
|
||||
// Therefore, the strings in the .lyx file are off by one,
|
||||
// and the last setting PACKAGE_WIDEMARGINSA4 is written as
|
||||
// an empty string.
|
||||
// Since we cannot fix string_paperpackages because this
|
||||
// would be a file format change, we have to recognize the
|
||||
// empty argument of "\\paperpackage" as PACKAGE_WIDEMARGINSA4
|
||||
// here.
|
||||
lex.eatLine();
|
||||
string const nextToken = lex.getString();
|
||||
if (nextToken.empty()) {
|
||||
params.paperpackage = BufferParams::PACKAGE_WIDEMARGINSA4;
|
||||
} else {
|
||||
lex.pushToken(nextToken);
|
||||
int tmpret = lex.findToken(string_paperpackages);
|
||||
if (tmpret == -1) {
|
||||
++tmpret;
|
||||
params.paperpackage = BufferParams::PACKAGE_NONE;
|
||||
} else
|
||||
params.paperpackage = tmpret;
|
||||
}
|
||||
} else if (token == "\\use_geometry") {
|
||||
lex.nextToken();
|
||||
params.use_geometry = lex.getInteger();
|
||||
|
Loading…
Reference in New Issue
Block a user