provides_ = nothing;
titletype_ = TITLE_COMMAND_AFTER;
titlename_ = "maketitle";
- loaded = false;
+ loaded_ = false;
}
// Load textclass info if not loaded yet
bool LyXTextClass::load() const
{
- if (loaded)
+ if (loaded_)
return true;
// Read style-file
string const real_file = LibFileSearch("layouts", name_, "layout");
+ loaded_ = const_cast<LyXTextClass*>(this)->Read(real_file) == 0;
- if (const_cast<LyXTextClass*>(this)->Read(real_file)) {
+ if (!loaded_) {
lyxerr << "Error reading `"
<< MakeDisplayPath(real_file)
<< "'\n(Check `" << name_
<< "')\nCheck your installation and "
"try Options/Reconfigure..." << endl;
- loaded = false;
}
- loaded = true;
- return loaded;
+
+ return loaded_;
}