From f68b287be67cc66dc57e91ab15f5afd9e26fd57b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Wed, 26 Oct 2011 04:14:45 +0000 Subject: [PATCH] tex2lyx/text.cpp: code simplification git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40004 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/text.cpp | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) 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"; -- 2.39.2