Renaming and typo.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34970 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-07-18 11:52:12 +00:00
parent ab85e493c7
commit 9034323d59
2 changed files with 7 additions and 8 deletions

View File

@ -231,13 +231,12 @@ LayoutFileIndex LayoutFileList::addEmptyClass(string const & textclass)
if (!tc->load(tempLayout.absFileName())) { if (!tc->load(tempLayout.absFileName())) {
// The only way this happens is because the hardcoded layout file // The only way this happens is because the hardcoded layout file
// aboveis wrong or stdclass.inc cannot be found. So try again // above is wrong or stdclass.inc cannot be found. So try again
// without stdclass.inc. // without stdclass.inc.
ofstream ofs2(tempLayout.toFilesystemEncoding().c_str()); ofstream ofs2(tempLayout.toFilesystemEncoding().c_str());
ofs2 << "# This layout is automatically generated\n" ofs2 << "# This layout is automatically generated\n"
"# \\DeclareLaTeXClass{" << textclass << "}\n\n" "# \\DeclareLaTeXClass{" << textclass << "}\n\n"
"Format 26\n" "Format 26\n\n"
"Input stdclass.inc\n\n"
<< layoutpost; << layoutpost;
ofs2.close(); ofs2.close();
if (!tc->load(tempLayout.absFileName())) { if (!tc->load(tempLayout.absFileName())) {

View File

@ -65,7 +65,7 @@ private:
}; };
// Keep the changes documented in the Customization manual. // Keep the changes documented in the Customization manual.
int const FORMAT = 27; int const LAYOUT_FORMAT = 27;
bool layout2layout(FileName const & filename, FileName const & tempfile) bool layout2layout(FileName const & filename, FileName const & tempfile)
@ -246,7 +246,7 @@ namespace {
bool TextClass::convertLayoutFormat(support::FileName const & filename, ReadType rt) bool TextClass::convertLayoutFormat(support::FileName const & filename, ReadType rt)
{ {
LYXERR(Debug::TCLASS, "Converting layout file to " << FORMAT); LYXERR(Debug::TCLASS, "Converting layout file to " << LAYOUT_FORMAT);
FileName const tempfile = FileName::tempName("convert_layout"); FileName const tempfile = FileName::tempName("convert_layout");
bool success = layout2layout(filename, tempfile); bool success = layout2layout(filename, tempfile);
if (success) if (success)
@ -293,7 +293,7 @@ bool TextClass::read(FileName const & filename, ReadType rt)
bool const worx = convertLayoutFormat(filename, rt); bool const worx = convertLayoutFormat(filename, rt);
if (!worx) { if (!worx) {
LYXERR0 ("Unable to convert " << filename << LYXERR0 ("Unable to convert " << filename <<
" to format " << FORMAT); " to format " << LAYOUT_FORMAT);
return false; return false;
} }
return true; return true;
@ -331,7 +331,7 @@ bool TextClass::read(std::string const & str, ReadType rt)
bool const worx = convertLayoutFormat(tempfile, rt); bool const worx = convertLayoutFormat(tempfile, rt);
if (!worx) { if (!worx) {
LYXERR0("Unable to convert internal layout information to format " LYXERR0("Unable to convert internal layout information to format "
<< FORMAT); << LAYOUT_FORMAT);
} }
tempfile.removeFile(); tempfile.removeFile();
return worx; return worx;
@ -685,7 +685,7 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
// Note that this is triggered the first time through the loop unless // Note that this is triggered the first time through the loop unless
// we hit a format tag. // we hit a format tag.
if (format != FORMAT) if (format != LAYOUT_FORMAT)
return FORMAT_MISMATCH; return FORMAT_MISMATCH;
} }