]> git.lyx.org Git - lyx.git/blobdiff - src/Color.cpp
fix "make check" with gcc 4.3
[lyx.git] / src / Color.cpp
index 7995eba38068ab6e079f170827765968ba5f0e14..79953e3339f78006ea986100873d31cd0b8704cc 100644 (file)
@@ -17,6 +17,7 @@
 #include <config.h>
 
 #include "Color.h"
+#include "ColorSet.h"
 
 #include "support/debug.h"
 #include "support/gettext.h"
@@ -84,6 +85,45 @@ RGBColor rgbFromHexName(string const & x11hexname)
 }
 
 
+Color::Color(ColorCode base_color) : baseColor(base_color), 
+       mergeColor(Color_ignore)
+{}
+
+
+bool Color::operator==(Color const & color) const
+{
+       return baseColor == color.baseColor;
+}
+
+
+bool Color::operator!=(Color const & color) const      
+{
+       return baseColor != color.baseColor;
+}
+
+
+bool Color::operator<(Color const & color) const
+{
+       return baseColor < color.baseColor;
+}
+
+
+bool Color::operator<=(Color const & color) const
+{
+       return baseColor <= color.baseColor;
+}
+
+
+std::ostream & operator<<(std::ostream & os, Color color)
+{
+       os << to_ascii(lcolor.getGUIName(color.baseColor));
+       if (color.mergeColor != Color_ignore)
+               os << "[merged with:"
+                       << to_ascii(lcolor.getGUIName(color.mergeColor)) << "]";
+       return os;
+}
+
+
 ColorSet::ColorSet()
 {
        char const * grey40 = "#666666";
@@ -164,6 +204,7 @@ ColorSet::ColorSet()
        { Color_changedtextauthor3, N_("changed text 3rd author"), "changedtextauthor3", "#ff0000", "changedtextauthor3" },
        { Color_changedtextauthor4, N_("changed text 4th author"), "changedtextauthor4", "#aa00ff", "changedtextauthor4" },
        { Color_changedtextauthor5, N_("changed text 5th author"), "changedtextauthor5", "#55aa00", "changedtextauthor5" },
+       { Color_deletedtextmodifier, N_("deleted text modifier"), "deletedtextmodifier", "white", "deletedtextmodifier" },
        { Color_added_space, N_("added space markers"), "added_space", "Brown", "added_space" },
        { Color_topline, N_("top/bottom line"), "topline", "Brown", "topline" },
        { Color_tabularline, N_("table line"), "tabularline", "black", "tabularline" },