From 8b4719c29fc9bd7e198ad6ced301e1ff7a350f16 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 16 Oct 2019 15:06:23 +0200 Subject: Rename OUStringLiteral1 to OUStringChar It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- 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 df51c575d06d..7daf9e98e573 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -280,7 +280,7 @@ void TestBreakIterator::testWordBoundaries() if (aBreakTests[i] == 0x200B) continue; #endif - OUString aTest = "Word" + OUStringLiteral1(aBreakTests[i]) + "Word"; + OUString aTest = "Word" + OUStringChar(aBreakTests[i]) + "Word"; aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true); switch (mode) { @@ -309,7 +309,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" + OUStringLiteral1(aJoinTests[i]) + "Word"; + OUString aTest = "Word" + OUStringChar(aJoinTests[i]) + "Word"; aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true); switch (mode) { @@ -370,7 +370,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", OUStringLiteral1(aTests[j])); + OUString aTest = aBase.replaceAll("xx", OUStringChar(aTests[j])); sal_Int32 nPos = -1; size_t i = 0; do @@ -395,7 +395,7 @@ void TestBreakIterator::testWordBoundaries() const sal_Int32 aSingleQuotePositions[] = {0, 1, 9, 10}; CPPUNIT_ASSERT_EQUAL(u'\'', aTests[0]); { - OUString aTest = aBase.replaceAll("xx", OUStringLiteral1(aTests[0])); + OUString aTest = aBase.replaceAll("xx", OUStringChar(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 0bc9b1870116..4a44dd841791 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -364,7 +364,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 += OUStringLiteral1( table[ n % tableSize ] ); + s += OUStringChar( table[ n % tableSize ] ); } static @@ -377,7 +377,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 += OUStringLiteral1( table_small[ n % tableSize ] ); + s += OUStringChar( table_small[ n % tableSize ] ); } else - s += OUStringLiteral1( table_capital[ n % tableSize ] ); + s += OUStringChar( table_capital[ n % tableSize ] ); } static @@ -401,10 +401,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 += OUStringLiteral1( table_capital[ n%tableSize ] ); + s += OUStringChar( table_capital[ n%tableSize ] ); for( int i=1; i