]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/context.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / tex2lyx / context.C
index a40cc3ad181adf2dea42c290ae8c6c4deda3ea66..12404d9d12711564dbd08203c6a5500425e4223b 100644 (file)
@@ -15,6 +15,9 @@
 #include "support/lstrings.h"
 #include "context.h"
 
+
+namespace lyx {
+
 using std::ostream;
 using std::endl;
 using std::string;
@@ -77,6 +80,7 @@ void output_font_change(ostream & os, Font const & oldfont,
 
 
 Font Context::normalfont;
+bool Context::empty = true;
 
 
 Context::Context(bool need_layout_,
@@ -133,18 +137,18 @@ void Context::check_layout(ostream & os)
                                             font, normalfont);
                                deeper_paragraph = true;
                        }
-                       need_layout = false;
                } else {
                        // No list-like environment
                        begin_layout(os, layout, font, normalfont);
-                       need_layout=false;
                }
+               need_layout = false;
                need_end_layout = true;
                if (!extra_stuff.empty()) {
                        os << extra_stuff;
                        extra_stuff.erase();
                }
                os << "\n";
+               empty = false;
        }
 }
 
@@ -232,3 +236,6 @@ void Context::dump(ostream & os, string const & desc) const
           << font.size << ' ' << font.family << ' ' << font.series << ' '
           << font.shape << ']' << endl;
 }
+
+
+} // namespace lyx