Fix compatability code.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2507 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2001-08-13 21:46:19 +00:00
parent 60c447c775
commit 19f1292262
2 changed files with 22 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2001-08-14 Dekel Tsur <dekelts@tau.ac.il>
* buffer.C (parseSingleLyXformat2Token): Do not generate errors
when converting LaTeX layout to insetERT.
Generate a non-collapsed float when reading old float
2001-08-13 Dekel Tsur <dekelts@tau.ac.il>
* BufferView2.C (showLockedInsetCursor): Use normal cursor shape in

View File

@ -521,6 +521,10 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
pos = 0;
if (pp.first) {
par->layout = pp.second;
#ifndef NO_COMPABILITY
} else if (ert_comp.active) {
par->layout = 0;
#endif
} else {
// layout not found
// use default layout "Standard" (0)
@ -568,34 +572,41 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
if (tmptok == "footnote") {
inset = new InsetFoot;
old_float << "collapsed true\n";
} else if (tmptok == "margin") {
inset = new InsetMarginal;
old_float << "collapsed true\n";
} else if (tmptok == "fig") {
inset = new InsetFloat("figure");
old_float << "placement htbp\n"
<< "wide false\n";
<< "wide false\n"
<< "collapsed false\n";
} else if (tmptok == "tab") {
inset = new InsetFloat("table");
old_float << "placement htbp\n"
<< "wide false\n";
<< "wide false\n"
<< "collapsed false\n";
} else if (tmptok == "alg") {
inset = new InsetFloat("algorithm");
old_float << "placement htbp\n"
<< "wide false\n";
<< "wide false\n"
<< "collapsed false\n";
} else if (tmptok == "wide-fig") {
inset = new InsetFloat("figure");
//InsetFloat * tmp = new InsetFloat("figure");
//tmp->wide(true);
//inset = tmp;
old_float << "placement htbp\n"
<< "wide true\n";
<< "wide true\n"
<< "collapsed false\n";
} else if (tmptok == "wide-tab") {
inset = new InsetFloat("table");
//InsetFloat * tmp = new InsetFloat("table");
//tmp->wide(true);
//inset = tmp;
old_float << "placement htbp\n"
<< "wide true\n";
<< "wide true\n"
<< "collapsed false\n";
}
if (!inset) {
@ -605,8 +616,6 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
return false; // no end read yet
}
old_float << "collapsed true\n";
// Here we need to check for \end_deeper and handle that
// before we do the footnote parsing.
// This _is_ a hack! (Lgb)