From 3457da6abe0fd03efd19442e9790fbd1aa04c160 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Aug 2020 10:55:58 +0200 Subject: loplugin:stringstatic also look for local statics Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin --- desktop/qa/desktop_lib/test_desktop_lib.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'desktop/qa') diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 68ce00bdfe84..8a1d1c927c20 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -2739,7 +2739,7 @@ void DesktopLOKTest::testComplexSelection() { // Start with a blank text file and add contents. LibLODocument_Impl* pDocument = loadDoc("blank_text.odt"); - static const OString aText("hello world"); + static const OStringLiteral aText("hello world"); // Certainly not complex. CPPUNIT_ASSERT_EQUAL(static_cast(LOK_SELTYPE_NONE), pDocument->pClass->getSelectionType(pDocument)); @@ -2764,7 +2764,7 @@ void DesktopLOKTest::testComplexSelection() // Export as plain text, we should get only the text part "hello". char* pText = pDocument->pClass->getTextSelection(pDocument, "text/plain;charset=utf-8", nullptr); CPPUNIT_ASSERT(pText != nullptr); - CPPUNIT_ASSERT_EQUAL(aText, OString(pText)); + CPPUNIT_ASSERT_EQUAL(OString(aText), OString(pText)); free(pText); // Export as rtf, we should also get the image. @@ -2821,7 +2821,7 @@ void DesktopLOKTest::testCalcSaveAs() void DesktopLOKTest::testSpellcheckerMultiView() { - static const OUString aLangISO("en-US"); + static const OUStringLiteral aLangISO("en-US"); SvtSysLocaleOptions aSysLocaleOptions; aSysLocaleOptions.SetLocaleConfigString(aLangISO); aSysLocaleOptions.SetUILocaleConfigString(aLangISO); -- cgit