X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetWrap.cpp;h=181474a889feb3f7ed5e49795f9005805f7123bb;hb=9b530e59c2b74828f3a68f3bb7ee3dee0365cdc0;hp=02a2ccdff85b3f60e1a4a9d1202a91aa8fc9f75f;hpb=3f27f951cbc2521edfbf78792839d61306bdb978;p=lyx.git diff --git a/src/insets/InsetWrap.cpp b/src/insets/InsetWrap.cpp index 02a2ccdff8..181474a889 100644 --- a/src/insets/InsetWrap.cpp +++ b/src/insets/InsetWrap.cpp @@ -35,6 +35,8 @@ #include "frontends/Application.h" +#include + using namespace std; @@ -201,11 +203,12 @@ void InsetWrap::latex(otexstream & os, OutputParams const & runparams_in) const } -int InsetWrap::plaintext(odocstream & os, OutputParams const & runparams) const +int InsetWrap::plaintext(odocstringstream & os, + OutputParams const & runparams, size_t max_length) const { os << '[' << buffer().B_("wrap") << ' ' << floatName(params_.type) << ":\n"; - InsetText::plaintext(os, runparams); + InsetText::plaintext(os, runparams, max_length); os << "\n]"; return PLAINTEXT_NEWLINE + 1; // one char on a separate line @@ -226,12 +229,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: " + len + ";'"; - 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; }