diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-01 20:34:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-03 09:12:32 +0200 |
commit | ddef1e2c017b7d8e421dedc1a0ce722ff4208985 (patch) | |
tree | 54e52c86e4e33bcb61eee44706117b1616e99624 /filter | |
parent | 0a6d946694e4fcb39228c5e1fec58fcfd8a45989 (diff) |
add o3tl::equalsAscii
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index b91ac31566af..44c4c9029641 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> +#include <o3tl/string_view.hxx> #include <tools/wldcrd.hxx> #include <sal/log.hxx> #include <framework/interaction.hxx> @@ -125,7 +126,7 @@ namespace { * In each category, rank them from strictly-structured to * loosely-structured. */ -int getFlatTypeRank(const OUString& rType) +int getFlatTypeRank(std::u16string_view rType) { // List formats from more complex to less complex. // TODO: Add more. @@ -287,7 +288,7 @@ int getFlatTypeRank(const OUString& rType) for (size_t i = 0; i < n; ++i) { - if (rType.equalsAscii(ranks[i])) + if (o3tl::equalsAscii(rType, ranks[i])) return n - i - 1; } |