]> git.lyx.org Git - lyx.git/blobdiff - src/LColor.C
ws changes only
[lyx.git] / src / LColor.C
index 6d88e4e7fbc26f6a613c5eb708a22e661f864825..ba42c4b761f01f5481ba5cbff244a6c4df003351 100644 (file)
@@ -1,25 +1,32 @@
-/* This file is part of
- * ======================================================
+/**
+ * \file LColor.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
+ * \author Asger Alstrup
+ * \author Lars Gullik Bjønnes
+ * \author Matthias Ettrich
+ * \author Jean-Marc Lasgouttes
+ * \author John Levon
+ * \author André Pönitz
+ * \author Martin Vermeer
  *
- *         Copyright 1998-2001 The LyX Team
- *
- *======================================================*/
+ * Full author contact details are available in file CREDITS.
+ */
 
 #include <config.h>
 
 #include "debug.h"
-#include "LColor.h"
-#include "support/LAssert.h"
 #include "gettext.h"
+#include "LColor.h"
 #include "support/lstrings.h"
 
 #include <map>
 
-using namespace lyx::support;
+using lyx::support::compare_ascii_no_case;
 
 using std::endl;
+using std::string;
 
 
 namespace {
@@ -165,18 +172,18 @@ void LColor::operator=(LColor const & c)
 }
 
 
-void LColor::fill(LColor::color c, 
+void LColor::fill(LColor::color c,
                                string const & lyxname,
-                               string const & x11name, 
-                               string const & latexname, 
-                               string const & guiname) 
+                               string const & x11name,
+                               string const & latexname,
+                               string const & guiname)
 {
        ColorEntry ce;
        ce.lcolor = c;
-       ce.guiname = guiname.c_str();   
-       ce.latexname = latexname.c_str();       
-       ce.x11name = x11name.c_str();   
-       ce.lyxname = lyxname.c_str();   
+       ce.guiname = guiname.c_str();
+       ce.latexname = latexname.c_str();
+       ce.x11name = x11name.c_str();
+       ce.lyxname = lyxname.c_str();
        pimpl_->fill(ce);
 }
 
@@ -194,10 +201,10 @@ string const LColor::getGUIName(string const &  s) const
 {
        Pimpl::Transform::const_iterator ici = pimpl_->transform.find(s);
        if (ici != pimpl_->transform.end()) {
-               Pimpl::InfoTab::const_iterator 
+               Pimpl::InfoTab::const_iterator
                        it = pimpl_->infotab.find(ici->second);
-               if (it != pimpl_->infotab.end()) 
-                       return it->second.guiname;      
+               if (it != pimpl_->infotab.end())
+                       return it->second.guiname;
        }
        return "none";
 }
@@ -220,9 +227,9 @@ string const LColor::getX11Name(string const & s) const
 {
        Pimpl::Transform::const_iterator ici = pimpl_->transform.find(s);
        if (ici != pimpl_->transform.end()) {
-               Pimpl::InfoTab::const_iterator 
+               Pimpl::InfoTab::const_iterator
                        it = pimpl_->infotab.find(ici->second);
-               if (it != pimpl_->infotab.end()) 
+               if (it != pimpl_->infotab.end())
                        return it->second.x11name;
        }
        lyxerr << "LyX internal error: Missing color"
@@ -245,9 +252,9 @@ string const LColor::getLaTeXName(string const & s) const
 {
        Pimpl::Transform::const_iterator ici = pimpl_->transform.find(s);
        if (ici != pimpl_->transform.end()) {
-               Pimpl::InfoTab::const_iterator 
+               Pimpl::InfoTab::const_iterator
                        it = pimpl_->infotab.find(ici->second);
-               if (it != pimpl_->infotab.end()) 
+               if (it != pimpl_->infotab.end())
                        return it->second.latexname;
        }
        return "black";
@@ -277,7 +284,7 @@ void LColor::setColor(LColor::color col, string const & x11name)
                return;
        }
        lyxerr << "LyX internal error: color and such." << endl;
-       Assert(false);
+       BOOST_ASSERT(false);
 }