X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsethfill.C;h=1f20b3deab603dd7bf1b3ff6a7ece1eb3e2135ba;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=0e43c963f4876a1c3058caacc1bd579dcbb7ea57;hpb=f17505a8fb8b26b1ece59f57aff2f84d90be6438;p=lyx.git diff --git a/src/insets/insethfill.C b/src/insets/insethfill.C index 0e43c963f4..1f20b3deab 100644 --- a/src/insets/insethfill.C +++ b/src/insets/insethfill.C @@ -11,9 +11,13 @@ #include #include "insethfill.h" +#include "gettext.h" #include "support/std_ostream.h" + +namespace lyx { + using std::ostream; @@ -22,36 +26,30 @@ InsetHFill::InsetHFill() {} -std::auto_ptr InsetHFill::clone() const +std::auto_ptr InsetHFill::doClone() const { return std::auto_ptr(new InsetHFill); } -void InsetHFill::metrics(MetricsInfo &, Dimension & dim) const +bool InsetHFill::metrics(MetricsInfo &, Dimension & dim) const { dim.wid = 3; dim.asc = 3; dim.des = 3; + bool const changed = dim_ != dim; dim_ = dim; + return changed; } -std::string const InsetHFill::getScreenLabel(Buffer const &) const -{ - return getContents(); -} - - -int InsetHFill::latex(Buffer const &, ostream & os, - OutputParams const &) const +docstring const InsetHFill::getScreenLabel(Buffer const &) const { - os << getCommand(); - return 0; + return _("Horizontal Fill"); } -int InsetHFill::plaintext(Buffer const &, ostream & os, +int InsetHFill::plaintext(Buffer const &, odocstream & os, OutputParams const &) const { os << '\t'; @@ -59,15 +57,7 @@ int InsetHFill::plaintext(Buffer const &, ostream & os, } -int InsetHFill::linuxdoc(Buffer const &, std::ostream & os, - OutputParams const &) const -{ - os << '\n'; - return 0; -} - - -int InsetHFill::docbook(Buffer const &, std::ostream & os, +int InsetHFill::docbook(Buffer const &, odocstream & os, OutputParams const &) const { os << '\n'; @@ -85,3 +75,6 @@ bool InsetHFill::isSpace() const { return true; } + + +} // namespace lyx