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> 2001-08-13 Dekel Tsur <dekelts@tau.ac.il>
* BufferView2.C (showLockedInsetCursor): Use normal cursor shape in * BufferView2.C (showLockedInsetCursor): Use normal cursor shape in

View File

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