From 82b27577d20025bc8e9b68bfe365a860992be0cb Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 30 Aug 2016 15:28:17 +0200 Subject: loplugin:stringconstant: adapt to improved OUStringLiteral1 (i18npool) Change-Id: If4bc7dd5af49cca85f474e817cc3cc358c2b48c2 --- i18npool/qa/cppunit/test_breakiterator.cxx | 8 ++++---- .../defaultnumberingprovider/defaultnumberingprovider.cxx | 12 ++++++------ i18npool/source/indexentry/indexentrysupplier_default.cxx | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'i18npool') diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index 1c8b1f9a7ac5..58b6a98f0978 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -267,7 +267,7 @@ void TestBreakIterator::testWordBoundaries() if (aBreakTests[i] == 0x200B) continue; #endif - OUString aTest = "Word" + OUString(aBreakTests[i]) + "Word"; + OUString aTest = "Word" + OUStringLiteral1(aBreakTests[i]) + "Word"; aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true); switch (mode) { @@ -296,7 +296,7 @@ void TestBreakIterator::testWordBoundaries() //make sure that in all cases isBeginWord and isEndWord matches getWordBoundary for (size_t i = 0; i < SAL_N_ELEMENTS(aJoinTests); ++i) { - OUString aTest = "Word" + OUString(aJoinTests[i]) + "Word"; + OUString aTest = "Word" + OUStringLiteral1(aJoinTests[i]) + "Word"; aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true); switch (mode) { @@ -355,7 +355,7 @@ void TestBreakIterator::testWordBoundaries() const sal_Int32 aSinglePositions[] = {0, 1, 3, 4, 6, 7, 9, 10}; for (size_t j = 1; j < SAL_N_ELEMENTS(aTests); ++j) { - OUString aTest = aBase.replaceAll("xx", OUString(aTests[j])); + OUString aTest = aBase.replaceAll("xx", OUStringLiteral1(aTests[j])); sal_Int32 nPos = -1; size_t i = 0; do @@ -378,7 +378,7 @@ void TestBreakIterator::testWordBoundaries() const sal_Int32 aSingleQuotePositions[] = {0, 1, 9, 10}; CPPUNIT_ASSERT(aTests[0] == '\''); { - OUString aTest = aBase.replaceAll("xx", OUString(aTests[0])); + OUString aTest = aBase.replaceAll("xx", OUStringLiteral1(aTests[0])); sal_Int32 nPos = -1; size_t i = 0; do diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 61097457362b..fe5bf48a6a16 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -343,7 +343,7 @@ void lcl_formatChars( const sal_Unicode table[], int tableSize, int n, OUString& if( n>=tableSize ) lcl_formatChars( table, tableSize, (n-tableSize)/tableSize, s ); - s += OUString( table[ n % tableSize ] ); + s += OUStringLiteral1( table[ n % tableSize ] ); } static @@ -356,7 +356,7 @@ void lcl_formatChars1( const sal_Unicode table[], int tableSize, int n, OUString int repeat_count = n / tableSize + 1; for( int i=0; i=tableSize ) { lcl_formatChars2( table_capital, table_small, tableSize, (n-tableSize)/tableSize, s ); - s += OUString( table_small[ n % tableSize ] ); + s += OUStringLiteral1( table_small[ n % tableSize ] ); } else - s += OUString( table_capital[ n % tableSize ] ); + s += OUStringLiteral1( table_capital[ n % tableSize ] ); } static @@ -380,10 +380,10 @@ void lcl_formatChars3( const sal_Unicode table_capital[], const sal_Unicode tabl // if A=='A' then 0=>A, 1=>B, ..., 25=>Z, 26=>Aa, 27=>Bb, ... int repeat_count = n / tableSize + 1; - s += OUString( table_capital[ n%tableSize ] ); + s += OUStringLiteral1( table_capital[ n%tableSize ] ); for( int i=1; i