X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsethfill.C;h=1f20b3deab603dd7bf1b3ff6a7ece1eb3e2135ba;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=3af0c0fdd40a1c1ae4dfdee4b9966b764b3d501c;hpb=c5c7a9e56854dea886977f8e11cbfe31d8a7464f;p=lyx.git diff --git a/src/insets/insethfill.C b/src/insets/insethfill.C index 3af0c0fdd4..1f20b3deab 100644 --- a/src/insets/insethfill.C +++ b/src/insets/insethfill.C @@ -11,44 +11,70 @@ #include #include "insethfill.h" +#include "gettext.h" + +#include "support/std_ostream.h" + + +namespace lyx { using std::ostream; InsetHFill::InsetHFill() - : InsetCommand(InsetCommandParams("hfill")) + : InsetCommand(InsetCommandParams("hfill"), std::string()) {} -int InsetHFill::latex(Buffer const &, ostream & os, - LatexRunParams const &) const +std::auto_ptr InsetHFill::doClone() const { - os << getCommand(); - return 0; + return std::auto_ptr(new InsetHFill); } -int InsetHFill::ascii(Buffer const &, ostream & os, int) const +bool InsetHFill::metrics(MetricsInfo &, Dimension & dim) const { - os << '\t'; - return 0; + dim.wid = 3; + dim.asc = 3; + dim.des = 3; + bool const changed = dim_ != dim; + dim_ = dim; + return changed; } -int InsetHFill::linuxdoc(Buffer const &, std::ostream & os) const +docstring const InsetHFill::getScreenLabel(Buffer const &) const { - os << '\n'; + return _("Horizontal Fill"); +} + + +int InsetHFill::plaintext(Buffer const &, odocstream & os, + OutputParams const &) const +{ + os << '\t'; return 0; } -int InsetHFill::docbook(Buffer const &, std::ostream & os, bool) const +int InsetHFill::docbook(Buffer const &, odocstream & os, + OutputParams const &) const { os << '\n'; return 0; } + void InsetHFill::write(Buffer const &, ostream & os) const { - os << "\n\\hfill \n"; + os << "\n\\hfill\n"; } + + +bool InsetHFill::isSpace() const +{ + return true; +} + + +} // namespace lyx