mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
merge the two parts of Tabular::read()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7166 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9fc4051e89
commit
6097aeb408
@ -1083,25 +1083,6 @@ void LyXTabular::write(Buffer const * buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void LyXTabular::read(Buffer const * buf, LyXLex & lex)
|
||||
{
|
||||
string line;
|
||||
istream & is = lex.getStream();
|
||||
|
||||
l_getline(is, line);
|
||||
if (!prefixIs(line, "<lyxtabular ")
|
||||
&& !prefixIs(line, "<LyXTabular ")) {
|
||||
lyx::Assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
int version;
|
||||
if (!getTokenValue(line, "version", version))
|
||||
return;
|
||||
lyx::Assert(version >= 2);
|
||||
read(buf, is, lex, line, version);
|
||||
}
|
||||
|
||||
void LyXTabular::setHeaderFooterRows(int hr, int fhr, int fr, int lfr)
|
||||
{
|
||||
// set header info
|
||||
@ -1179,10 +1160,24 @@ void LyXTabular::setHeaderFooterRows(int hr, int fhr, int fr, int lfr)
|
||||
}
|
||||
}
|
||||
|
||||
void LyXTabular::read(Buffer const * buf, istream & is,
|
||||
LyXLex & lex, string const & l, int const version)
|
||||
|
||||
void LyXTabular::read(Buffer const * buf, LyXLex & lex)
|
||||
{
|
||||
string line(l);
|
||||
string line;
|
||||
istream & is = lex.getStream();
|
||||
|
||||
l_getline(is, line);
|
||||
if (!prefixIs(line, "<lyxtabular ")
|
||||
&& !prefixIs(line, "<LyXTabular ")) {
|
||||
lyx::Assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
int version;
|
||||
if (!getTokenValue(line, "version", version))
|
||||
return;
|
||||
lyx::Assert(version >= 2);
|
||||
|
||||
int rows_arg;
|
||||
if (!getTokenValue(line, "rows", rows_arg))
|
||||
return;
|
||||
|
@ -478,10 +478,6 @@ private:
|
||||
///
|
||||
typedef std::vector<columnstruct> column_vector;
|
||||
|
||||
///
|
||||
void read(Buffer const * buf, std::istream & is,
|
||||
LyXLex & lex, string const & l, int const version);
|
||||
///
|
||||
///
|
||||
int rows_;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user