]> git.lyx.org Git - features.git/commitdiff
Fix bug #7947 by using InsetLayout rather than hardcoding things.
authorRichard Heck <rgheck@lyx.org>
Tue, 10 Jul 2012 21:17:45 +0000 (17:17 -0400)
committerRichard Heck <rgheck@lyx.org>
Fri, 8 Feb 2013 14:19:09 +0000 (09:19 -0500)
src/insets/InsetWrap.cpp

index 79dd8065bf25a305ff56a86925728ea6fbe7eae3..f15b0dd43c45d49e69b7e2a9a665d2a297c93233 100644 (file)
@@ -226,12 +226,13 @@ docstring InsetWrap::xhtml(XHTMLStream & xs, OutputParams const & rp) const
 {
        string const len = params_.width.asHTMLString();
        string const width = len.empty() ? "50%" : len;
-       string const attr = "class='wrap' style='width: " + width + ";'";
-       xs << html::StartTag("div", attr);
+       InsetLayout const & il = getLayout();
+       string const tag = il.htmltag();
+       string const attr = il.htmlattr() + " style='width:" + width + ";'";
+       xs << html::StartTag(tag, attr);
        docstring const deferred = 
                InsetText::insetAsXHTML(xs, rp, InsetText::WriteInnerTag);
-       if (!len.empty())
-               xs << html::EndTag("div");
+       xs << html::EndTag(tag);
        return deferred;
 }