X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftabular-old.C;h=b3906c8c58bfaa9d1f730adfd0f25b0621c56efc;hb=8a5d04fd84e344a1ba1cfd3f5cce67d41874cfa3;hp=3e06db9a68b5a9111f0e9fd5a3318bc1753023a9;hpb=b9288969ec06caa3d7b1e9d4eb7937c1e029b44f;p=lyx.git diff --git a/src/tabular-old.C b/src/tabular-old.C index 3e06db9a68..b3906c8c58 100644 --- a/src/tabular-old.C +++ b/src/tabular-old.C @@ -1,13 +1,13 @@ /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor - * + * * Copyright 2000-2001 The LyX Team. * * @author: Jürgen Vigna * - * ====================================================== + * ====================================================== */ #include @@ -19,6 +19,7 @@ #include "support/lstrings.h" #include "support/textutils.h" +using std::abs; using std::istream; using std::getline; using std::endl; @@ -134,7 +135,7 @@ bool getTokenValue(string const & str, const char * token, LyXLength & len) if (!getTokenValue(str, token, tmp)) return false; return isValidLength(tmp, &len); -} +} inline @@ -164,8 +165,8 @@ void LyXTabular::ReadOld(Buffer const * buf, istream & is, Init(buf->params, rows_arg, columns_arg); l_getline(is, line); if (!prefixIs(line, " got" << - line << ")" << endl; + lyxerr << "Wrong tabular format (expected got" + << line << ')' << endl; return; } getTokenValue(line, "islongtable", is_long_tabular); @@ -183,8 +184,8 @@ void LyXTabular::ReadOld(Buffer const * buf, istream & is, for (int i = 0; i < rows_; ++i) { l_getline(is, line); if (!prefixIs(line, " got" << - line << ")" << endl; + lyxerr << "Wrong tabular format (expected got" + << line << ')' << endl; return; } getTokenValue(line, "topline", row_info[i].top_line); @@ -193,8 +194,8 @@ void LyXTabular::ReadOld(Buffer const * buf, istream & is, for (int j = 0; j < columns_; ++j) { l_getline(is,line); if (!prefixIs(line," got" << - line << ")" << endl; + lyxerr << "Wrong tabular format (expected got" + << line << ')' << endl; return; } if (!i) { @@ -207,8 +208,8 @@ void LyXTabular::ReadOld(Buffer const * buf, istream & is, } l_getline(is, line); if (!prefixIs(line, " got" << - line << ")" << endl; + lyxerr << "Wrong tabular format (expected got" + << line << ')' << endl; return; } getTokenValue(line, "multicolumn", cell_info[i][j].multicolumn); @@ -228,21 +229,21 @@ void LyXTabular::ReadOld(Buffer const * buf, istream & is, l_getline(is, line); } if (line != "") { - lyxerr << "Wrong tabular format (expected got" << - line << ")" << endl; + lyxerr << "Wrong tabular format (expected got" + << line << ')' << endl; return; } l_getline(is, line); if (line != "") { - lyxerr << "Wrong tabular format (expected got" << - line << ")" << endl; + lyxerr << "Wrong tabular format (expected got" + << line << ')' << endl; return; } } l_getline(is, line); if (line != "") { - lyxerr << "Wrong tabular format (expected got" << - line << ")" << endl; + lyxerr << "Wrong tabular format (expected got" + << line << ')' << endl; return; } }