]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
Typos.
[lyx.git] / src / Layout.cpp
index f052f53aed4dcbd422022a29de6110bb65f130e2..74ff2ff8a19e168bfc4a65538fcd39b349a75ce1 100644 (file)
@@ -20,8 +20,6 @@
 #include "support/debug.h"
 #include "support/lstrings.h"
 
-#include <ostream>
-
 using namespace std;
 using namespace lyx::support;
 
@@ -70,9 +68,6 @@ enum LayoutTags {
        LT_LATEXPARAM,
        LT_OPTARGS,
        LT_LATEXTYPE,
-       LT_LATEXHEADER,
-       LT_LATEXFOOTER,
-       LT_LATEXPARAGRAPH,
        LT_LEFTMARGIN,
        LT_NEED_PROTECT,
        LT_NEWLINE,
@@ -97,6 +92,7 @@ enum LayoutTags {
 
 Layout::Layout()
 {
+       unknown_ = false;
        margintype = MARGIN_STATIC;
        latextype = LATEX_PARAGRAPH;
        intitle = false;
@@ -125,7 +121,6 @@ Layout::Layout()
        newline_allowed = true;
        free_spacing = false;
        pass_thru = false;
-       is_environment = false;
        toclevel = NOT_IN_TOC;
        commanddepth = 0;
 }
@@ -163,10 +158,7 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
                { "labelstringappendix", LT_LABELSTRING_APPENDIX },
                { "labeltag",       LT_LABELTAG },
                { "labeltype",      LT_LABELTYPE },
-               { "latexfooter",    LT_LATEXFOOTER },
-               { "latexheader",    LT_LATEXHEADER },
                { "latexname",      LT_LATEXNAME },
-               { "latexparagraph", LT_LATEXPARAGRAPH },
                { "latexparam",     LT_LATEXPARAM },
                { "latextype",      LT_LATEXTYPE },
                { "leftmargin",     LT_LEFTMARGIN },
@@ -225,17 +217,13 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
                                this->operator=(tclass[style]);
                                name_ = tmpname;
                        } else {
-                               lyxerr << "Cannot copy unknown style `"
-                                                        << to_utf8(style) << "'\n"
-                                                        << "All layouts so far:"
-                                                        << endl;
+                               LYXERR0("Cannot copy unknown style `"
+                                       << style << "'\n"
+                                       << "All layouts so far:");
                                DocumentClass::const_iterator lit = tclass.begin();
                                DocumentClass::const_iterator len = tclass.end();
                                for (; lit != len; ++lit)
-                                       lyxerr << to_utf8(lit->name()) << endl;
-
-                               //lex.printError("Cannot copy known "
-                               //               "style `$$Token'");
+                                       LYXERR0(lit->name());
                        }
                        break;
                        }
@@ -252,8 +240,8 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
                                if (obsoleted_by().empty())
                                        obsoleted_by_ = style;
                        } else {
-                               lyxerr << "Cannot replace with unknown style `" 
-                                       << to_utf8(style) << '\'' << endl;
+                               LYXERR0("Cannot replace with unknown style `" 
+                                       << style << '\'');
 
                                //lex.printError("Cannot replace with"
                                //               " unknown style "
@@ -275,18 +263,6 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
                        readLatexType(lex);
                        break;
 
-               case LT_LATEXHEADER:    // header for environments
-                       lex >> latexheader;
-                       break;
-
-               case LT_LATEXFOOTER:    // footer for environments
-                       lex >> latexfooter;
-                       break;
-
-               case LT_LATEXPARAGRAPH:
-                       lex >> latexparagraph;
-                       break;
-
                case LT_INTITLE:
                        lex >> intitle;
                        break;
@@ -652,8 +628,7 @@ void Layout::readEndLabelType(Lexer & lex)
                endlabeltype = static_cast<EndLabelType>(le);
                break;
        default:
-               LYXERR0("Unhandled value " << le
-                      << " in Layout::readEndLabelType.");
+               LYXERR0("Unhandled value " << le);
                break;
        }
 }
@@ -684,8 +659,7 @@ void Layout::readMargin(Lexer & lex)
                margintype = static_cast<MarginType>(le);
                break;
        default:
-               lyxerr << "Unhandled value " << le
-                      << " in Layout::readMargin." << endl;
+               LYXERR0("Unhandled value " << le);
                break;
        }
 }
@@ -717,8 +691,7 @@ void Layout::readLatexType(Lexer & lex)
                latextype = static_cast<LatexType>(le);
                break;
        default:
-               lyxerr << "Unhandled value " << le
-                      << " in Layout::readLatexType." << endl;
+               LYXERR0("Unhandled value " << le);
                break;
        }
 }