]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
Cleanup mouse/selection/context-menu interactions.
[lyx.git] / src / TextClass.cpp
index 9b5ff07431fe9defbf570a5a4ea0e5bf703b2fd4..3c2afbce3f93c267041c37ee55c9370ec4c0a206 100644 (file)
@@ -62,7 +62,7 @@ private:
 };
 
 
-int const FORMAT = 6;
+int const FORMAT = 7;
 
 
 bool layout2layout(FileName const & filename, FileName const & tempfile)
@@ -112,7 +112,7 @@ std::string translateRT(TextClass::ReadType rt)
 } // namespace anon
 
 
-docstring const TextClass::emptylayout_ = from_ascii("PlainLayout");
+docstring const TextClass::emptylayout_ = from_ascii(N_("Plain Layout"));
 
 
 InsetLayout DocumentClass::empty_insetlayout_;
@@ -132,9 +132,6 @@ TextClass::TextClass()
        titletype_ = TITLE_COMMAND_AFTER;
        titlename_ = "maketitle";
        loaded_ = false;
-       // a hack to make this available for translation
-       // i'm sure there must be a better way (rgh)
-       _("PlainLayout");
 }
 
 
@@ -179,13 +176,15 @@ enum TextClassTags {
        TC_NOFLOAT,
        TC_TITLELATEXNAME,
        TC_TITLELATEXTYPE,
-       TC_FORMAT
+       TC_FORMAT,
+       TC_ADDTOPREAMBLE
 };
 
 
 namespace {
 
        keyword_item textClassTags[] = {
+               { "addtopreamble",   TC_ADDTOPREAMBLE },
                { "classoptions",    TC_CLASSOPTIONS },
                { "columns",         TC_COLUMNS },
                { "counter",         TC_COUNTER },
@@ -489,6 +488,10 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
                        preamble_ = from_utf8(lexrc.getLongString("EndPreamble"));
                        break;
 
+               case TC_ADDTOPREAMBLE:
+                       preamble_ += from_utf8(lexrc.getLongString("EndPreamble"));
+                       break;
+
                case TC_PROVIDES: {
                        lexrc.next();
                        string const feature = lexrc.getString();