]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathData.C
make it compile again (hopefully)
[lyx.git] / src / mathed / MathData.C
index 6b94f12ec0175f956090949f1879918091c5ca1c..1b995587b1ad37d2caf4f57b39b46a167f5f54b4 100644 (file)
@@ -29,6 +29,8 @@
 
 #include <boost/assert.hpp>
 
+using lyx::odocstream;
+
 using std::abs;
 using std::endl;
 using std::min;
@@ -106,17 +108,21 @@ void MathArray::erase(size_type pos1, size_type pos2)
 
 void MathArray::dump2() const
 {
-       NormalStream ns(lyxerr);
+       lyx::odocstringstream os;
+       NormalStream ns(os);
        for (const_iterator it = begin(); it != end(); ++it)
                ns << *it << ' ';
+       lyxerr << lyx::to_utf8(os.str());
 }
 
 
 void MathArray::dump() const
 {
-       NormalStream ns(lyxerr);
+       lyx::odocstringstream os;
+       NormalStream ns(os);
        for (const_iterator it = begin(); it != end(); ++it)
                ns << '<' << *it << '>';
+       lyxerr << lyx::to_utf8(os.str());
 }
 
 
@@ -444,3 +450,20 @@ int MathArray::yo(BufferView & bv) const
 {
        return bv.coordCache().getArrays().y(this);
 }
+
+
+std::ostream & operator<<(std::ostream & os, MathArray const & ar)
+{
+       lyx::odocstringstream oss;
+       NormalStream ns(oss);
+       ns << ar;
+       return os << lyx::to_utf8(oss.str());
+}
+
+
+odocstream & operator<<(odocstream & os, MathArray const & ar)
+{
+       NormalStream ns(os);
+       ns << ar;
+       return os;
+}