]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
next ones
[lyx.git] / src / TextClass.cpp
index dcff59a94541f8fbee64476934181882ea61b028..83a7bf9e3332d844e7f8552d008ca6752ee73213 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "TextClass.h"
 #include "debug.h"
+#include "Layout.h"
 #include "Lexer.h"
 #include "Counters.h"
 #include "gettext.h"
 #include "support/os.h"
 
 #include <boost/filesystem/operations.hpp>
-namespace fs = boost::filesystem;
 
 #include <sstream>
 
+namespace fs = boost::filesystem;
 
 namespace lyx {
 
@@ -514,7 +515,7 @@ void TextClass::readTitleType(Lexer & lexrc)
                return;
        case TITLE_COMMAND_AFTER:
        case TITLE_ENVIRONMENT:
-               titletype_ = static_cast<LYX_TITLE_LATEX_TYPES>(le);
+               titletype_ = static_cast<TitleLatexType>(le);
                break;
        default:
                lyxerr << "Unhandled value " << le
@@ -694,6 +695,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
                case IL_FONT:
                        font.lyxRead(lexrc);
                        font.realize(defaultfont());
+                       // So: define font before labelfont
                        labelfont = font;
                        break;
                case IL_BGCOLOR: {
@@ -1058,6 +1060,7 @@ InsetLayout const & TextClass::insetlayout(docstring const & name) const
        }
        static InsetLayout empty;
        empty.labelstring = from_utf8("UNDEFINED");
+       empty.bgcolor = Color::error;
        return empty;
 }
 
@@ -1166,7 +1169,7 @@ unsigned int TextClass::columns() const
 }
 
 
-LYX_TITLE_LATEX_TYPES TextClass::titletype() const
+TitleLatexType TextClass::titletype() const
 {
        return titletype_;
 }