X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTextClass.cpp;h=9cf75a7669debf447b09e46b512a6c7b877954f6;hb=892bc7dac34011cf8127cd574503b754f50023dd;hp=47caf1f47a47bf2588bfe1a7c829a0a156d4092e;hpb=9034323d598e4504290fa7a574300fc42f2a269c;p=lyx.git diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 47caf1f47a..9cf75a7669 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -49,6 +49,19 @@ using namespace lyx::support; namespace lyx { +// Keep the changes documented in the Customization manual. +// +// If you change this format, then you MUST also make sure that +// your changes do not invalidate the hardcoded layout file in +// LayoutFile.cpp. Additions will never do so, but syntax changes +// could. See LayoutFileList::addEmptyClass() and, especially, the +// definition of the layoutpost string. +// You should also run (or ask someone who has bash to run) the +// development/updatelayouts.sh script, to update the format of +// all of our layout files. +// +int const LAYOUT_FORMAT = 30; + namespace { class LayoutNamesEqual : public unary_function { @@ -64,9 +77,6 @@ private: docstring name_; }; -// Keep the changes documented in the Customization manual. -int const LAYOUT_FORMAT = 27; - bool layout2layout(FileName const & filename, FileName const & tempfile) { @@ -94,7 +104,7 @@ bool layout2layout(FileName const & filename, FileName const & tempfile) } -string translateRT(TextClass::ReadType rt) +string translateReadType(TextClass::ReadType rt) { switch (rt) { case TextClass::BASECLASS: @@ -264,7 +274,7 @@ TextClass::ReturnValues TextClass::readWithoutConv(FileName const & filename, Re return ERROR; } - LYXERR(Debug::TCLASS, "Reading " + translateRT(rt) + ": " + + LYXERR(Debug::TCLASS, "Reading " + translateReadType(rt) + ": " + to_utf8(makeDisplayPath(filename.absFileName()))); // Define the plain layout used in table cells, ert, etc. Note that @@ -277,7 +287,7 @@ TextClass::ReturnValues TextClass::readWithoutConv(FileName const & filename, Re lexrc.setFile(filename); ReturnValues retval = read(lexrc, rt); - LYXERR(Debug::TCLASS, "Finished reading " + translateRT(rt) + ": " + + LYXERR(Debug::TCLASS, "Finished reading " + translateReadType(rt) + ": " + to_utf8(makeDisplayPath(filename.absFileName()))); return retval;