X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftexstream.h;h=a14f84bf95fec38f64fe101b594c513a6d6532c9;hb=e14f8daca43c69d638a37d7883d398bcc68d459c;hp=bf4eb38bba81265c652d5ded86e9dfe0f858d1d8;hpb=66f7c2930ad5ba39f4b874a0d3b00fd55edfe4c4;p=lyx.git diff --git a/src/texstream.h b/src/texstream.h index bf4eb38bba..a14f84bf95 100644 --- a/src/texstream.h +++ b/src/texstream.h @@ -82,7 +82,7 @@ public: explicit otexstream(odocstream & os) : otexrowstream(os), canbreakline_(false), protectspace_(false), terminate_command_(false), - parbreak_(true), lastchar_(0) {} + parbreak_(true), blankline_(true), lastchar_(0) {} /// void put(char_type const & c); /// @@ -103,6 +103,7 @@ public: void lastChar(char_type const & c) { parbreak_ = (!canbreakline_ && c == '\n'); + blankline_ = ((!canbreakline_ && c == ' ') || c == '\n'); canbreakline_ = (c != '\n'); lastchar_ = c; } @@ -110,6 +111,8 @@ public: char_type lastChar() const { return lastchar_; } /// bool afterParbreak() const { return parbreak_; } + /// + bool blankLine() const { return blankline_; } private: /// bool canbreakline_; @@ -120,6 +123,8 @@ private: /// bool parbreak_; /// + bool blankline_; + /// char_type lastchar_; }; @@ -183,6 +188,6 @@ template otexstream & operator<<(otexstream & ots, Type value); -} +} // namespace lyx #endif