ret += ch;
ch = ' ';
}
- while((pos < str.length() - 1) && (str[++pos] != ch))
+ while ((pos < str.length() - 1) && (str[++pos] != ch))
ret += str[pos];
return true;
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);
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);
}
+bool getTokenValue(string const & str, const char * token, LyXLength & len)
+{
+ string tmp;
+ if (!getTokenValue(str, token, tmp))
+ return false;
+ return isValidLength(tmp, &len);
+}
+
+
inline
void l_getline(istream & is, string & str)
{
//#warning old l_getline
#endif
getline(is, str);
- while(str.empty())
+ while (str.empty())
getline(is, str);
}
return;
}
getTokenValue(line, "islongtable", is_long_tabular);
- getTokenValue(line, "endhead", endhead);
- getTokenValue(line, "endfirsthead", endfirsthead);
- getTokenValue(line, "endfoot", endfoot);
- getTokenValue(line, "endlastfoot", endlastfoot);
+ getTokenValue(line, "endhead", endhead.row);
+ getTokenValue(line, "endfirsthead", endfirsthead.row);
+ getTokenValue(line, "endfoot", endfoot.row);
+ getTokenValue(line, "endlastfoot", endlastfoot.row);
for (int i = 0; i < rows_; ++i) {
l_getline(is, line);