Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: testtools

Change-Id: Idc0de002b7ca4e370add311f91576adaaf354764
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158243
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2023-10-20 16:13:38 +02:00
parent 99ac24b387
commit e7cf25437e
3 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -67,10 +67,10 @@ using namespace com::sun::star::bridge;
using namespace test::testtools::bridgetest;
constexpr OUStringLiteral SERVICENAME = u"com.sun.star.test.bridge.BridgeTest";
constexpr OUStringLiteral IMPLNAME = u"com.sun.star.comp.bridge.BridgeTest";
constexpr OUString SERVICENAME = u"com.sun.star.test.bridge.BridgeTest"_ustr;
constexpr OUString IMPLNAME = u"com.sun.star.comp.bridge.BridgeTest"_ustr;
constexpr OUStringLiteral STRING_TEST_CONSTANT = u"\" paco\' chorizo\\\' \"\'";
constexpr OUString STRING_TEST_CONSTANT = u"\" paco\' chorizo\\\' \"\'"_ustr;
namespace bridge_test
{
+2 -2
View File
@@ -61,8 +61,8 @@ using namespace test::testtools::bridgetest;
#pragma warning (disable : 4503) // irrelevant for test code
#endif
constexpr OUStringLiteral SERVICENAME = u"com.sun.star.test.bridge.CppTestObject";
constexpr OUStringLiteral IMPLNAME = u"com.sun.star.comp.bridge.CppTestObject";
constexpr OUString SERVICENAME = u"com.sun.star.test.bridge.CppTestObject"_ustr;
constexpr OUString IMPLNAME = u"com.sun.star.comp.bridge.CppTestObject"_ustr;
namespace bridge_object
{
@@ -36,8 +36,8 @@
namespace {
constexpr OUStringLiteral KEY = u"testtools.bridgetest.Key";
constexpr OUStringLiteral VALUE = u"good";
constexpr OUString KEY = u"testtools.bridgetest.Key"_ustr;
constexpr OUString VALUE = u"good"_ustr;
class CurrentContext:
public ::osl::DebugBase< CurrentContext >,
@@ -56,7 +56,7 @@ CurrentContext::CurrentContext() {}
css::uno::Any CurrentContext::getValueByName(OUString const & Name)
{
return Name == KEY ? css::uno::Any(OUString(VALUE)) : css::uno::Any();
return Name == KEY ? css::uno::Any(VALUE) : css::uno::Any();
}
}