diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-23 13:16:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-26 14:51:15 +0100 |
commit | a3d0091d185f39eddabf4d372ebe0ac3061dbb89 (patch) | |
tree | 4d70cedc274972ccc21b6b8e7105f042090cf5d6 /unotools/qa | |
parent | af791fb775e35c11ad01c42a7085dd121ab9c7a6 (diff) |
New loplugin:stringliteralvar
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for
details.
(Turned some affected variables in included files into inline variables, to
avoid GCC warnings about unused variables.)
Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unotools/qa')
-rw-r--r-- | unotools/qa/unit/testGetEnglishSearchName.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/unotools/qa/unit/testGetEnglishSearchName.cxx b/unotools/qa/unit/testGetEnglishSearchName.cxx index da59fc377f51..18bec28f7521 100644 --- a/unotools/qa/unit/testGetEnglishSearchName.cxx +++ b/unotools/qa/unit/testGetEnglishSearchName.cxx @@ -45,23 +45,24 @@ void Test::testSingleElement() //for Japanese fontname // IPAMincho - sal_Unicode const aIPAMincho[]=u"ipa\u660e\u671d"; + static OUStringLiteral const aIPAMincho=u"ipa\u660e\u671d"; OUString test_ja_JP1 = GetEnglishSearchFontName(aIPAMincho); CPPUNIT_ASSERT_EQUAL( OUString("ipamincho"),test_ja_JP1); // IPAGothic - sal_Unicode const aIPAGothic[]=u"ipa\u30b4\u30b7\u30c3\u30af"; + static OUStringLiteral const aIPAGothic=u"ipa\u30b4\u30b7\u30c3\u30af"; OUString test_ja_JP2 = GetEnglishSearchFontName(aIPAGothic); CPPUNIT_ASSERT_EQUAL( OUString("ipagothic"),test_ja_JP2); // HiraginoKakuGothic - sal_Unicode const aHiraginoKakuGothic[]=u"\u30D2\u30E9\u30AE\u30CE\u89D2\u30B4\u30B7\u30C3\u30AF"; + static OUStringLiteral const aHiraginoKakuGothic=u"\u30D2\u30E9\u30AE\u30CE\u89D2\u30B4\u30B7\u30C3\u30AF"; OUString test_ja_JP3 = GetEnglishSearchFontName(aHiraginoKakuGothic); CPPUNIT_ASSERT_EQUAL( OUString("hiraginosans"),test_ja_JP3); // HiraginoMincho Pro N - sal_Unicode const aHiraginoMinchoProN[]=u"\u30D2\u30E9\u30AE\u30CE\u660E\u671Dpron"; + static OUStringLiteral const aHiraginoMinchoProN=u"\u30D2\u30E9\u30AE\u30CE\u660E\u671Dpron"; OUString test_ja_JP4 = GetEnglishSearchFontName(aHiraginoMinchoProN); CPPUNIT_ASSERT_EQUAL( OUString("hiraginominchopron"),test_ja_JP4); // HiraginoMaruGothic Pro N - sal_Unicode const aHiraginoMaruGothicProN[]=u"\u30D2\u30E9\u30AE\u30CE\u4E38\u30B4pron"; + static OUStringLiteral const aHiraginoMaruGothicProN + =u"\u30D2\u30E9\u30AE\u30CE\u4E38\u30B4pron"; OUString test_ja_JP5 = GetEnglishSearchFontName(aHiraginoMaruGothicProN); CPPUNIT_ASSERT_EQUAL( OUString("hiraginomarugothicpron"),test_ja_JP5); } |