]> git.lyx.org Git - features.git/commitdiff
tex2lyx/text.cpp: set correct alignment for \makebox{test}
authorUwe Stöhr <uwestoehr@lyx.org>
Tue, 19 May 2015 01:25:55 +0000 (03:25 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Tue, 19 May 2015 01:25:55 +0000 (03:25 +0200)
also fix an indentation error

src/tex2lyx/text.cpp

index 56525742440d9c98ca6b3224a51e45e750c127f3..32944aabdec3784351ca2fb3fcbca0e4a6d2029f 100644 (file)
@@ -906,6 +906,8 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags,
                        inner_pos = "t";
                }
        }
+       if (inner_type == "makebox" && !p.hasOpt())
+               hor_pos = "c";
        if (!inner_type.empty() && p.hasOpt()) {
                if (inner_type != "makebox")
                        position = p.getArg('[', ']');
@@ -947,9 +949,9 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags,
                                }
                        }
                } else {
-                               if (inner_type == "makebox")
-                                       hor_pos = "c";
-                       }
+                       if (inner_type == "makebox")
+                               hor_pos = "c";
+               }
        }
        if (inner_type.empty()) {
                if (special.empty() && outer_type != "framebox")