Refine fix for #6595. Don't add \\ to the last empty line of substack,

tabular and xymatrix.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34761 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-07-05 10:03:56 +00:00
parent 598d185ada
commit 7eeb664bbb
2 changed files with 13 additions and 0 deletions

View File

@ -68,8 +68,11 @@ class InsetMathScript;
class InsetMathString; class InsetMathString;
class InsetMathSpace; class InsetMathSpace;
class InsetMathSpecialChar; class InsetMathSpecialChar;
class InsetMathSubstack;
class InsetMathSymbol; class InsetMathSymbol;
class InsetMathTabular;
class InsetMathUnknown; class InsetMathUnknown;
class InsetMathXYMatrix;
class InsetMathRef; class InsetMathRef;
@ -148,9 +151,15 @@ public:
virtual InsetMathSpace const * asSpaceInset() const { return 0; } virtual InsetMathSpace const * asSpaceInset() const { return 0; }
virtual InsetMathString * asStringInset() { return 0; } virtual InsetMathString * asStringInset() { return 0; }
virtual InsetMathString const * asStringInset() const { return 0; } virtual InsetMathString const * asStringInset() const { return 0; }
virtual InsetMathSubstack * asSubstackInset() { return 0; }
virtual InsetMathSubstack const * asSubstackInset() const { return 0; }
virtual InsetMathSymbol const * asSymbolInset() const { return 0; } virtual InsetMathSymbol const * asSymbolInset() const { return 0; }
virtual InsetMathTabular * asTabularInset() { return 0; }
virtual InsetMathTabular const * asTabularInset() const { return 0; }
virtual InsetMathUnknown * asUnknownInset() { return 0; } virtual InsetMathUnknown * asUnknownInset() { return 0; }
virtual InsetMathUnknown const * asUnknownInset() const { return 0; } virtual InsetMathUnknown const * asUnknownInset() const { return 0; }
virtual InsetMathXYMatrix * asXYMatrixInset() { return 0; }
virtual InsetMathXYMatrix const * asXYMatrixInset() const { return 0; }
virtual InsetMathRef * asRefInset() { return 0; } virtual InsetMathRef * asRefInset() { return 0; }
virtual InsetMathSpecialChar const * asSpecialCharInset() const { return 0; } virtual InsetMathSpecialChar const * asSpecialCharInset() const { return 0; }

View File

@ -646,6 +646,10 @@ void InsetMathGrid::updateBuffer(ParIterator const & it, UpdateType utype)
docstring InsetMathGrid::eolString(row_type row, bool fragile, bool last_eoln) const docstring InsetMathGrid::eolString(row_type row, bool fragile, bool last_eoln) const
{ {
// Never add \\ on the last empty line of substack, tabular and xymatrix
if (asSubstackInset() || asTabularInset() || asXYMatrixInset())
last_eoln = false;
docstring eol; docstring eol;
if (!rowinfo_[row].crskip_.zero()) if (!rowinfo_[row].crskip_.zero())