]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
Win installer: translate 2 installer sections
[lyx.git] / src / TextClass.cpp
index e71fed068814bb7a548b36ada63d46c932bdbef8..cb8b8c43b2aad52600192e65a7e32494ef095280 100644 (file)
@@ -61,7 +61,7 @@ namespace lyx {
 // You should also run the development/tools/updatelayouts.py script,
 // to update the format of all of our layout files.
 //
-int const LAYOUT_FORMAT = 59; //gm: OutlinerName, AddToToc, IsTocCaption
+int const LAYOUT_FORMAT = 60; //lasgouttes LongTableNoNumber => Unnumbered
 
 namespace {
 
@@ -447,8 +447,13 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
 
                case TC_INPUT: // Include file
                        if (lexrc.next()) {
+                               FileName tmp;
                                string const inc = lexrc.getString();
-                               FileName tmp = libFileSearch("layouts", inc,
+                               if (!path().empty() && (prefixIs(inc, "./") ||
+                                                       prefixIs(inc, "../")))
+                                       tmp = fileSearch(path(), inc, "layout");
+                               else
+                                       tmp = libFileSearch("layouts", inc,
                                                            "layout");
 
                                if (tmp.empty()) {
@@ -1511,7 +1516,7 @@ InsetLayout const & DocumentClass::insetLayout(docstring const & name) const
 
 
 InsetLayout const & DocumentClass::plainInsetLayout() {
-       static InsetLayout plain_insetlayout_;
+       static const InsetLayout plain_insetlayout_;
        return plain_insetlayout_;
 }