]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Color.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / Color.C
index a34806b3607b1cc557d43bcca92eb19f912a7fdd..fdb6ed963b7d84066bd8fc99e1970dd034695f8c 100644 (file)
@@ -5,21 +5,22 @@
  *
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-
 #include "Color.h"
-#include <algorithm> // max
-#include <cmath> // floor
-#include <iomanip>
+
 #include "lyx_forms.h"
-#include "Lsstream.h"
-#include "support/LAssert.h"
 
-namespace support = lyx::support;
+#include "LColor.h"
+
+#include "support/std_sstream.h"
+
+#include <cmath>
+#include <iomanip>
+
 
 #ifndef CXX_GLOBAL_CSTD
 using std::floor;
@@ -27,6 +28,11 @@ using std::floor;
 
 using std::max;
 using std::min;
+using std::setw;
+
+using std::istringstream;
+using std::ostringstream;
+using std::string;
 
 
 namespace {
@@ -45,7 +51,7 @@ int hexstrToInt(string const & str)
 
 
 
-bool getRGBColor(LColor::color col,
+bool getRGBColor(LColor_color col,
                 unsigned int & r, unsigned int & g, unsigned int & b)
 {
        string const name = lcolor.getX11Name(col);
@@ -76,14 +82,14 @@ string const X11hexname(RGBColor const & col)
             << setw(2) << col.g
             << setw(2) << col.b;
 
-       return STRCONV(ostr.str());
+       return ostr.str();
 }
 
 
 RGBColor::RGBColor(string const & x11hexname)
-       : r(0), g(0), b(0) 
+       : r(0), g(0), b(0)
 {
-       support::Assert(x11hexname.size() == 7 && x11hexname[0] == '#');
+       BOOST_ASSERT(x11hexname.size() == 7 && x11hexname[0] == '#');
        r = hexstrToInt(x11hexname.substr(1,2));
        g = hexstrToInt(x11hexname.substr(3,2));
        b = hexstrToInt(x11hexname.substr(5,2));