mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
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:
parent
08c2fba2a0
commit
ef9efa6c0d
@ -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 \
|
||||
|
@ -3,6 +3,7 @@
|
||||
#endif
|
||||
|
||||
#include "math_gridinset.h"
|
||||
#include "math_mathmlstream.h"
|
||||
#include "math_streamstr.h"
|
||||
#include "lyxfont.h"
|
||||
#include "Painter.h"
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
13
src/mathed/math_streamstr.C
Normal file
13
src/mathed/math_streamstr.C
Normal 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;
|
||||
}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user