From 7b54689b0eba179e29ede8a7f0732fb4628dd031 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 4 Jun 2012 22:52:47 +0200 Subject: edtwin.cxx: try to shut up the tinderboxes Change-Id: I504d3b0ac6250b88ca3de3cad179a7caec35e2a5 --- sw/source/ui/docvw/edtwin.cxx | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'sw/source/ui/docvw/edtwin.cxx') diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 831ab46acae5..fffe6c3a7cba 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -5656,27 +5656,33 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord ) } } +namespace { + +struct CompareIgnoreCaseAscii +{ + bool operator()(const String& s1, const String& s2) const + { + return s1.CompareIgnoreCaseToAscii(s2) == COMPARE_LESS; + } +}; + +struct EqualIgnoreCaseAscii +{ + bool operator()(const String& s1, const String& s2) const + { + return s1.CompareIgnoreCaseToAscii(s2) == COMPARE_EQUAL; + } +}; + +} // anonymous namespace + // TODO - implement an i18n aware sort void QuickHelpData::SortAndFilter() { - struct CompareIgnoreCaseAscii - { - bool operator()(const String& s1, const String& s2) const - { - return s1.CompareIgnoreCaseToAscii(s2) == COMPARE_LESS; - } - }; std::sort( pHelpStrings->begin(), pHelpStrings->end(), CompareIgnoreCaseAscii() ); - struct EqualIgnoreCaseAscii - { - bool operator()(const String& s1, const String& s2) const - { - return s1.CompareIgnoreCaseToAscii(s2) == COMPARE_EQUAL; - } - }; std::vector::iterator it = std::unique( pHelpStrings->begin(), pHelpStrings->end(), EqualIgnoreCaseAscii() ); -- cgit