]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.cpp
silence warning
[lyx.git] / src / TextClass.cpp
index 80798dd502264a8369a7ec32c1a30cc0bd9e99c2..ba1ce19b4d66af6bd131020e230f52ec3e8974b5 100644 (file)
@@ -258,8 +258,7 @@ bool TextClass::read(FileName const & filename, ReadType rt)
                                                            "layout");
 
                                if (tmp.empty()) {
-                                       lexrc.printError("Could not find input"
-                                                        "file: " + inc);
+                                       lexrc.printError("Could not find input file: " + inc);
                                        error = true;
                                } else if (read(tmp, MERGE)) {
                                        lexrc.printError("Error reading input"
@@ -395,8 +394,9 @@ bool TextClass::read(FileName const & filename, ReadType rt)
 
                case TC_REQUIRES: {
                        lexrc.eatLine();
-                       string const packages = lexrc.getString();
-                       requires_ = getVectorFromString(packages);
+                       vector<string> const req 
+                               = getVectorFromString(lexrc.getString());
+                       requires_.insert(req.begin(), req.end());
                        break;
                }
 
@@ -658,7 +658,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
        FontInfo labelfont = inherit_font;
        ColorCode bgcolor(Color_background);
        string preamble;
-       vector<string> requires;
+       set<string> requires;
        bool multipar = false;
        bool passthru = false;
        bool needprotect = false;
@@ -743,8 +743,9 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
                        break;
                case IL_REQUIRES: {
                        lexrc.eatLine();
-                       string const packages = lexrc.getString();
-                       requires = getVectorFromString(packages);
+                       vector<string> const req 
+                               = getVectorFromString(lexrc.getString());
+                       requires.insert(req.begin(), req.end());
                        break;
                }
                case IL_END: