mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Also catch the endl manipulator for automatic line counting.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37657 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5d774518c6
commit
05491c58cc
@ -1453,8 +1453,7 @@ void Buffer::writeLaTeXSource(otexstream & os,
|
||||
d->setParent(save_parent);
|
||||
|
||||
// add this just in case after all the paragraphs
|
||||
os.os() << endl;
|
||||
os.texrow().newline();
|
||||
os << endl;
|
||||
|
||||
if (output_preamble) {
|
||||
os << "\\end{document}\n";
|
||||
|
@ -447,6 +447,15 @@ otexstream & operator<<(otexstream & ots, SafeBreakLine)
|
||||
}
|
||||
|
||||
|
||||
otexstream & operator<<(otexstream & ots, odocstream_manip pf)
|
||||
{
|
||||
ots.os() << pf;
|
||||
if (pf == static_cast<odocstream_manip>(endl))
|
||||
ots.texrow().newline();
|
||||
return ots;
|
||||
}
|
||||
|
||||
|
||||
otexstream & operator<<(otexstream & ots, docstring const & s)
|
||||
{
|
||||
size_t const len = s.length();
|
||||
|
@ -83,6 +83,9 @@ typedef std::basic_istringstream<char_type> idocstringstream;
|
||||
/// UCS4 output stringstream
|
||||
typedef std::basic_ostringstream<char_type> odocstringstream;
|
||||
|
||||
/// UCS4 output manipulator
|
||||
typedef odocstream & (*odocstream_manip)(odocstream &);
|
||||
|
||||
/** Wrapper class for odocstream.
|
||||
This class is used to automatically count the lines of the exported latex
|
||||
code and also to ensure that no blank lines may be inadvertently output.
|
||||
@ -140,6 +143,8 @@ otexstream & operator<<(otexstream &, BreakLine);
|
||||
///
|
||||
otexstream & operator<<(otexstream &, SafeBreakLine);
|
||||
///
|
||||
otexstream & operator<<(otexstream &, odocstream_manip);
|
||||
///
|
||||
otexstream & operator<<(otexstream &, docstring const &);
|
||||
///
|
||||
otexstream & operator<<(otexstream &, char const *);
|
||||
|
Loading…
Reference in New Issue
Block a user