]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBox.cpp
Better TOC output for XHTML, per Rob and Pavel.
[lyx.git] / src / insets / InsetBox.cpp
index b6d574e4c229c4f1043be37419c5360ff40c771e..ec113744964695eaa25f40d5ad45a07e40c795cf 100644 (file)
@@ -105,10 +105,7 @@ InsetBox::InsetBox(Buffer * buffer, string const & label)
 docstring InsetBox::layoutName() const
 {
        // FIXME: UNICODE
-       string name = "Box";
-       if (boxtranslator().find(params_.type) == Shaded)
-               name += ":Shaded";
-       return from_ascii(name);
+       return from_ascii("Box:" + params_.type);
 }
 
 
@@ -481,8 +478,11 @@ docstring InsetBox::xhtml(XHTMLStream & xs, OutputParams const & runparams) cons
        // construct attributes
        string attrs = "class='" + params_.type + "'";
        string style;
-       if (!params_.width.empty())
-               style += ("width: " + params_.width.asHTMLString() + "; ");
+       if (!params_.width.empty()) {
+               string w = params_.width.asHTMLString();
+               if (w != "100%")
+                       style += ("width: " + params_.width.asHTMLString() + "; ");
+       }
        // The special heights don't really mean anything for us.
        if (!params_.height.empty() && params_.height_special == "none")
                style += ("height: " + params_.height.asHTMLString() + "; ");