mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Restore XHTML for InsetBox.
I guess that this should be "inline", that is, appear where it appears in the LyX file, as opposed to being deferred until after the current paragraph is output. But I'm not sure about this. If anyone has a view, let me know. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32215 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ae40a33202
commit
dc88d6ecd2
@ -24,6 +24,7 @@
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "output_xhtml.h"
|
||||
#include "TextClass.h"
|
||||
|
||||
#include "support/debug.h"
|
||||
@ -478,24 +479,24 @@ int InsetBox::docbook(odocstream & os, OutputParams const & runparams) const
|
||||
}
|
||||
|
||||
|
||||
docstring InsetBox::xhtml(odocstream &, OutputParams const & runparams) const
|
||||
docstring InsetBox::xhtml(XHTMLStream & xs, OutputParams const & runparams) const
|
||||
{
|
||||
// construct attributes
|
||||
string attrs = "class='" + params_.type + "'";
|
||||
string style;
|
||||
if (!params_.width.empty())
|
||||
style += ("width: " + params_.width.asHTMLString() + ";");
|
||||
if (!params_.height.empty())
|
||||
style += ("height: " + params_.height.asHTMLString() + ";");
|
||||
|
||||
docstring retval = from_ascii("<div class='" + params_.type + "'");
|
||||
if (!style.empty())
|
||||
retval += from_ascii(" style='" + style + "'");
|
||||
retval += ">\n";
|
||||
odocstringstream os;
|
||||
docstring defer = InsetText::xhtml(os, runparams);
|
||||
retval += os.str();
|
||||
retval += "</div>\n";
|
||||
retval += defer + "\n";
|
||||
return retval;
|
||||
attrs += " style='" + style + "'";
|
||||
|
||||
xs << StartTag("div", attrs);
|
||||
XHTMLOptions const opts = InsetText::WriteLabel | InsetText::WriteInnerTag;
|
||||
docstring defer = InsetText::insetAsXHTML(xs, runparams, opts);
|
||||
xs << EndTag("div");
|
||||
xs << defer;
|
||||
return docstring();
|
||||
}
|
||||
|
||||
|
||||
|
@ -117,7 +117,7 @@ private:
|
||||
///
|
||||
int docbook(odocstream &, OutputParams const &) const;
|
||||
///
|
||||
docstring xhtml(odocstream &, OutputParams const &) const;
|
||||
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
||||
///
|
||||
void validate(LaTeXFeatures &) const;
|
||||
///
|
||||
|
@ -889,4 +889,9 @@ docstring InsetText::getCaptionHTML(OutputParams const & runparams) const
|
||||
}
|
||||
|
||||
|
||||
InsetText::XHTMLOptions operator|(InsetText::XHTMLOptions a1, InsetText::XHTMLOptions a2)
|
||||
{
|
||||
return static_cast<InsetText::XHTMLOptions>((int)a1 | (int)a2);
|
||||
}
|
||||
|
||||
} // namespace lyx
|
||||
|
@ -222,6 +222,9 @@ private:
|
||||
mutable Text text_;
|
||||
};
|
||||
|
||||
|
||||
InsetText::XHTMLOptions operator|(InsetText::XHTMLOptions a1, InsetText::XHTMLOptions a2);
|
||||
|
||||
} // namespace lyx
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user