Fix old tabularcode/ert compatibility read (fix #305).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3860 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2002-03-28 13:21:37 +00:00
parent 2895ae04b5
commit be1bd533f3
4 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2002-03-28 Juergen Vigna <jug@sad.it>
* tabular.C (OldFormatRead): fix ert compatibility read inside cells.
2002-03-27 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* lyxfunc.C (getStatus): return 'disabled' early for LFUN_NOACTION

View File

@ -1,3 +1,9 @@
2002-03-28 Juergen Vigna <jug@sad.it>
* insettabular.C (insetAllowed): return true as default value otherwise
we're not able to insert insets inside paragraphs of an not locked
insettext!
2002-03-27 Herbert Voss <voss@lyx.org>
* insetgraphicsparam.C: change c%, p% to col%, page%

View File

@ -2781,7 +2781,10 @@ bool InsetTabular::insetAllowed(Inset::Code code) const
{
if (the_locking_inset)
return the_locking_inset->insetAllowed(code);
return false;
// we return true here because if the inset is not locked someone
// wants to insert something in one of our insettexts and we generally
// allow to do so.
return true;
}

View File

@ -1462,7 +1462,8 @@ void LyXTabular::OldFormatRead(BufferParams const & bp,
continue;
if (token == "\\layout"
|| token == "\\end_float"
|| token == "\\end_deeper") {
|| token == "\\end_deeper")
{
lex.pushToken(token);
#ifndef NO_COMPABILITY
// Here we need to insert the inset_ert_contents into the last
@ -1471,6 +1472,12 @@ void LyXTabular::OldFormatRead(BufferParams const & bp,
#endif
break;
}
#ifndef NO_COMPABILITY
if (token == "\\newline")
// Here we need to insert the inset_ert_contents into the last
// cell of the tabular.
owner_->bufferOwner()->insertErtContents(par, pos, false);
#endif
if (owner_->bufferOwner()->parseSingleLyXformat2Token(lex, par,
return_par,
token, pos,