X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftabular-old.C;h=1ab944317f1bb06b43bec7bffbe08f3978431311;hb=8d1c58af82d1fc356f470dff97878ab7c3e8a2fe;hp=33d23c79efbaba85b9fb55cdea630aa527c96eb9;hpb=ff36293942a2c10913ae8775bfdc53562d0fc128;p=lyx.git diff --git a/src/tabular-old.C b/src/tabular-old.C index 33d23c79ef..1ab944317f 100644 --- a/src/tabular-old.C +++ b/src/tabular-old.C @@ -15,6 +15,7 @@ #include "tabular.h" #include "debug.h" #include "support/lstrings.h" +#include "support/textutils.h" using std::istream; using std::getline; @@ -59,12 +60,12 @@ bool getTokenValue(string const & str, char const * token, int & num) pos += strlen(token) + 1; ch = str[pos]; if ((ch != '"') && (ch != '\'')) { // only read till next space - if (!isdigit(ch)) + if (!IsDigit(ch)) return false; ret += ch; } ++pos; - while ((pos < str.length() - 1) && isdigit(str[pos])) + while ((pos < str.length() - 1) && IsDigit(str[pos])) ret += str[pos++]; num = strToInt(ret); @@ -112,12 +113,12 @@ bool getTokenValue(string const & str, char const * token, bool & flag) pos += strlen(token) + 1; ch = str[pos]; if ((ch != '"') && (ch != '\'')) { // only read till next space - if (!isdigit(ch)) + if (!IsDigit(ch)) return false; ret += ch; } ++pos; - while ((pos < str.length() - 1) && isdigit(str[pos])) + while ((pos < str.length() - 1) && IsDigit(str[pos])) ret += str[pos++]; flag = strToInt(ret); @@ -175,14 +176,7 @@ void LyXTabular::ReadOld(Buffer const * buf, istream & is, getTokenValue(line, "endfirsthead", fhrow); getTokenValue(line, "endfoot", frow); getTokenValue(line, "endlastfoot", lfrow); - if (abs(hrow) > 0) - row_info[abs(hrow)-1].endhead = true; - if (abs(fhrow)) - row_info[abs(fhrow)-1].endfirsthead = true; - if (abs(frow)) - row_info[abs(frow)-1].endfoot = true; - if (abs(lfrow)) - row_info[abs(lfrow)-1].endlastfoot = true; + setHeaderFooterRows(abs(hrow), abs(fhrow), abs(frow), abs(lfrow)); for (int i = 0; i < rows_; ++i) { l_getline(is, line);