LyXTabular::LyXTabular(BufferParams const & bp,
- InsetTabular * inset, LyXTabular const & lt,
- bool same_id)
+ InsetTabular * inset, LyXTabular const & lt)
{
owner_ = inset;
cur_cell = -1;
Init(bp, lt.rows_, lt.columns_, <);
- // we really should change again to have InsetText as a pointer
- // and allocate it then we would not have to do this stuff all
- // double!
- if (same_id) {
- for (int i = 0; i < rows_; ++i) {
- for (int j = 0; j < columns_; ++j) {
- cell_info[i][j].inset.id(lt.cell_info[i][j].inset.id());
- cell_info[i][j].inset.setParagraphData(lt.cell_info[i][j].inset.paragraphs, true);
- }
- }
- }
#if 0
#ifdef WITH_WARNINGS
#warning Jürgen, can you make it the other way round. So that copy assignment depends on the copy constructor and not the other way. (Lgb)
LyXTabular * LyXTabular::clone(BufferParams const & bp,
- InsetTabular * inset, bool same_id)
+ InsetTabular * inset)
{
- LyXTabular * result = new LyXTabular(bp, inset, *this, same_id);
+ LyXTabular * result = new LyXTabular(bp, inset, *this);
#if 0
// don't know if this is good but I need to Clone also
// the text-insets here, this is for the Undo-facility!
int LyXTabular::TeXLongtableHeaderFooter(ostream & os, Buffer const * buf,
- LatexRunParams const & runparams,
- bool fragile, bool fp) const
+ LatexRunParams const & runparams) const
{
if (!is_long_tabular)
return 0;
}
for (int i = 0; i < rows_; ++i) {
if (row_info[i].endhead) {
- ret += TeXRow(os, i, buf, runparams, fragile, fp);
+ ret += TeXRow(os, i, buf, runparams);
}
}
if (endhead.bottomDL) {
}
for (int i = 0; i < rows_; ++i) {
if (row_info[i].endfirsthead) {
- ret += TeXRow(os, i, buf, runparams, fragile, fp);
+ ret += TeXRow(os, i, buf, runparams);
}
}
if (endfirsthead.bottomDL) {
}
for (int i = 0; i < rows_; ++i) {
if (row_info[i].endfoot) {
- ret += TeXRow(os, i, buf, runparams, fragile, fp);
+ ret += TeXRow(os, i, buf, runparams);
}
}
if (endfoot.bottomDL) {
}
for (int i = 0; i < rows_; ++i) {
if (row_info[i].endlastfoot) {
- ret += TeXRow(os, i, buf, runparams, fragile, fp);
+ ret += TeXRow(os, i, buf, runparams);
}
}
if (endlastfoot.bottomDL) {
int LyXTabular::TeXRow(ostream & os, int const i, Buffer const * buf,
- LatexRunParams const & runparams, bool fragile, bool fp) const
+ LatexRunParams const & runparams) const
{
int ret = 0;
int cell = GetCellNumber(i, 0);
if (rtl)
os << "\\R{";
- ret += inset->latex(buf, os, runparams, fragile, fp);
+ ret += inset->latex(buf, os, runparams);
if (rtl)
os << '}';
int LyXTabular::latex(Buffer const * buf, ostream & os,
- LatexRunParams const & runparams, bool fragile, bool fp) const
+ LatexRunParams const & runparams) const
{
int ret = 0;
os << "}\n";
++ret;
- ret += TeXLongtableHeaderFooter(os, buf, runparams, fragile, fp);
+ ret += TeXLongtableHeaderFooter(os, buf, runparams);
//+---------------------------------------------------------------------
//+ the single row and columns (cells) +
for (int i = 0; i < rows_; ++i) {
if (isValidRow(i)) {
- ret += TeXRow(os, i, buf, runparams, fragile, fp);
+ ret += TeXRow(os, i, buf, runparams);
if (is_long_tabular && row_info[i].newpage) {
os << "\\newpage\n";
++ret;
LyXTabular::BoxType LyXTabular::UseParbox(int cell) const
{
ParagraphList const & parlist = GetCellInset(cell)->paragraphs;
- ParagraphList::iterator cit = parlist.begin();
- ParagraphList::iterator end = parlist.end();
+ ParagraphList::const_iterator cit = parlist.begin();
+ ParagraphList::const_iterator end = parlist.end();
for (; cit != end; ++cit) {
for (int i = 0; i < cit->size(); ++i) {