}
-bool MathGridInset::idxUp(idx_type & idx, pos_type & pos) const
+bool MathGridInset::idxUp(idx_type & /*idx*/, pos_type & /*pos*/) const
{
return false;
/*
}
-bool MathGridInset::idxDown(idx_type & idx, pos_type & pos) const
+bool MathGridInset::idxDown(idx_type & /*idx*/, pos_type & /*pos*/) const
{
return false;
/*
// leave matrix if on the left hand edge
if (col(idx) == 0)
return false;
- idx--;
+ --idx;
pos = cell(idx).size();
return true;
}
// leave matrix if on the right hand edge
if (col(idx) + 1 == ncols())
return false;
- idx++;
+ ++idx;
pos = 0;
return true;
}
void MathGridInset::write(WriteStream & os) const
{
for (row_type row = 0; row < nrows(); ++row) {
- os << verboseHLine(rowinfo_[row].lines_).c_str();
+ os << verboseHLine(rowinfo_[row].lines_);
for (col_type col = 0; col < ncols(); ++col)
- os << cell(index(row, col)) << eocString(col).c_str();
- os << eolString(row).c_str();
+ os << cell(index(row, col)) << eocString(col);
+ os << eolString(row);
}
- string s = verboseHLine(rowinfo_[nrows()].lines_);
- if (s.size())
- os << "\\\\" << s.c_str();
+ string const s = verboseHLine(rowinfo_[nrows()].lines_);
+ if (!s.empty())
+ os << "\\\\" << s;
}
-#include "math_inset.h"
+#include <config.h>
+
#include "math_mathmlstream.h"
+#include "math_inset.h"
#include "math_extern.h"
#include "debug.h"
}
+WriteStream & WriteStream::operator<<(string const & s)
+{
+ os << s;
+ string::const_iterator cit = s.begin();
+ string::const_iterator end = s.end();
+ for ( ; cit != end ; ++cit) {
+ if (*cit == '\n')
+ ++line_;
+ }
+ return *this;
+}
+
+
WriteStream & WriteStream::operator<<(char const * s)
{
os << s;
#ifndef MATH_MATHMLSTREAM_H
#define MATH_MATHMLSTREAM_H
-#include <iosfwd>
+#include "LString.h"
+
#include "support/LOstream.h"
+#include <iosfwd>
+
struct MathArray;
struct MathInset;
struct Buffer;
///
WriteStream & operator<<(MathArray const &);
///
+ WriteStream & operator<<(string const &);
+ ///
WriteStream & operator<<(char const *);
///
WriteStream & operator<<(char);