X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLayoutFile.cpp;h=541f2dae84290c8f69c305a0c713fc53e66b4f85;hb=824d640227d92f01296d69e85761a790d328b488;hp=64e389ae70268c43b2c2f7ab20faa0ee2f146315;hpb=9034323d598e4504290fa7a574300fc42f2a269c;p=lyx.git diff --git a/src/LayoutFile.cpp b/src/LayoutFile.cpp index 64e389ae70..541f2dae84 100644 --- a/src/LayoutFile.cpp +++ b/src/LayoutFile.cpp @@ -218,7 +218,7 @@ LayoutFileIndex LayoutFileList::addEmptyClass(string const & textclass) // stdclass.inc. That would give us something moderately usable. ofs << "# This layout is automatically generated\n" "# \\DeclareLaTeXClass{" << textclass << "}\n\n" - "Format 26\n" + "Format " << LAYOUT_FORMAT << "\n" "Input stdclass.inc\n\n" << layoutpost; ofs.close(); @@ -236,7 +236,7 @@ LayoutFileIndex LayoutFileList::addEmptyClass(string const & textclass) ofstream ofs2(tempLayout.toFilesystemEncoding().c_str()); ofs2 << "# This layout is automatically generated\n" "# \\DeclareLaTeXClass{" << textclass << "}\n\n" - "Format 26\n\n" + "Format " << LAYOUT_FORMAT << "\n" << layoutpost; ofs2.close(); if (!tc->load(tempLayout.absFileName())) { @@ -314,13 +314,7 @@ bool LayoutFileList::load(string const & name, string const & buf_path) } LayoutFile * tc = classmap_[name]; - if (!tc->load(buf_path)) { - docstring s = bformat(_("The document class %1$s " - "could not be loaded."), from_utf8(name)); - frontend::Alert::error(_("Could not load class"), s); - return false; - } - return true; + return tc->load(buf_path); }