]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlayout.C
move some selection related stuff over to textcursor.C
[lyx.git] / src / lyxlayout.C
index a0bdb5ed2e2a602d3cde8907d3547e8481e27b26..6f20fc49e899c015caea26e456a4817473aa7eee 100644 (file)
@@ -59,6 +59,7 @@ enum LayoutTags {
        LT_LATEXTYPE,
        LT_LATEXHEADER,
        LT_LATEXFOOTER,
+       LT_LATEXPARAGRAPH,
        LT_LEFTMARGIN,
        LT_NEED_PROTECT,
        LT_NEWLINE,
@@ -107,6 +108,7 @@ LyXLayout::LyXLayout ()
        newline_allowed = true;
        free_spacing = false;
        pass_thru = false;
+       is_environment = false;
 }
 
 
@@ -140,6 +142,7 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass)
                { "latexfooter",                LT_LATEXFOOTER },
                { "latexheader",                LT_LATEXHEADER },
                { "latexname",          LT_LATEXNAME },
+               { "latexparagraph",             LT_LATEXPARAGRAPH },
                { "latexparam",         LT_LATEXPARAM },
                { "latextype",          LT_LATEXTYPE },
                { "leftmargin",         LT_LEFTMARGIN },
@@ -236,24 +239,29 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass)
                        }
                        break;
 
-               case LT_MARGIN:         // Margin style definition.
+               case LT_MARGIN:         // margin style definition.
                        readMargin(lexrc);
                        break;
 
-               case LT_LATEXTYPE:      // Latex style definition.
+               case LT_LATEXTYPE:      // LaTeX style definition.
                        readLatexType(lexrc);
                        break;
 
-               case LT_LATEXHEADER:    // Latex style definition.
+               case LT_LATEXHEADER:    // header for environments
                        lexrc.next();
                        latexheader = lexrc.getString();
                        break;
 
-               case LT_LATEXFOOTER:    // Latex style definition.
+               case LT_LATEXFOOTER:    // footer for environments
                        lexrc.next();
                        latexfooter = lexrc.getString();
                        break;
 
+               case LT_LATEXPARAGRAPH:
+                       lexrc.next();
+                       latexparagraph = lexrc.getString();
+                       break;
+
                case LT_INTITLE:
                        intitle = lexrc.next() && lexrc.getInteger();
                        break;
@@ -394,17 +402,17 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass)
 
                case LT_LABELSTRING:    // label string definition
                        if (lexrc.next())
-                               labelstring_ = lexrc.getString();
+                               labelstring_ = trim(lexrc.getString());
                        break;
 
                case LT_ENDLABELSTRING: // endlabel string definition
                        if (lexrc.next())
-                               endlabelstring_ = lexrc.getString();
+                               endlabelstring_ = trim(lexrc.getString());
                        break;
 
                case LT_LABELSTRING_APPENDIX: // label string appendix definition
                        if (lexrc.next())
-                               labelstring_appendix_ = lexrc.getString();
+                               labelstring_appendix_ = trim(lexrc.getString());
                        break;
 
                case LT_FREE_SPACING:   // Allow for free spacing.