+namespace {
+
+ LexerKeyword textClassTags[] = {
+ { "addtohtmlpreamble", TC_ADDTOHTMLPREAMBLE },
+ { "addtopreamble", TC_ADDTOPREAMBLE },
+ { "classoptions", TC_CLASSOPTIONS },
+ { "columns", TC_COLUMNS },
+ { "counter", TC_COUNTER },
+ { "defaultfont", TC_DEFAULTFONT },
+ { "defaultmodule", TC_DEFAULTMODULE },
+ { "defaultstyle", TC_DEFAULTSTYLE },
+ { "excludesmodule", TC_EXCLUDESMODULE },
+ { "float", TC_FLOAT },
+ { "format", TC_FORMAT },
+ { "htmlpreamble", TC_HTMLPREAMBLE },
+ { "ifcounter", TC_IFCOUNTER },
+ { "ifstyle", TC_IFSTYLE },
+ { "input", TC_INPUT },
+ { "insetlayout", TC_INSETLAYOUT },
+ { "leftmargin", TC_LEFTMARGIN },
+ { "nofloat", TC_NOFLOAT },
+ { "nostyle", TC_NOSTYLE },
+ { "outputformat", TC_OUTPUTFORMAT },
+ { "outputtype", TC_OUTPUTTYPE },
+ { "pagestyle", TC_PAGESTYLE },
+ { "preamble", TC_PREAMBLE },
+ { "provides", TC_PROVIDES },
+ { "providesmodule", TC_PROVIDESMODULE },
+ { "requires", TC_REQUIRES },
+ { "rightmargin", TC_RIGHTMARGIN },
+ { "secnumdepth", TC_SECNUMDEPTH },
+ { "sides", TC_SIDES },
+ { "style", TC_STYLE },
+ { "titlelatexname", TC_TITLELATEXNAME },
+ { "titlelatextype", TC_TITLELATEXTYPE },
+ { "tocdepth", TC_TOCDEPTH }
+ };
+
+} //namespace anon
+
+
+bool TextClass::convertLayoutFormat(support::FileName const & filename, ReadType rt)
+{
+ LYXERR(Debug::TCLASS, "Converting layout file to " << FORMAT);
+ FileName const tempfile = FileName::tempName("convert_layout");
+ bool success = layout2layout(filename, tempfile);
+ if (success)
+ success = readWithoutConv(tempfile, rt) == OK;
+ tempfile.removeFile();
+ return success;
+}
+
+
+TextClass::ReturnValues TextClass::readWithoutConv(FileName const & filename, ReadType rt)