]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathStream.h
Fix bug #7106: iterator out of range while copying multi-row math.
[lyx.git] / src / mathed / MathStream.h
index 70fdf30ef63454ad57be4578969d5563d0ba24ce..7da9a9b9f9177d0949a6a1c71f4ac8e0b3d750ba 100644 (file)
@@ -59,6 +59,10 @@ public:
        bool & firstitem() { return firstitem_; }
        ///
        void addlines(unsigned int);
+       /// record whether we can write an immediately following newline char
+       void canBreakLine(bool breakline) { canbreakline_ = breakline; }
+       /// tell whether we can write an immediately following newline char
+       bool canBreakLine() const { return canbreakline_; }
        /// writes space if next thing is isalpha()
        void pendingSpace(bool how);
        /// writes space if next thing is isalpha()
@@ -102,6 +106,8 @@ private:
        bool locked_;
        /// should we use only ascii chars when producing latex code?
        bool ascii_;
+       /// are we allowed to output an immediately following newline?
+       bool canbreakline_;
        ///
        int line_;
        ///
@@ -303,8 +309,6 @@ private:
        ///
        int line_;
        ///
-       char lastchar_;
-       ///
        bool in_text_;
        ///
        odocstringstream deferred_;
@@ -393,8 +397,6 @@ private:
        ///
        int line_;
        ///
-       char lastchar_;
-       ///
        bool in_text_;
        ///
        odocstringstream deferred_;