]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/Context.cpp
tex2lyx/text.cpp: take care of the brace pair after comment environments that are...
[lyx.git] / src / tex2lyx / Context.cpp
index e2cc1b5e704e771a303428bb7679ef62e0dec8bd..1e05984bcfb7a4371ce1b8ee8517e0a35e23dea7 100644 (file)
@@ -24,7 +24,7 @@ namespace lyx {
 
 namespace {
 
-void begin_layout(ostream & os, LayoutPtr const & layout, TeXFont const & font,
+void begin_layout(ostream & os, Layout const * const & layout, TeXFont const & font,
                  TeXFont const & normalfont)
 {
        os << "\n\\begin_layout " << to_utf8(layout->name()) << "\n";
@@ -83,8 +83,8 @@ bool Context::empty = true;
 
 
 Context::Context(bool need_layout_,
-                TextClass const & textclass_,
-                LayoutPtr layout_, LayoutPtr parent_layout_,
+                TeX2LyXDocClass const & textclass_,
+                Layout const * layout_, Layout const * parent_layout_,
                 TeXFont font_)
        : need_layout(need_layout_),
          need_end_layout(false), need_end_deeper(false),
@@ -93,10 +93,10 @@ Context::Context(bool need_layout_,
          layout(layout_), parent_layout(parent_layout_),
          font(font_)
 {
-       if (!layout.get())
-               layout = textclass.defaultLayout();
-       if (!parent_layout.get())
-               parent_layout = textclass.defaultLayout();
+       if (!layout)
+               layout = &textclass.defaultLayout();
+       if (!parent_layout)
+               parent_layout = &textclass.defaultLayout();
 }
 
 
@@ -132,7 +132,7 @@ void Context::check_layout(ostream & os)
                                // that this may require a begin_deeper.
                                if (!deeper_paragraph)
                                        begin_deeper(os);
-                               begin_layout(os, textclass.defaultLayout(),
+                               begin_layout(os, &textclass.defaultLayout(),
                                             font, normalfont);
                                deeper_paragraph = true;
                        }