mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
Fix up InsetVSpace a bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32136 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
344859e4df
commit
b3ad108bed
@ -27,6 +27,7 @@
|
||||
#include "Text.h"
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/docstream.h"
|
||||
#include "support/gettext.h"
|
||||
#include "support/lassert.h"
|
||||
|
||||
@ -234,17 +235,14 @@ int InsetVSpace::docbook(odocstream & os, OutputParams const &) const
|
||||
}
|
||||
|
||||
|
||||
docstring InsetVSpace::xhtml(XHTMLStream & xs, OutputParams const &) const
|
||||
docstring InsetVSpace::xhtml(XHTMLStream &, OutputParams const &) const
|
||||
{
|
||||
string len = space_.asHTMLLength();
|
||||
if (len.empty())
|
||||
// we didn't understand it
|
||||
xs << CompTag("br");
|
||||
else {
|
||||
string const attr = "style='height:" + len + "'";
|
||||
xs << StartTag("div", attr, true) << EndTag("div");
|
||||
}
|
||||
return docstring();
|
||||
odocstringstream ods;
|
||||
XHTMLStream xds(ods);
|
||||
string const len = space_.asHTMLLength();
|
||||
string const attr = "style='height:" + (len.empty() ? "1em" : len) + "'";
|
||||
xds << StartTag("div", attr, true) << EndTag("div");
|
||||
return dynamic_cast<odocstringstream &>(xds.os()).str();
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,7 +50,11 @@ private:
|
||||
int plaintext(odocstream &, OutputParams const &) const;
|
||||
///
|
||||
int docbook(odocstream &, OutputParams const &) const;
|
||||
///
|
||||
/// Note that this returns the inset rather than writing it,
|
||||
/// so it will actually be written after the present paragraph.
|
||||
/// The normal case is that this inset will be on a line by
|
||||
/// itself, and in that case the present paragraph will not,
|
||||
/// in fact, appear at all.
|
||||
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
||||
///
|
||||
void read(Lexer & lex);
|
||||
|
Loading…
Reference in New Issue
Block a user