From 76cefef3804b7154ae3dc51f65e3ad9e58f3bc68 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 5 Jul 2007 10:40:00 +0000 Subject: [PATCH] Patch from Pavel Sanda * frontend_helpers.cpp (Sorter): use the current locale for sorting (bug 2739) * frontend_helpers.cpp: cleanup headers. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18988 a592a061-630c-0410-9148-cb99ea01b6c8 --- .../controllers/frontend_helpers.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/frontends/controllers/frontend_helpers.cpp b/src/frontends/controllers/frontend_helpers.cpp index bf0df1d933..3e1918b3c2 100644 --- a/src/frontends/controllers/frontend_helpers.cpp +++ b/src/frontends/controllers/frontend_helpers.cpp @@ -15,20 +15,15 @@ #include "Buffer.h" #include "BufferParams.h" +#include "Color.h" #include "debug.h" #include "gettext.h" #include "Language.h" #include "Length.h" -#include - -#include -#include - -#include "Color.h" - #include "frontends/FileDialog.h" #include "frontends/alert.h" + #include "support/filetools.h" #include "support/lstrings.h" #include "support/Package.h" @@ -41,7 +36,12 @@ #include "support/Systemcall.h" #include +#include + +#include #include +#include + using std::string; using std::vector; using std::pair; @@ -1108,10 +1108,13 @@ class Sorter LanguagePair, bool> { public: + Sorter() : loc_("") {}; bool operator()(LanguagePair const & lhs, LanguagePair const & rhs) const { - return lhs.first < rhs.first; + return loc_(lhs.first, rhs.first); } +private: + std::locale loc_; }; } // namespace anon -- 2.39.2