]> git.lyx.org Git - features.git/commitdiff
Make index comparisons for XHTML output case insensitive.
authorRichard Heck <rgheck@lyx.org>
Tue, 3 Apr 2012 21:54:50 +0000 (17:54 -0400)
committerRichard Heck <rgheck@lyx.org>
Tue, 3 Apr 2012 21:57:01 +0000 (17:57 -0400)
src/insets/InsetIndex.cpp
status.20x

index 0bab8008bdf9b61f84d40f894cce5a2d204b2c84..a9e27254cae3a79690efe13f4f4b3b65205e31ff 100644 (file)
@@ -662,9 +662,12 @@ struct IndexEntry
 
 bool operator<(IndexEntry const & lhs, IndexEntry const & rhs)
 {
-       return lhs.main < rhs.main
-                       || (lhs.main == rhs.main && lhs.sub < rhs.sub)
-                       || (lhs.main == rhs.main && lhs.sub == rhs.sub && lhs.subsub < rhs.subsub);
+       int comp = compare_no_case(lhs.main, rhs.main);
+       if (comp == 0)
+               comp = compare_no_case(lhs.sub, rhs.sub);
+       if (comp == 0)
+               comp = compare_no_case(lhs.subsub, rhs.subsub);
+       return (comp < 0);
 }
 
 } // anon namespace
index ed612afbc5fd3900866cbda532936af2f5c6932a..d31a20dc66e6c2b6e87bb64925a5c387874f8dd0 100644 (file)
@@ -78,6 +78,8 @@ What's new
 - Fix reconfiguration on Windows when the user directory is a UNC path
   (bug 8098).
 
+- Index entries in XHTML output no longer sorted case sensitively.
+
 
 * USER INTERFACE