#include "Paragraph.h"
#include "ParagraphParameters.h"
#include "ParIterator.h"
+#include "TextClass.h"
#include "TextMetrics.h"
#include "support/convert.h"
+#include "support/docstream.h"
#include "support/lstrings.h"
#include "frontends/alert.h"
void Tabular::plaintext(Buffer const & buf, odocstream & os,
OutputParams const & runparams, int const depth,
- bool onlydata, unsigned char delim) const
+ bool onlydata, char_type delim) const
{
// first calculate the width of the single columns
vector<unsigned int> clen(columnCount());
if (isPartOfMultiColumn(i, j))
continue;
if (onlydata && j > 0)
- os << delim;
+ // we don't use operator<< for single UCS4 character.
+ // see explanation in docstream.h
+ os.put(delim);
plaintextPrintCell(buf, os, runparams,
cell, i, j, clen, onlydata);
++cell;
for (idx_type cell = 0, n = cellCount(); cell < n; ++cell)
if (getCellInset(cell).get() == inset) {
- LYXERR(Debug::INSETTEXT) << "Tabular::getCellFromInset: "
- << "cell=" << cell << endl;
+ LYXERR(Debug::INSETTEXT, "Tabular::getCellFromInset: "
+ << "cell=" << cell);
return cell;
}
x += scx_;
x += ADD_TO_TABULAR_WIDTH;
+ bool const original_drawing_state = pi.pain.isDrawingEnabled();
+
idx_type idx = 0;
first_visible_cell = Tabular::npos;
for (row_type i = 0; i < tabular.rowCount(); ++i) {
pi.pain.setDrawingEnabled(false);
cell(idx)->draw(pi, cx, y);
drawCellLines(pi.pain, nx, y, i, idx, pi.erased_);
- pi.pain.setDrawingEnabled(true);
+ pi.pain.setDrawingEnabled(original_drawing_state);
} else {
cell(idx)->draw(pi, cx, y);
drawCellLines(pi.pain, nx, y, i, idx, pi.erased_);
if (!cur.selection())
return;
- if (!ptr_cmp(&cur.inset(), this))
+ if (&cur.inset() != this)
return;
//resetPos(cur);
void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
{
- LYXERR(Debug::DEBUG) << "# InsetTabular::doDispatch: cmd: " << cmd
- << "\n cur:" << cur << endl;
+ LYXERR(Debug::DEBUG, "# InsetTabular::doDispatch: cmd: " << cmd
+ << "\n cur:" << cur);
CursorSlice sl = cur.top();
Cursor & bvcur = cur.bv().cursor();