The attached patch fixes bug 2492 and also sets now the correct width for all box sizes. To test
that it now works correct, see the testcase attached to
http://bugzilla.lyx.org/show_bug.cgi?id=2492
Jürgen, also OK for branch?
regards Uwe
Index: InsetBox.cpp
===================================================================
--- InsetBox.cpp (revision 22534)
+++ InsetBox.cpp (working copy)
@@ -254,8 +254,8 @@
string width_string = params_.width.asLatexString();
bool stdwidth(false);
if (params_.inner_box &&
- (width_string.find("1.0\\columnwidth") != string::npos
- || width_string.find("1.0\\textwidth") != string::npos)) {
+ (width_string.find("1\\columnwidth") != string::npos
+ || width_string.find("1\\textwidth") != string::npos)) {
stdwidth = true;
switch (btype) {
case Frameless:
@@ -272,11 +272,10 @@
width_string += " - 2\\fboxsep - 1.6pt";
break;
case Shadowbox:
- // Shadow falls outside right margin... opinions?
- width_string += " - 2\\fboxsep - 2\\fboxrule"/* "-\\shadowsize"*/;
+ width_string += " - 2\\fboxsep - 2\\fboxrule - \\shadowsize";
break;
case Doublebox:
- width_string += " - 2\\fboxsep - 7.5\\fboxrule - 1.0pt";
+ width_string += " - 2\\fboxsep - 7.5\\fboxrule - 1pt";
break;
}
}
@@ -402,9 +401,8 @@
// already done
break;
}
- os << "%\n";
- i += 3;
+ i += 2;
return i;
}