Minor fixes to TextClass::read().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34204 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-04-18 20:37:07 +00:00
parent 3a435c5daa
commit d0b52ce0aa

View File

@ -341,10 +341,12 @@ bool TextClass::read(std::string const & str, ReadType rt)
// Reads a textclass structure from file.
TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
{
bool error = !lexrc.isOK();
if (!lexrc.isOK())
return ERROR;
// Format of files before the 'Format' tag was introduced
int format = 1;
bool error = false;
// parsing
while (lexrc.isOK() && !error) {
@ -696,7 +698,7 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
if (defaultlayout_.empty()) {
LYXERR0("Error: Textclass '" << name_
<< "' is missing a defaultstyle.");
error = true;
return ERROR;
}
// Try to erase "stdinsets" from the provides_ set.