#include "metricsinfo.h"
#include "gettext.h"
+#include "frontends/FontMetrics.h"
#include "frontends/Painter.h"
-#include "frontends/font_metrics.h"
-using lyx::docstring;
-using lyx::frontend::Painter;
+
+namespace lyx {
+
+using frontend::Painter;
using std::endl;
using std::ostream;
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);
int w = 0;
int a = 0;
int d = 0;
- docstring dlab(label.begin(), label.end());
- font_metrics::rectText(dlab, 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;
- pi.pain.rectText(text_start, y + d, dlab, font,
+ pi.pain.rectText(text_start, y + d, label, font,
LColor::none, LColor::none);
pi.pain.line(x, y, text_start, y,
}
-int InsetPagebreak::latex(Buffer const &, ostream & os,
+int InsetPagebreak::latex(Buffer const &, odocstream & os,
OutputParams const &) const
{
os << "\\newpage{}";
}
-int InsetPagebreak::plaintext(Buffer const &, ostream & os,
+int InsetPagebreak::plaintext(Buffer const &, odocstream & os,
OutputParams const &) const
{
os << '\n';
}
-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