]> git.lyx.org Git - features.git/commitdiff
InsetBox.cpp: code simplification
authorUwe Stöhr <uwestoehr@lyx.org>
Fri, 15 May 2015 01:59:04 +0000 (03:59 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Fri, 15 May 2015 01:59:04 +0000 (03:59 +0200)
src/insets/InsetBox.cpp

index 5e8f8d3abc41ea00b0f1654131e5e1fbe5280cf2..cf3d791d4106e58795b6a56c95176dde87486d5d 100644 (file)
@@ -351,22 +351,19 @@ void InsetBox::latex(otexstream & os, OutputParams const & runparams) const
                if (!(separation_string.find(defaultSep) != string::npos)
                        && (thickness_string.find(defaultThick) != string::npos))
                        os << "{\\fboxsep " << from_ascii(separation_string);
-               if (!width_string.empty()) {
-                       if (!params_.inner_box) {
-                               os << "\\framebox";
-                               // Special widths, see usrguide sec. 3.5
-                               // FIXME UNICODE
-                               if (params_.special != "none") {
-                                       os << "[" << params_.width.value()
-                                          << '\\' << from_utf8(params_.special)
-                                          << ']';
-                               } else
-                                       os << '[' << from_ascii(width_string)
-                                          << ']';
-                               if (params_.hor_pos != 'c')
-                                       os << "[" << params_.hor_pos << "]";
+               if (!params_.inner_box && !width_string.empty()) {
+                       os << "\\framebox";
+                       // Special widths, see usrguide sec. 3.5
+                       // FIXME UNICODE
+                       if (params_.special != "none") {
+                               os << "[" << params_.width.value()
+                                  << '\\' << from_utf8(params_.special)
+                                  << ']';
                        } else
-                               os << "\\fbox";
+                               os << '[' << from_ascii(width_string)
+                                  << ']';
+                       if (params_.hor_pos != 'c')
+                               os << "[" << params_.hor_pos << "]";
                } else
                        os << "\\fbox";
                os << "{";