]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetpagebreak.C
hopefully fix tex2lyx linking.
[lyx.git] / src / insets / insetpagebreak.C
index d86a826be59a97c10767a61a616c3f40cd30a650..aab1690483033d54b86591967989f4b1f55cfde6 100644 (file)
 #include "metricsinfo.h"
 #include "gettext.h"
 
+#include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
-#include "frontends/font_metrics.h"
+
+
+namespace lyx {
+
+using frontend::Painter;
 
 using std::endl;
 using std::ostream;
@@ -48,7 +53,7 @@ void InsetPagebreak::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetPagebreak::draw(PainterInfo & pi, int x, int y) const
 {
-       static std::string const label = _("Page Break");
+       static docstring const label = _("Page Break");
 
        LyXFont font;
        font.setColor(LColor::pagebreak);
@@ -57,7 +62,7 @@ void InsetPagebreak::draw(PainterInfo & pi, int x, int y) const
        int w = 0;
        int a = 0;
        int d = 0;
-       font_metrics::rectText(label, font, w, a, d);
+       theFontMetrics(font).rectText(label, w, a, d);
 
        int const text_start = int(x + (dim_.wid - w) / 2);
        int const text_end = text_start + w;
@@ -72,7 +77,7 @@ void InsetPagebreak::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-int InsetPagebreak::latex(Buffer const &, ostream & os,
+int InsetPagebreak::latex(Buffer const &, odocstream & os,
                          OutputParams const &) const
 {
        os << "\\newpage{}";
@@ -80,7 +85,7 @@ int InsetPagebreak::latex(Buffer const &, ostream & os,
 }
 
 
-int InsetPagebreak::plaintext(Buffer const &, ostream & os,
+int InsetPagebreak::plaintext(Buffer const &, odocstream & os,
                          OutputParams const &) const
 {
        os << '\n';
@@ -88,17 +93,12 @@ int InsetPagebreak::plaintext(Buffer const &, ostream & os,
 }
 
 
-int InsetPagebreak::linuxdoc(Buffer const &, std::ostream & os,
-                            OutputParams const &) const
+int InsetPagebreak::docbook(Buffer const &, odocstream & os,
+                           OutputParams const &) const
 {
        os << '\n';
        return 0;
 }
 
 
-int InsetPagebreak::docbook(Buffer const &, std::ostream & os,
-                           OutputParams const &) const
-{
-       os << '\n';
-       return 0;
-}
+} // namespace lyx