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 /svtools/source/uno/unoevent.cxx | |
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 'svtools/source/uno/unoevent.cxx')
-rw-r--r-- | svtools/source/uno/unoevent.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 3a0a9cad75ea..30f4cbecbdb9 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -21,6 +21,7 @@ #include <comphelper/propertyvalue.hxx> #include <cppuhelper/supportsservice.hxx> +#include <o3tl/string_view.hxx> #include <osl/diagnose.h> #include <sfx2/event.hxx> #include <svtools/unoevent.hxx> @@ -284,12 +285,12 @@ Sequence<OUString> SvBaseEventDescriptor::getSupportedServiceNames() return { sAPI_ServiceName }; } -SvMacroItemId SvBaseEventDescriptor::mapNameToEventID(const OUString& rName) const +SvMacroItemId SvBaseEventDescriptor::mapNameToEventID(std::u16string_view rName) const { // iterate over known event names for(sal_Int16 i = 0; i < mnMacroItems; i++) { - if( rName.equalsAscii(mpSupportedMacroItems[i].mpEventName)) + if( o3tl::equalsAscii(rName, mpSupportedMacroItems[i].mpEventName)) { return mpSupportedMacroItems[i].mnEvent; } @@ -299,7 +300,7 @@ SvMacroItemId SvBaseEventDescriptor::mapNameToEventID(const OUString& rName) con return SvMacroItemId::NONE; } -SvMacroItemId SvBaseEventDescriptor::getMacroID(const OUString& rName) const +SvMacroItemId SvBaseEventDescriptor::getMacroID(std::u16string_view rName) const { return mapNameToEventID(rName); } |