#include <sstream>
-using lyx::docstring;
-using lyx::odocstream;
-using lyx::support::ltrim;
-using lyx::support::prefixIs;
-using lyx::support::rtrim;
-using lyx::support::suffixIs;
+
+namespace lyx {
+
+using support::prefixIs;
+using support::ltrim;
+using support::rtrim;
+using support::suffixIs;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
if (bp.trackChanges)
// FIXME: Change Tracking (MG)
for (col_type j = 0; j < columns_; ++j)
- cell_info[row + 1][j].inset->markNew(true);
+ cell_info[row + 1][j].inset->setChange(Change(Change::INSERTED));
set_row_column_number_info();
}
if (bp.trackChanges)
// FIXME: Change Tracking (MG)
for (col_type j = 0; j < columns_; ++j)
- cell_info[row + 1][j].inset->markNew(true);
+ cell_info[row + 1][j].inset->setChange(Change(Change::INSERTED));
set_row_column_number_info();
}
//++column;
for (row_type i = 0; i < rows_; ++i) {
cell_info[i][column + 1].inset->clear();
+ // FIXME: Change Tracking (MG)
if (bp.trackChanges)
- // FIXME: Change Tracking (MG)
- cell_info[i][column + 1].inset->markNew(true);
+ cell_info[i][column + 1].inset->setChange(Change(Change::INSERTED));
}
fixCellNums();
}
if (bp.trackChanges)
// FIXME: Change Tracking (MG)
for (row_type i = 0; i < rows_; ++i)
- cell_info[i][column + 1].inset->markNew(true);
+ cell_info[i][column + 1].inset->setChange(Change(Change::INSERTED));
fixCellNums();
}
if (isMultiColumn(cell)) {
os << "\\multicolumn{" << cells_in_multicolumn(cell) << "}{";
if (!cellinfo_of_cell(cell).align_special.empty()) {
- os << lyx::from_ascii(cellinfo_of_cell(cell).align_special)
+ os << from_ascii(cellinfo_of_cell(cell).align_special)
<< "}{";
} else {
if (leftLine(cell) &&
break;
}
os << '{'
- << lyx::from_ascii(getPWidth(cell).asLatexString())
+ << from_ascii(getPWidth(cell).asLatexString())
<< '}';
} else {
switch (getAlignment(cell)) {
os << 'b';
break;
}
- os << "]{" << lyx::from_ascii(getPWidth(cell).asLatexString())
+ os << "]{" << from_ascii(getPWidth(cell).asLatexString())
<< "}{";
} else if (getUsebox(cell) == BOX_MINIPAGE) {
os << "\\begin{minipage}[";
os << 'b';
break;
}
- os << "]{" << lyx::from_ascii(getPWidth(cell).asLatexString())
+ os << "]{" << from_ascii(getPWidth(cell).asLatexString())
<< "}\n";
++ret;
}
} else if(!row_info[i].top_space.zero()) {
if (use_booktabs)
os << "\\addlinespace["
- << lyx::from_ascii(row_info[i].top_space.asLatexString())
+ << from_ascii(row_info[i].top_space.asLatexString())
<< "]\n";
else {
os << "\\noalign{\\vskip"
- << lyx::from_ascii(row_info[i].top_space.asLatexString())
+ << from_ascii(row_info[i].top_space.asLatexString())
<< "}\n";
}
++ret;
if (use_booktabs)
os << "\\addlinespace";
os << '['
- << lyx::from_ascii(row_info[i].bottom_space.asLatexString())
+ << from_ascii(row_info[i].bottom_space.asLatexString())
<< ']';
}
os << '\n';
} else if (!row_info[i].interline_space.zero()) {
if (use_booktabs)
os << "\\addlinespace["
- << lyx::from_ascii(row_info[i].interline_space.asLatexString())
+ << from_ascii(row_info[i].interline_space.asLatexString())
<< "]\n";
else
os << "\\noalign{\\vskip"
- << lyx::from_ascii(row_info[i].interline_space.asLatexString())
+ << from_ascii(row_info[i].interline_space.asLatexString())
<< "}\n";
++ret;
}
os << "\\begin{tabular}{";
for (col_type i = 0; i < columns_; ++i) {
if (!column_info[i].align_special.empty()) {
- os << lyx::from_ascii(column_info[i].align_special);
+ os << from_ascii(column_info[i].align_special);
} else {
if (!use_booktabs && column_info[i].left_line)
os << '|';
break;
}
os << '{'
- << lyx::from_ascii(column_info[i].p_width.asLatexString())
+ << from_ascii(column_info[i].p_width.asLatexString())
<< '}';
} else {
switch (column_info[i].alignment) {
}
-int LyXTabular::docbookRow(Buffer const & buf, ostream & os, row_type row,
+int LyXTabular::docbookRow(Buffer const & buf, odocstream & os, row_type row,
OutputParams const & runparams) const
{
int ret = 0;
}
-int LyXTabular::docbook(Buffer const & buf, ostream & os,
+int LyXTabular::docbook(Buffer const & buf, odocstream & os,
OutputParams const & runparams) const
{
int ret = 0;
}
-int LyXTabular::asciiTopHLine(lyx::odocstream & os, row_type row,
+int LyXTabular::asciiTopHLine(odocstream & os, row_type row,
vector<unsigned int> const & clen) const
{
idx_type const fcell = getFirstCellInRow(row);
if (!tmp)
return 0;
- lyx::char_type ch;
+ char_type ch;
for (idx_type i = fcell; i < n; ++i) {
if (topLine(i)) {
if (leftLine(i))
}
-int LyXTabular::asciiBottomHLine(lyx::odocstream & os, row_type row,
+int LyXTabular::asciiBottomHLine(odocstream & os, row_type row,
vector<unsigned int> const & clen) const
{
idx_type const fcell = getFirstCellInRow(row);
if (!tmp)
return 0;
- lyx::char_type ch;
+ char_type ch;
for (idx_type i = fcell; i < n; ++i) {
if (bottomLine(i)) {
if (leftLine(i))
}
-int LyXTabular::asciiPrintCell(Buffer const & buf, lyx::odocstream & os,
+int LyXTabular::asciiPrintCell(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
{
- lyx::odocstringstream sstr;
+ odocstringstream sstr;
int const ret = getCellInset(cell)->plaintext(buf, sstr, runparams);
if (onlydata) {
}
-int LyXTabular::plaintext(Buffer const & buf, lyx::odocstream & os,
+int LyXTabular::plaintext(Buffer const & buf, odocstream & os,
OutputParams const & runparams,
int const depth,
bool onlydata, unsigned char delim) const
idx_type cell = getCellNumber(i, j);
if (isMultiColumnReal(cell))
continue;
- lyx::odocstringstream sstr;
+ odocstringstream sstr;
getCellInset(cell)->plaintext(buf, sstr, runparams);
if (clen[j] < sstr.str().length())
clen[j] = sstr.str().length();
idx_type cell = getCellNumber(i, j);
if (!isMultiColumnReal(cell) || isPartOfMultiColumn(i, j))
continue;
- lyx::odocstringstream sstr;
+ odocstringstream sstr;
getCellInset(cell)->plaintext(buf, sstr, runparams);
int len = int(sstr.str().length());
idx_type const n = cells_in_multicolumn(cell);
return BOX_NONE;
}
+
+
+} // namespace lyx