#include "support/lstrings.h"
#include "support/filetools.h"
-using lyx::support::compare;
-using lyx::support::LibFileSearch;
-using lyx::support::subst;
+#include <functional>
using std::string;
+namespace lyx {
+
+using support::compare;
+using support::LibFileSearch;
+using support::subst;
+
+namespace frontend {
ControlMath::ControlMath(Dialog & dialog)
: Dialog::Controller(dialog)
"angle", "top", "bot", "Vert", "neg",
"flat", "natural", "sharp", "surd", "triangle",
"diamondsuit", "heartsuit", "clubsuit", "spadesuit",
- "textrm Å", "textrm Ø", "mathcircumflex", "_",
+ "textrm \\AA", "textrm \\O", "mathcircumflex", "_",
"mathrm T",
"mathbb N", "mathbb Z", "mathbb Q",
"mathbb R", "mathbb C", "mathbb H",
}
-struct CompareKey {
+class CompareKey : public std::unary_function<XPMmap, bool> {
+public:
CompareKey(string const & name) : name_(name) {}
- bool operator()(XPMmap const & other) {
- return compare(other.key, name_.c_str()) == 0;
+ bool operator()(XPMmap const & other) const {
+ return other.key == name_;
}
private:
string const name_;
{ "nRightarrow", "nrightarrow2" },
{ "nVDash", "nvdash3" },
{ "nvDash", "nvdash2" },
- { "textrm_Å", "textrm_A" },
- { "textrm_Ø", "textrm_0" },
+ { "textrm \\AA", "textrm_AA"},
+ { "textrm \\O", "textrm_Oe"},
{ "vDash", "vdash2" }
};
{
XPMmap const * const begin = sorted_xpm_map;
XPMmap const * const end = begin + nr_sorted_xpm_map;
- BOOST_ASSERT(lyx::sorted(begin, end));
+ BOOST_ASSERT(sorted(begin, end));
XPMmap const * const it =
std::find_if(begin, end, CompareKey(name));
return LibFileSearch("images/math/", xpm_name, "xpm");
}
+
+} // namespace frontend
+} // namespace lyx