diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-18 09:52:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-18 10:04:10 +0100 |
commit | bdc9bdccb61130355784800f99b4fd726d6c424d (patch) | |
tree | f3160884d66d8528ac818638bd2007ae19c8edc9 /svtools/source/svrtf | |
parent | 70e22d4996e71e019f62743893f041797f050361 (diff) |
tdf#123485 Excel 2003 xml file with xls extension detected as HTML
regression from
commit 7ea01578eed8459678369d0256de016930b3af40
Date: Fri Oct 19 13:04:43 2018 +0200
loplugin:staticvar in soltools..svx
turns out using std::lower_bound as a binary search is rather painful.
Change-Id: Ide6f5cf4ff91a8832daa43a7fec2f5cfc97fc94a
Reviewed-on: https://gerrit.libreoffice.org/67951
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/svrtf')
-rw-r--r-- | svtools/source/svrtf/rtfkeywd.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx index 826a0f6e354e..34e7e5d49df3 100644 --- a/svtools/source/svrtf/rtfkeywd.cxx +++ b/svtools/source/svrtf/rtfkeywd.cxx @@ -1189,7 +1189,7 @@ int GetRTFToken( const OUString& rSearch ) return s.compareToIgnoreAsciiCaseAscii(lhs.sToken.data) > 0; }; auto findIt = std::lower_bound( std::begin(aRTFTokenTab), std::end(aRTFTokenTab), rSearch, findCompare); - if (findIt != std::end(aRTFTokenTab) && !findCompare(*findIt, rSearch)) + if (findIt != std::end(aRTFTokenTab) && rSearch.compareToIgnoreAsciiCaseAscii(findIt->sToken.data)==0) return findIt->nToken; return 0; |