mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
fix color nastiness
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8501 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b634b3eb3b
commit
bed4cb9684
@ -1,3 +1,7 @@
|
||||
2004-03-16 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* LColor.C (getFromLyXName): make sure that the color name is used
|
||||
as lowercase.
|
||||
2004-03-17 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* lfuns.h:
|
||||
|
11
src/LColor.C
11
src/LColor.C
@ -24,6 +24,7 @@
|
||||
#include <map>
|
||||
|
||||
using lyx::support::compare_ascii_no_case;
|
||||
using lyx::support::ascii_lowercase;
|
||||
|
||||
using std::endl;
|
||||
using std::string;
|
||||
@ -249,10 +250,14 @@ void LColor::addColor(LColor::color c, string const & lyxname) const
|
||||
|
||||
LColor::color LColor::getFromLyXName(string const & lyxname) const
|
||||
{
|
||||
if (pimpl_->transform.find(lyxname) == pimpl_->transform.end())
|
||||
addColor(static_cast<color>(pimpl_->infotab.size()), lyxname);
|
||||
string const lcname = ascii_lowercase(lyxname);
|
||||
if (pimpl_->transform.find(lcname) == pimpl_->transform.end()) {
|
||||
lyxerr << "LColor::getFromLyXName: Unknown color \""
|
||||
<< lyxname << '"' << endl;
|
||||
addColor(static_cast<color>(pimpl_->infotab.size()), lcname);
|
||||
}
|
||||
|
||||
return static_cast<LColor::color>(pimpl_->transform[lyxname]);
|
||||
return static_cast<LColor::color>(pimpl_->transform[lcname]);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user