#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
#include "insetcaption.h"
#include "frontends/Painter.h"
#include "gettext.h"
#include "support/lstrings.h"
+#include "BoostFormat.h"
+
using std::ostream;
using std::endl;
void InsetCaption::draw(BufferView * bv, LyXFont const & f,
- int baseline, float & x, bool cleared) const
+ int baseline, float & x) const
{
// We must draw the label, we should get the label string
// from the enclosing float inset.
// Discover the number...
// ...
- string const num = "#";
+ string const num("#");
+#if USE_BOOST_FORMAT
// Generate the label
- string const label = _(fl) + " " + num + ":";
-
+ boost::format frm("%1$s %2$s:");
+ frm % _(fl) % num;
+ string const label = frm.str();
+#else
+ // Generate the label
+ string const label = _(fl) + ' ' + num + ':';
+#endif
Painter & pain = bv->painter();
int const w = font_metrics::width(label, f);
pain.text(int(x), baseline, label, f);
x += w;
- InsetText::draw(bv, f, baseline, x, cleared);
+ InsetText::draw(bv, f, baseline, x);
}