#include <config.h>
#include "texstream.h"
+
+#include "TexRow.h"
+
#include "support/lstrings.h"
#include "support/unicode.h"
namespace lyx {
+
+otexrowstream::otexrowstream(odocstream & os, bool enable)
+ : os_(os), texrow_(make_unique<TexRow>(enable))
+{}
+
+
+otexrowstream::~otexrowstream() = default;
+
+
+unique_ptr<TexRow> otexrowstream::releaseTexRow()
+{
+ auto p = make_unique<TexRow>();
+ swap(texrow_, p);
+ return p;
+}
+
+
+void otexrowstream::append(docstring const & str, TexRow texrow)
+{
+ os_ << str;
+ texrow_->append(move(texrow));
+}
+
+
void otexrowstream::put(char_type const & c)
{
os_.put(c);
if (c == '\n')
- texrow_.newline();
+ texrow_->newline();
}
+
void otexstream::put(char_type const & c)
{
if (protectspace_) {
template otexrowstream & operator<< <unsigned long>(otexrowstream &,
unsigned long);
+#ifdef LYX_USE_LONG_LONG
+template otexrowstream & operator<< <unsigned long long>(otexrowstream &,
+ unsigned long long);
+#endif
+
template <typename Type>
otexstream & operator<<(otexstream & ots, Type value)
template otexstream & operator<< <int>(otexstream &, int);
template otexstream & operator<< <unsigned int>(otexstream &, unsigned int);
template otexstream & operator<< <unsigned long>(otexstream &, unsigned long);
+#ifdef LYX_USE_LONG_LONG
+template otexstream & operator<< <unsigned long long>(otexstream &, unsigned long long);
+#endif
}