From 9034323d598e4504290fa7a574300fc42f2a269c Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sun, 18 Jul 2010 11:52:12 +0000 Subject: [PATCH] Renaming and typo. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34970 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LayoutFile.cpp | 5 ++--- src/TextClass.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/LayoutFile.cpp b/src/LayoutFile.cpp index abbc0fce67..64e389ae70 100644 --- a/src/LayoutFile.cpp +++ b/src/LayoutFile.cpp @@ -231,13 +231,12 @@ LayoutFileIndex LayoutFileList::addEmptyClass(string const & textclass) if (!tc->load(tempLayout.absFileName())) { // 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. ofstream ofs2(tempLayout.toFilesystemEncoding().c_str()); ofs2 << "# This layout is automatically generated\n" "# \\DeclareLaTeXClass{" << textclass << "}\n\n" - "Format 26\n" - "Input stdclass.inc\n\n" + "Format 26\n\n" << layoutpost; ofs2.close(); if (!tc->load(tempLayout.absFileName())) { diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 3b72f4b592..47caf1f47a 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -65,7 +65,7 @@ private: }; // 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) @@ -246,7 +246,7 @@ namespace { 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"); bool success = layout2layout(filename, tempfile); if (success) @@ -293,7 +293,7 @@ bool TextClass::read(FileName const & filename, ReadType rt) bool const worx = convertLayoutFormat(filename, rt); if (!worx) { LYXERR0 ("Unable to convert " << filename << - " to format " << FORMAT); + " to format " << LAYOUT_FORMAT); return false; } return true; @@ -331,7 +331,7 @@ bool TextClass::read(std::string const & str, ReadType rt) bool const worx = convertLayoutFormat(tempfile, rt); if (!worx) { LYXERR0("Unable to convert internal layout information to format " - << FORMAT); + << LAYOUT_FORMAT); } tempfile.removeFile(); 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 // we hit a format tag. - if (format != FORMAT) + if (format != LAYOUT_FORMAT) return FORMAT_MISMATCH; } -- 2.39.5