mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +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 "LaTeXFeatures.h"
|
||||||
#include "Lexer.h"
|
#include "Lexer.h"
|
||||||
#include "MetricsInfo.h"
|
#include "MetricsInfo.h"
|
||||||
|
#include "output_xhtml.h"
|
||||||
#include "TextClass.h"
|
#include "TextClass.h"
|
||||||
|
|
||||||
#include "support/debug.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;
|
string style;
|
||||||
if (!params_.width.empty())
|
if (!params_.width.empty())
|
||||||
style += ("width: " + params_.width.asHTMLString() + ";");
|
style += ("width: " + params_.width.asHTMLString() + ";");
|
||||||
if (!params_.height.empty())
|
if (!params_.height.empty())
|
||||||
style += ("height: " + params_.height.asHTMLString() + ";");
|
style += ("height: " + params_.height.asHTMLString() + ";");
|
||||||
|
|
||||||
docstring retval = from_ascii("<div class='" + params_.type + "'");
|
|
||||||
if (!style.empty())
|
if (!style.empty())
|
||||||
retval += from_ascii(" style='" + style + "'");
|
attrs += " style='" + style + "'";
|
||||||
retval += ">\n";
|
|
||||||
odocstringstream os;
|
xs << StartTag("div", attrs);
|
||||||
docstring defer = InsetText::xhtml(os, runparams);
|
XHTMLOptions const opts = InsetText::WriteLabel | InsetText::WriteInnerTag;
|
||||||
retval += os.str();
|
docstring defer = InsetText::insetAsXHTML(xs, runparams, opts);
|
||||||
retval += "</div>\n";
|
xs << EndTag("div");
|
||||||
retval += defer + "\n";
|
xs << defer;
|
||||||
return retval;
|
return docstring();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ private:
|
|||||||
///
|
///
|
||||||
int docbook(odocstream &, OutputParams const &) const;
|
int docbook(odocstream &, OutputParams const &) const;
|
||||||
///
|
///
|
||||||
docstring xhtml(odocstream &, OutputParams const &) const;
|
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
||||||
///
|
///
|
||||||
void validate(LaTeXFeatures &) 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
|
} // namespace lyx
|
||||||
|
@ -222,6 +222,9 @@ private:
|
|||||||
mutable Text text_;
|
mutable Text text_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
InsetText::XHTMLOptions operator|(InsetText::XHTMLOptions a1, InsetText::XHTMLOptions a2);
|
||||||
|
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user