]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insethfill.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insethfill.C
index 07007bd038e57d0b9be656e43021315aaf9403b1..1f20b3deab603dd7bf1b3ff6a7ece1eb3e2135ba 100644 (file)
 
 #include <config.h>
 
-
 #include "insethfill.h"
-#include "support/LOstream.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<InsetBase> InsetHFill::doClone() const
 {
-       os << getCommand();
-       return 0;
+       return std::auto_ptr<InsetBase>(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