X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftabular-old.C;h=b3906c8c58bfaa9d1f730adfd0f25b0621c56efc;hb=8a5d04fd84e344a1ba1cfd3f5cce67d41874cfa3;hp=1ab944317f1bb06b43bec7bffbe08f3978431311;hpb=1070702ea46b36ec5016bad2fe97649cec5e6148;p=lyx.git diff --git a/src/tabular-old.C b/src/tabular-old.C index 1ab944317f..b3906c8c58 100644 --- a/src/tabular-old.C +++ b/src/tabular-old.C @@ -1,22 +1,25 @@ /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor - * + * * Copyright 2000-2001 The LyX Team. * * @author: Jürgen Vigna * - * ====================================================== + * ====================================================== */ #include #include "tabular.h" +#include "buffer.h" #include "debug.h" + #include "support/lstrings.h" #include "support/textutils.h" +using std::abs; using std::istream; using std::getline; using std::endl; @@ -132,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 @@ -159,11 +162,11 @@ void LyXTabular::ReadOld(Buffer const * buf, istream & is, return; if (!getTokenValue(line, "columns", columns_arg)) return; - Init(rows_arg, columns_arg); + 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); @@ -181,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); @@ -191,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) { @@ -205,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); @@ -226,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; } }