#include <cmath>
-using lyx::support::bformat;
-
#ifndef CXX_GLOBAL_CSTD
using std::pow;
#endif
using std::endl;
using std::string;
+namespace lyx {
+namespace support {
namespace {
string tostr(XColor const & col)
{
return bformat("(%1$s,%2$s,%3$s)",
- ::tostr(col.red), ::tostr(col.green), ::tostr(col.blue));
+ ::tostr(col.red),
+ ::tostr(col.green),
+ ::tostr(col.blue));
}
-}
+} // namespace
+} // namespace support
+
+using support::bformat;
+using support::tostr;
+namespace frontend {
+
LyXColorHandler::LyXColorHandler()
: colorGCcache(LColor::ignore + 1)
{
colormap = fl_state[fl_get_vclass()].colormap;
// Clear the GC cache
- for (int i = 0; i < colorGCcache.size(); ++i) {
+ for (string::size_type i = 0; i < colorGCcache.size(); ++i) {
colorGCcache[i] = 0;
}
}
lyxerr << bformat(
_(" Using closest allocated color with (r,g,b)=%1$s instead.\n"
"Pixel [%2$s] is used."),
- tostr(cmap[closest_pixel]), tostr(closest_pixel)) << endl;
+ tostr(cmap[closest_pixel]), ::tostr(closest_pixel)) << endl;
val.foreground = cmap[closest_pixel].pixel;
}
//
boost::scoped_ptr<LyXColorHandler> lyxColorHandler;
+
+} // namespace frontend
+} // namespace lyx