]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_mathmlstream.C
fix build, thesaurus
[lyx.git] / src / mathed / math_mathmlstream.C
index bf12913e0b94719703472d8e8b887c05ded80b29..a4bbcfce6cd9ef5d8c5dd85b67744f559be5c890 100644 (file)
@@ -4,8 +4,7 @@
 #include "math_inset.h"
 #include "math_extern.h"
 #include "debug.h"
-
-#include <algorithm>
+#include "support/lyxalgo.h"
 
 
 MathMLStream::MathMLStream(std::ostream & os)
@@ -186,15 +185,21 @@ NormalStream & operator<<(NormalStream & ns, char c)
 
 
 WriteStream::WriteStream(std::ostream & os, bool fragile)
-       : os_(os), fragile_(fragile), line_(0)
+       : os_(os), fragile_(fragile), firstitem_(false), line_(0)
 {}
 
 
 WriteStream::WriteStream(std::ostream & os)
-       : os_(os), fragile_(false), line_(0)
+       : os_(os), fragile_(false), firstitem_(false), line_(0)
 {}
 
 
+void WriteStream::addlines(unsigned int n)
+{
+       line_ += n;
+}
+
+
 WriteStream & operator<<(WriteStream & ws, MathInset const * p)
 {
        if (p)
@@ -215,7 +220,7 @@ WriteStream & operator<<(WriteStream & ws, MathArray const & ar)
 WriteStream & operator<<(WriteStream & ws, char const * s)
 {
        ws.os() << s;
-       ws.line() += std::count(s, s + strlen(s), '\n');
+       ws.addlines(int(lyx::count(s, s+strlen(s), '\n')));
        return ws;
 }
 
@@ -224,7 +229,7 @@ WriteStream & operator<<(WriteStream & ws, char c)
 {
        ws.os() << c;
        if (c == '\n')
-               ++ws.line();
+               ws.addlines(1);
        return ws;
 }