From 8f3ed4229422109816aacf8da752f09f7d4ef64a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Tue, 19 May 2015 23:25:36 +0200 Subject: [PATCH] tex2lyx/text.cpp: remove a now unnecessary hack \framebox{} is equal to \fbox{} and \makebox{} is equal to \mbox{} When I once wrote this code LyX did not support \fbbox and \mbox and therefore had to use a workaround. --- src/tex2lyx/test/box-color-size-space-align.tex | 2 ++ src/tex2lyx/text.cpp | 12 ------------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/tex2lyx/test/box-color-size-space-align.tex b/src/tex2lyx/test/box-color-size-space-align.tex index 3ced26fec0..eb7de94160 100644 --- a/src/tex2lyx/test/box-color-size-space-align.tex +++ b/src/tex2lyx/test/box-color-size-space-align.tex @@ -124,6 +124,8 @@ blabla \begin{framed}\begin{framed}nested framed\end{framed}\end{framed} blabla blabla \fbox{fbox} blabla +blabla \framebox{framebox} blabla + \fbox{\begin{minipage}[t]{0.9\columnwidth}% fbox around minipage% \end{minipage}} diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 32944aabde..120e48cb8b 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -1021,18 +1021,6 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags, } p.popPosition(); } - // if only \makebox{content} was used we can set its width to 1\width - // because this identic and also identic to \mbox - // this doesn't work for \framebox{content}, thus we have to use ERT for this - if (latex_width.empty() && inner_type == "makebox" && background_color.empty()) { - width_value = "1"; - width_unit = "in"; - width_special = "width"; - } else if (latex_width.empty() && outer_type == "framebox") { - width_value.clear(); - width_unit.clear(); - width_special = "none"; - } // try to determine the box content alignment // first handle the simple case of "{\centering..." -- 2.39.2