Fix generation of invalid LyX files

* src/lyxfont.C
	(LyXFont::lyxWriteChanges): Don't change color "inherit" to
	"default", since that cannot be read in.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15655 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-11-01 09:46:14 +00:00
parent 163bfbfcf8
commit 93d5d41c24
2 changed files with 5 additions and 8 deletions

View File

@ -718,14 +718,8 @@ void LyXFont::lyxWriteChanges(LyXFont const & orgfont,
if (orgfont.noun() != noun()) {
os << "\\noun " << LyXMiscNames[noun()] << "\n";
}
if (orgfont.color() != color()) {
// To make us file compatible with older
// lyx versions we emit "default" instead
// of "inherit"
string col_str(lcolor.getLyXName(color()));
if (col_str == "inherit") col_str = "default";
os << "\\color " << col_str << "\n";
}
if (orgfont.color() != color())
os << "\\color " << lcolor.getLyXName(color()) << '\n';
if (orgfont.language() != language() &&
language() != latex_language) {
if (language())

View File

@ -42,6 +42,9 @@ What's new
* Document Input/Output
- Write inherited colors correctly as "inherit" to the .lyx file. Previously
they where written as "default", which was then read in as "none".
- Parse the optional argument of the AMS math environments aligned, gathered
and alignedat.