]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
More 'standard conformant blurb' nonsense.
[lyx.git] / src / buffer.C
index 9ac61660dc9ba5c22b69293a7e7ae0559a54a658..9c19e1bb73aaa589a8759f82a67af12122afe2ac 100644 (file)
@@ -246,7 +246,7 @@ void unknownClass(string const & unknown)
 {
        Alert::warning(_("Unknown document class"),
                bformat(_("Using the default document class, because the "
-                       " class %1$s is unknown."), unknown));
+                       "class %1$s is unknown."), unknown));
 }
 
 } // anon
@@ -295,7 +295,7 @@ int Buffer::readHeader(LyXLex & lex)
 // changed to be public and have one parameter
 // if par = 0 normal behavior
 // else insert behavior
-// Returns false if "\the_end" is not read (Asger)
+// Returns false if "\end_document" is not read (Asger)
 bool Buffer::readBody(LyXLex & lex, ParagraphList::iterator pit)
 {
        Paragraph::depth_type depth = 0;
@@ -329,7 +329,7 @@ bool Buffer::readBody(LyXLex & lex, ParagraphList::iterator pit)
                lyxerr[Debug::PARSER] << "Handling token: `"
                                      << token << '\'' << endl;
 
-               if (token == "\\the_end") {
+               if (token == "\\end_document") {
                        the_end_read = true;
                        continue;
                }
@@ -348,7 +348,7 @@ int Buffer::readParagraph(LyXLex & lex, string const & token,
        static Change current_change;
        int unknown = 0;
 
-       if (token == "\\layout") {
+       if (token == "\\begin_layout") {
                lex.pushToken(token);
 
                Paragraph par;
@@ -483,6 +483,8 @@ bool Buffer::readFile(LyXLex & lex, string const & filename,
 
        // the first token _must_ be...
        if (token != "\\lyxformat") {
+               lyxerr << "Token: " << token << endl;
+
                Alert::error(_("Document format failure"),
                        _("The specified document is not a LyX document."));
                return false;
@@ -496,7 +498,7 @@ bool Buffer::readFile(LyXLex & lex, string const & filename,
        //lyxerr << "           dot found at " << dot << endl;
        if (dot != string::npos)
                        tmp_format.erase(dot, 1);
-       file_format = strToInt(tmp_format);
+       int file_format = strToInt(tmp_format);
        //lyxerr << "format: " << file_format << endl;
        if (file_format == LYX_FORMAT) {
                // current format
@@ -522,7 +524,7 @@ bool Buffer::readFile(LyXLex & lex, string const & filename,
                                return false;
                        }
                        command += " -t"
-                               +tostr(LYX_FORMAT) + ' '
+                               + tostr(LYX_FORMAT) + ' '
                                + QuoteName(filename);
                        lyxerr[Debug::INFO] << "Running '"
                                            << command << '\''
@@ -698,7 +700,7 @@ bool Buffer::do_writeFile(ostream & ofs) const
                pit->write(this, ofs, params, depth);
 
        // Write marker that shows file is complete
-       ofs << "\n\\the_end" << endl;
+       ofs << "\n\\end_document" << endl;
 
        // Shouldn't really be needed....
        //ofs.close();