]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
More fixes to insettabular/text (and some missing features added).
[lyx.git] / src / buffer.C
index b2350fa66ebe41b4fe7f55268408ad5ef8c9a19f..d0b864ef9a9eb1cb287d85941835c1be66d9e774 100644 (file)
@@ -485,7 +485,10 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
                if (pp.first) {
                        params.textclass = pp.second;
                } else {
-                 lex.printError("Unknown textclass `$$Token'");
+                       WriteAlert(string(_("Textclass error")), 
+                               string(_("The document uses an unknown textclass \"")) + 
+                               lex.GetString() + string("\"."),
+                               string(_("LyX will not be able to produce output correctly.")));
                        params.textclass = 0;
                }
                if (!textclasslist.Load(params.textclass)) {
@@ -813,9 +816,9 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par,
                        for (; tmpret > 0; --tmpret)
                                tmpret2 = tmpret2 * 2;
 #else
-                       int const tmpret2 = pow(2.0, tmpret);
+                       int const tmpret2 = int(pow(2.0, tmpret));
 #endif
-                       lyxerr << "Tmpret2 = " << tmpret2 << endl;
+                       //lyxerr << "Tmpret2 = " << tmpret2 << endl;
                        par->align = LyXAlignment(tmpret2);
                }
        } else if (token == "\\added_space_top") {
@@ -1279,7 +1282,9 @@ string const Buffer::asciiParagraph(LyXParagraph const * par,
        LyXFont font2;
        Inset const * inset;
        char c;
+#ifndef NEW_INSETS
        LyXParagraph::footnote_flag footnoteflag = LyXParagraph::NO_FOOTNOTE;
+#endif
        char depth = 0;
        int ltype = 0;
        int ltype_depth = 0;
@@ -1381,7 +1386,11 @@ string const Buffer::asciiParagraph(LyXParagraph const * par,
       
        font1 = LyXFont(LyXFont::ALL_INHERIT, params.language);
        for (LyXParagraph::size_type i = 0; i < par->size(); ++i) {
-               if (!i && !footnoteflag && !noparbreak){
+               if (!i &&
+#ifndef NEW_INSETS
+                   !footnoteflag &&
+#endif
+                   !noparbreak) {
                        if (linelen > 0)
                                buffer << "\n\n";
                        for (char j = 0; j < depth; ++j)