os << "\\addlinespace\n";
else
os << "\\noalign{\\vskip\\doublerulesep}\n";
+ ++ret;
} else if(!row_info[i].top_space.zero()) {
if (use_booktabs)
os << "\\addlinespace["
os << "\\addlinespace\n";
else
os << "\\noalign{\\vskip\\doublerulesep}\n";
+ ++ret;
} else if (!row_info[i].interline_space.zero()) {
if (use_booktabs)
os << "\\addlinespace["
}
-int LyXTabular::asciiTopHLine(odocstream & os, row_type row,
- vector<unsigned int> const & clen) const
+bool LyXTabular::plaintextTopHLine(odocstream & os, row_type row,
+ vector<unsigned int> const & clen) const
{
idx_type const fcell = getFirstCellInRow(row);
idx_type const n = numberOfCellsInRow(fcell) + fcell;
}
}
if (!tmp)
- return 0;
+ return false;
char_type ch;
for (idx_type i = fcell; i < n; ++i) {
}
}
os << endl;
- return 1;
+ return true;
}
-int LyXTabular::asciiBottomHLine(odocstream & os, row_type row,
- vector<unsigned int> const & clen) const
+bool LyXTabular::plaintextBottomHLine(odocstream & os, row_type row,
+ vector<unsigned int> const & clen) const
{
idx_type const fcell = getFirstCellInRow(row);
idx_type const n = numberOfCellsInRow(fcell) + fcell;
}
}
if (!tmp)
- return 0;
+ return false;
char_type ch;
for (idx_type i = fcell; i < n; ++i) {
}
}
os << endl;
- return 1;
+ return true;
}
-int LyXTabular::asciiPrintCell(Buffer const & buf, odocstream & os,
+void LyXTabular::plaintextPrintCell(Buffer const & buf, odocstream & os,
OutputParams const & runparams,
idx_type cell, row_type row, col_type column,
vector<unsigned int> const & clen,
bool onlydata) const
{
odocstringstream sstr;
- int const ret = getCellInset(cell)->plaintext(buf, sstr, runparams);
+ getCellInset(cell)->plaintext(buf, sstr, runparams);
if (onlydata) {
os << sstr.str();
- return ret;
+ return;
}
if (leftLine(cell))
os << " |";
else
os << " ";
-
- return ret;
}
-int LyXTabular::plaintext(Buffer const & buf, odocstream & os,
- OutputParams const & runparams,
- int const depth,
- bool onlydata, unsigned char delim) const
+void LyXTabular::plaintext(Buffer const & buf, odocstream & os,
+ OutputParams const & runparams, int const depth,
+ bool onlydata, unsigned char delim) const
{
- int ret = 0;
-
// first calculate the width of the single columns
vector<unsigned int> clen(columns_);
}
idx_type cell = 0;
for (row_type i = 0; i < rows_; ++i) {
- if (!onlydata && asciiTopHLine(os, i, clen))
+ if (!onlydata && plaintextTopHLine(os, i, clen))
os << docstring(depth * 2, ' ');
for (col_type j = 0; j < columns_; ++j) {
if (isPartOfMultiColumn(i, j))
continue;
if (onlydata && j > 0)
os << delim;
- ret += asciiPrintCell(buf, os, runparams,
- cell, i, j, clen, onlydata);
+ plaintextPrintCell(buf, os, runparams,
+ cell, i, j, clen, onlydata);
++cell;
}
os << endl;
if (!onlydata) {
os << docstring(depth * 2, ' ');
- if (asciiBottomHLine(os, i, clen))
+ if (plaintextBottomHLine(os, i, clen))
os << docstring(depth * 2, ' ');
}
}
- return ret;
}