]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_streamstr.C
Fix to bug 2362: Deleting superscript also deletes subscript.
[lyx.git] / src / mathed / math_streamstr.C
index 5886fb6d1b0efc65ea130ff7adf1834d2bfec688..5208ba7592b5e2440b46267f14a76806c3790ff2 100644 (file)
@@ -1,13 +1,66 @@
+/**
+ * \file math_streamstr.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #include <config.h>
-#include <algorithm>
 
-#include "math_mathmlstream.h"
 #include "math_streamstr.h"
+#include "math_mathmlstream.h"
+#include "support/std_ostream.h"
+
+using std::string;
 
 
 WriteStream & operator<<(WriteStream & ws, string const & s)
 {
-       ws.os() << s;
-       ws.line() += std::count(s.begin(), s.end(), '\n');
+       ws << s.c_str();
        return ws;
 }
+
+
+NormalStream & operator<<(NormalStream & ns, string const & s)
+{
+       ns.os() << s;
+       return ns;
+}
+
+
+MapleStream & operator<<(MapleStream & ms, string const & s)
+{
+       ms.os() << s;
+       return ms;
+}
+
+
+MaximaStream & operator<<(MaximaStream & ms, string const & s)
+{
+       ms.os() << s;
+       return ms;
+}
+
+
+MathematicaStream & operator<<(MathematicaStream & ms, string const & s)
+{
+       ms.os() << s;
+       return ms;
+}
+
+
+MathMLStream & operator<<(MathMLStream & ms, string const & s)
+{
+       ms.os() << s;
+       return ms;
+}
+
+
+OctaveStream & operator<<(OctaveStream & os, string const & s)
+{
+       os.os() << s;
+       return os;
+}