]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/ColorHandler.C
Tiny clean-ups.
[lyx.git] / src / frontends / xforms / ColorHandler.C
index 4b9c26e0497d0556d0aeea96f5fab6e73e22dc26..ac4da0db5043977d62b2419636bd9f6653de9298 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "debug.h"
 #include "gettext.h"
+#include "LColor.h"
 
 #include "support/lstrings.h"
 #include "support/tostr.h"
 
 #include <cmath>
 
-using namespace lyx::support;
+using lyx::support::bformat;
 
 #ifndef CXX_GLOBAL_CSTD
 using std::pow;
 #endif
 
 using std::endl;
+using std::string;
 
 
 namespace {
@@ -54,7 +56,7 @@ LyXColorHandler::LyXColorHandler()
 
        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;
        }
 }
@@ -76,7 +78,7 @@ LyXColorHandler::~LyXColorHandler()
 }
 
 
-unsigned long LyXColorHandler::colorPixel(LColor::color c)
+unsigned long LyXColorHandler::colorPixel(LColor_color c)
 {
        XGCValues val;
        XGetGCValues(display, getGCForeground(c), GCForeground, &val);
@@ -162,7 +164,7 @@ GC LyXColorHandler::getGCForeground(string const & s)
 
 // Gets GC according to color
 // Uses caching
-GC LyXColorHandler::getGCForeground(LColor::color c)
+GC LyXColorHandler::getGCForeground(LColor_color c)
 {
        if (static_cast<unsigned>(c) >= colorGCcache.size()) {
                colorGCcache.resize(c + 1, 0);
@@ -187,7 +189,7 @@ GC LyXColorHandler::getGCForeground(LColor::color c)
 
 // Gets GC for line
 GC LyXColorHandler::getGCLinepars(Painter::line_style ls,
-                                 Painter::line_width lw, LColor::color c)
+                                 Painter::line_width lw, LColor_color c)
 {
        //if (lyxerr.debugging()) {
        //      lyxerr << "Painter drawable: " << drawable() << endl;
@@ -233,7 +235,7 @@ GC LyXColorHandler::getGCLinepars(Painter::line_style ls,
 
 
 // update GC cache after color redefinition
-void LyXColorHandler::updateColor (LColor::color c)
+void LyXColorHandler::updateColor (LColor_color c)
 {
        // color GC cache
        GC gc = colorGCcache[c];