Fix math-mutate (something invalid)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9094 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2004-10-17 20:06:35 +00:00
parent fa133e49b9
commit c514656ec2
2 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,11 @@
2004-10-15 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* math_hullinset.C (mutate): fix endless loop for unknown types
2004-10-05 Andreas Vox <vox@isp.uni-luebeck.de> 2004-10-05 Andreas Vox <vox@isp.uni-luebeck.de>
* math_hullinset.C (docbook): write additional <alt role="tex" > tag for Docbook XML * math_hullinset.C (docbook): write additional <alt role="tex" >
tag for Docbook XML
2004-09-21 Jean-Marc Lasgouttes <lasgouttes@lyx.org> 2004-09-21 Jean-Marc Lasgouttes <lasgouttes@lyx.org>

View File

@ -110,7 +110,7 @@ namespace {
if (s == "gather") return 9; if (s == "gather") return 9;
if (s == "flalign") return 10; if (s == "flalign") return 10;
lyxerr << "unknown hull type '" << s << "'" << endl; lyxerr << "unknown hull type '" << s << "'" << endl;
return 0; return -1;
} }
bool smaller(string const & s, string const & t) bool smaller(string const & s, string const & t)
@ -700,6 +700,10 @@ void MathHullInset::mutate(string const & newtype)
// done // done
} }
else if (typecode(newtype) < 0) {
// unknown type
}
else if (type_ == "none") { else if (type_ == "none") {
setType("simple"); setType("simple");
numbered(0, false); numbered(0, false);