mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Provide for the possibility of deferred material, per Andre's excellent
suggestion. Now I wish I'd done XHTMLStream the same way.... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32691 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bb80bd78f9
commit
98e6886dc4
@ -305,12 +305,31 @@ void MathStream::cr()
|
||||
}
|
||||
|
||||
|
||||
void MathStream::defer(docstring const & s)
|
||||
{
|
||||
deferred_ << s;
|
||||
}
|
||||
|
||||
|
||||
void MathStream::defer(string const & s)
|
||||
{
|
||||
deferred_ << from_utf8(s);
|
||||
}
|
||||
|
||||
|
||||
docstring MathStream::deferred() const
|
||||
{
|
||||
return deferred_.str();
|
||||
}
|
||||
|
||||
|
||||
MathStream & operator<<(MathStream & ms, docstring const & s)
|
||||
{
|
||||
ms.os() << s;
|
||||
return ms;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
@ -256,6 +256,12 @@ public:
|
||||
int & tab() { return tab_; }
|
||||
///
|
||||
friend MathStream & operator<<(MathStream &, char const *);
|
||||
///
|
||||
void defer(docstring const &);
|
||||
///
|
||||
void defer(std::string const &);
|
||||
///
|
||||
docstring deferred() const;
|
||||
private:
|
||||
///
|
||||
odocstream & os_;
|
||||
@ -265,6 +271,8 @@ private:
|
||||
int line_;
|
||||
///
|
||||
char lastchar_;
|
||||
///
|
||||
odocstringstream deferred_;
|
||||
};
|
||||
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user