From e870d996efb4a856f667c601032e02e5b21c5b82 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 16 Apr 2023 21:05:27 +0200 Subject: use more string_view Change-Id: If4523dc2c89d1fb1c5e11665ee60044834fcecd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150458 Tested-by: Jenkins Reviewed-by: Noel Grandin --- test/source/a11y/AccessibilityTools.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/source/a11y') diff --git a/test/source/a11y/AccessibilityTools.cxx b/test/source/a11y/AccessibilityTools.cxx index 15a7cec17bc3..33270505f3a6 100644 --- a/test/source/a11y/AccessibilityTools.cxx +++ b/test/source/a11y/AccessibilityTools.cxx @@ -34,6 +34,7 @@ #include #include #include +#include using namespace css; @@ -165,9 +166,9 @@ bool AccessibilityTools::nameEquals(const uno::ReferencegetAccessibleName(); - OUString rest; + std::u16string_view rest; - if (!ctxName.startsWith(name, &rest)) + if (!o3tl::starts_with(ctxName, name, &rest)) return false; if (rest == u"") return true; @@ -193,7 +194,9 @@ bool AccessibilityTools::nameEquals(const uno::ReferenceGetWindow()->GetType(); - if (rest == u" (Type = " + OUString::number(static_cast(windowType)) + ")") + if (rest + == Concat2View(u" (Type = " + OUString::number(static_cast(windowType)) + + ")")) return true; } #endif -- cgit