]> git.lyx.org Git - features.git/commitdiff
tex2lyx/text.cpp: code simplification
authorUwe Stöhr <uwestoehr@web.de>
Wed, 26 Oct 2011 04:14:45 +0000 (04:14 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 26 Oct 2011 04:14:45 +0000 (04:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40004 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/text.cpp

index aed44d71d47271e12eeeeec4db7796d685337315..8a9951d3c713acad8f59ff05cb7c5987de10deee 100644 (file)
@@ -1075,25 +1075,14 @@ void parse_environment(Parser & p, ostream & os, bool outer,
                p.skip_spaces();
        }
 
-       else if (unstarred_name == "sidewaystable") {
+       else if (unstarred_name == "sidewaysfigure"
+               || unstarred_name == "sidewaystable") {
                eat_whitespace(p, os, parent_context, false);
                parent_context.check_layout(os);
-               begin_inset(os, "Float table\n");
-               os << "wide " << convert<string>(is_starred)
-                  << "\nsideways true"
-                  << "\nstatus open\n\n";
-               parse_text_in_inset(p, os, FLAG_END, outer, parent_context);
-               end_inset(os);
-               // We don't need really a new paragraph, but
-               // we must make sure that the next item gets a \begin_layout.
-               parent_context.new_paragraph(os);
-               p.skip_spaces();
-       }
-
-       else if (unstarred_name == "sidewaysfigure") {
-               eat_whitespace(p, os, parent_context, false);
-               parent_context.check_layout(os);
-               begin_inset(os, "Float figure\n");
+               if (unstarred_name == "sidewaysfigure")
+                       begin_inset(os, "Float figure\n");
+               else
+                       begin_inset(os, "Float table\n");
                os << "wide " << convert<string>(is_starred)
                   << "\nsideways true"
                   << "\nstatus open\n\n";