]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/context.C
fix bug 1750
[lyx.git] / src / tex2lyx / context.C
index c1a89075ed9806c00346f8239af977b744a20650..b980b3e695fcbb82ba2b07b65076eea70976e11a 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <iostream>
 
+#include "support/lstrings.h"
 #include "context.h"
 
 using std::ostream;
@@ -35,25 +36,27 @@ void end_layout(ostream & os)
 
 void begin_deeper(ostream & os)
 {
-       os << "\n\\begin_deeper \n";
+       os << "\n\\begin_deeper\n";
 }
 
 
 void end_deeper(ostream & os)
 {
-       os << "\n\\end_deeper \n";
+       os << "\n\\end_deeper\n";
 }
 
 }
 
 Context::Context(bool need_layout_,
                 LyXTextClass const & textclass_,
-                LyXLayout_ptr layout_, LyXLayout_ptr parent_layout_)
+                LyXLayout_ptr layout_, LyXLayout_ptr parent_layout_,
+                Font font_)
        : need_layout(need_layout_),
          need_end_layout(false), need_end_deeper(false),
          has_item(false), deeper_paragraph(false),
          textclass(textclass_),
-         layout(layout_), parent_layout(parent_layout_)
+         layout(layout_), parent_layout(parent_layout_),
+         font(font_)
 {
        if (!layout.get())
                layout = textclass.defaultLayout();
@@ -155,6 +158,13 @@ void Context::new_paragraph(ostream & os)
 }
 
 
+void Context::add_extra_stuff(std::string const & stuff)
+{
+       if (!lyx::support::contains(extra_stuff, stuff))
+               extra_stuff += stuff;
+}
+
+
 void Context::dump(ostream & os, string const & desc) const
 {
        os << "\n" << desc <<" [";