#include "frontends/Alert.h"
#include "gettext.h"
#include "tabular_funcs.h"
-#include "lyxtextclasslist.h"
+#include "lyxlex.h"
#include <algorithm>
#include <cstdlib>
+using std::abs;
using std::ostream;
using std::istream;
using std::getline;
#ifdef SPECIAL_COLUM_HANDLING
if (cellinfo_of_cell(cell)->align_special.empty())
return cellinfo_of_cell(cell)->left_line;
- return prefixIs(frontStrip(cellinfo_of_cell(cell)->align_special), "|");
+ return prefixIs(ltrim(cellinfo_of_cell(cell)->align_special), "|");
#else
return cellinfo_of_cell(cell)->left_line;
#endif
#ifdef SPECIAL_COLUM_HANDLING
if (column_info[column_of_cell(cell)].align_special.empty())
return column_info[column_of_cell(cell)].left_line;
- return prefixIs(frontStrip(column_info[column_of_cell(cell)].align_special), "|");
+ return prefixIs(ltrim(column_info[column_of_cell(cell)].align_special), "|");
#else
return column_info[column_of_cell(cell)].left_line;
#endif
#ifdef SPECIAL_COLUM_HANDLING
if (cellinfo_of_cell(cell)->align_special.empty())
return cellinfo_of_cell(cell)->right_line;
- return suffixIs(strip(cellinfo_of_cell(cell)->align_special), "|");
+ return suffixIs(rtrim(cellinfo_of_cell(cell)->align_special), "|");
#else
return cellinfo_of_cell(cell)->right_line;
#endif
#ifdef SPECIAL_COLUM_HANDLING
if (column_info[column_of_cell(cell)].align_special.empty())
return column_info[right_column_of_cell(cell)].right_line;
- return suffixIs(strip(column_info[column_of_cell(cell)].align_special), "|");
+ return suffixIs(rtrim(column_info[column_of_cell(cell)].align_special), "|");
#else
return column_info[right_column_of_cell(cell)].right_line;
#endif
Paragraph * par = new Paragraph;
Paragraph * return_par = 0;
- par->layout(textclasslist[bp.textclass].defaultLayoutName());
+ par->layout(bp.getLyXTextClass().defaultLayout());
+
string tmptok;
int pos = 0;
Paragraph::depth_type depth = 0;
|| token == "\\end_deeper")
{
lex.pushToken(token);
-#ifndef NO_COMPABILITY
- // Here we need to insert the inset_ert_contents into the last
- // cell of the tabular.
- owner_->bufferOwner()->insertErtContents(par, pos);
-#endif
break;
}
-#ifndef NO_COMPABILITY
- if (token == "\\newline")
- // Here we need to insert the inset_ert_contents into the last
- // cell of the tabular.
- owner_->bufferOwner()->insertErtContents(par, pos, false);
-#endif
if (owner_->bufferOwner()->parseSingleLyXformat2Token(lex, par,
return_par,
token, pos,
InsetText * inset = GetCellInset(cell);
bool rtl = inset->paragraph()->isRightToLeftPar(buf->params) &&
- inset->paragraph()->size() > 0 && GetPWidth(cell).zero();
+ !inset->paragraph()->empty() && GetPWidth(cell).zero();
if (rtl)
os << "\\R{";
}
os << ">";
- ret += GetCellInset(cell)->docbook(buf, os);
+ ret += GetCellInset(cell)->docbook(buf, os, true);
os << "</entry>\n";
++cell;
}
}
-int LyXTabular::docBook(Buffer const * buf, ostream & os) const
+int LyXTabular::docbook(Buffer const * buf, ostream & os,
+ bool /*mixcont*/) const
{
int ret = 0;