backporting tex2lyx: some simplifications

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40032 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2011-10-27 12:43:07 +00:00
parent 7de601b63e
commit 8472702349

View File

@ -2482,14 +2482,9 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
} }
else if (t.cs() == "rule") { else if (t.cs() == "rule") {
string offset = ""; string const offset = (p.hasOpt() ? p.getArg('[', ']') : string());
string width; string const width = p.getArg('{', '}');
string thickness; string const thickness = p.getArg('{', '}');
if (p.hasOpt())
offset = p.getArg('[', ']');
width = p.getArg('{', '}');
thickness = p.getArg('{', '}');
context.check_layout(os); context.check_layout(os);
begin_command_inset(os, "line", "rule"); begin_command_inset(os, "line", "rule");
if (!offset.empty()) if (!offset.empty())