-/*
+/**
* \file frnt_lang.C
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
#include "frnt_lang.h"
#include "gettext.h"
#include "language.h"
-#include <iostream>
+
#include <algorithm>
+
+using std::string;
using std::vector;
+
+namespace lyx {
+namespace frontend {
+
namespace {
-struct Sorter {
- bool operator()(frnt::LanguagePair const & lhs,
- frnt::LanguagePair const & rhs) const
- {
- return lhs.first < rhs.first;
- }
+class Sorter
+ : public std::binary_function<LanguagePair,
+ LanguagePair, bool>
+{
+public:
+ bool operator()(LanguagePair const & lhs,
+ LanguagePair const & rhs) const {
+ return lhs.first < rhs.first;
+ }
};
} // namespace anon
-namespace frnt {
vector<LanguagePair> const getLanguageData(bool character_dlg)
{
vector<LanguagePair> langs(size);
if (character_dlg) {
- langs[0].first = _("No change"); langs[0].second = "ignore";
- langs[1].first = _("Reset"); langs[1].second = "reset";
+ langs[0].first = _("No change");
+ langs[0].second = "ignore";
+ langs[1].first = _("Reset");
+ langs[1].second = "reset";
}
vector<string>::size_type i = character_dlg ? 2 : 0;
return langs;
}
-} // namespace frnt
+} // namespace frontend
+} // namespace lyx