From: Uwe Stöhr Date: Wed, 26 Oct 2011 04:14:45 +0000 (+0000) Subject: tex2lyx/text.cpp: code simplification X-Git-Tag: 2.1.0beta1~2480 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f68b287be67cc66dc57e91ab15f5afd9e26fd57b;p=features.git tex2lyx/text.cpp: code simplification git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40004 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index aed44d71d4..8a9951d3c7 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -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(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(is_starred) << "\nsideways true" << "\nstatus open\n\n";