Fix Layout::read() API.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22991 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-02-14 04:12:15 +00:00
parent b9670d7209
commit 369d21f4e2
3 changed files with 3 additions and 3 deletions

View File

@ -498,7 +498,7 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass)
}
lexrc.popTable();
return error;
return !error;
}

View File

@ -52,7 +52,7 @@ public:
///
Layout();
/// Reads a layout definition from file
/// \return false on success. FIXME: this is bad API, should return true!
/// \return true on success.
bool read(Lexer &, TextClass const &);
///
void readAlign(Lexer &);

View File

@ -143,7 +143,7 @@ bool TextClass::isTeXClassAvailable() const
bool TextClass::readStyle(Lexer & lexrc, Layout & lay)
{
LYXERR(Debug::TCLASS, "Reading style " << to_utf8(lay.name()));
if (lay.read(lexrc, *this)) {
if (!lay.read(lexrc, *this)) {
lyxerr << "Error parsing style `" << to_utf8(lay.name()) << '\'' << endl;
return false;
}