if (name.empty()) {
string s = "Could not read name for style: `$$Token' "
+ lexrc.getString() + " is probably not valid UTF-8!";
- lexrc.printError(s.c_str());
+ lexrc.printError(s);
Layout lay;
// Since we couldn't read the name, we just scan the rest
// of the style and discard it.
}
}
else {
+ // this was an ifstyle where we didn't have the style
// scan the rest and discard it
Layout lay;
readStyle(lexrc, lay);
- error = false;
}
// reset flag
if (name.empty()) {
string s = "Could not read name for InsetLayout: `$$Token' "
+ lexrc.getString() + " is probably not valid UTF-8!";
- lexrc.printError(s.c_str());
+ lexrc.printError(s);
InsetLayout il;
// Since we couldn't read the name, we just scan the rest
// of the style and discard it.
il.read(lexrc, *this);
- error = true;
+ // Let's try to continue rather than abort.
+ // error = true;
} else if (hasInsetLayout(name)) {
InsetLayout & il = insetlayoutlist_[name];
error = !il.read(lexrc, *this);
}
case TC_FLOAT:
- readFloat(lexrc);
+ error = readFloat(lexrc);
break;
case TC_CITEFORMAT:
case Lexer::LEX_UNDEF:
lexrc.printError("Unknown ClassOption tag `$$Token'");
continue;
- default: break;
+ default:
+ break;
}
switch (le) {
case CO_FONTSIZE:
}
-void TextClass::readFloat(Lexer & lexrc)
+bool TextClass::readFloat(Lexer & lexrc)
{
enum {
FT_TYPE = 1,
case Lexer::LEX_UNDEF:
lexrc.printError("Unknown float tag `$$Token'");
continue;
- default: break;
+ default:
+ break;
}
switch (le) {
case FT_TYPE:
}
}
+ lexrc.popTable();
+
// Here we have a full float if getout == true
if (getout) {
if (!needsfloat && listcommand.empty())
"\\alph{" + subtype + "}", docstring());
}
- lexrc.popTable();
+ return getout;
}