do as Lars says

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3142 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-12-03 17:52:48 +00:00
parent 08c2fba2a0
commit ef9efa6c0d
5 changed files with 20 additions and 10 deletions

View File

@ -111,6 +111,7 @@ libmathed_la_SOURCES = \
math_sqrtinset.h \
math_stackrelinset.C \
math_stackrelinset.h \
math_streamstr.C \
math_streamstr.h \
math_stringinset.C \
math_stringinset.h \

View File

@ -3,6 +3,7 @@
#endif
#include "math_gridinset.h"
#include "math_mathmlstream.h"
#include "math_streamstr.h"
#include "lyxfont.h"
#include "Painter.h"

View File

@ -1,4 +1,5 @@
#include <config.h>
#include <algorithm>
#include "math_mathmlstream.h"
#include "math_inset.h"
@ -213,10 +214,7 @@ WriteStream & operator<<(WriteStream & ws, MathArray const & ar)
WriteStream & operator<<(WriteStream & ws, char const * s)
{
ws.os() << s;
for ( ; *s ; ++s) {
if (*s == '\n')
++ws.line();
}
ws.line() += std::count(s, s + strlen(s), '\n');
return ws;
}

View File

@ -0,0 +1,13 @@
#include <config.h>
#include <algorithm>
#include "math_mathmlstream.h"
#include "math_streamstr.h"
WriteStream & operator<<(WriteStream & ws, string const & s)
{
ws.os() << s;
ws.line() += std::count(s.begin(), s.end(), '\n');
return ws;
}

View File

@ -2,16 +2,13 @@
#define MATH_STREAMSTR_H
#include "LString.h"
#include "math_mathmlstream.h"
class WriteStream;
//
// writing strings directly
//
inline WriteStream & operator<<(WriteStream & ws, string const & s)
{
ws << s.c_str();
return ws;
}
WriteStream & operator<<(WriteStream & ws, string const & s);
#endif