diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-10-16 15:06:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-17 07:28:49 +0200 |
commit | 8b4719c29fc9bd7e198ad6ced301e1ff7a350f16 (patch) | |
tree | d3ec594b343f56c76056418d835d3bc7b696a9ab /i18npool | |
parent | f51cd77bcecc5134e0e04c398bfb7b34eb65d68d (diff) |
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 <sbergman@redhat.com>
Diffstat (limited to 'i18npool')
3 files changed, 12 insertions, 12 deletions
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<repeat_count; i++ ) - s += OUStringLiteral1( table[ n%tableSize ] ); + s += OUStringChar( table[ n%tableSize ] ); } static @@ -389,9 +389,9 @@ void lcl_formatChars2( const sal_Unicode table_capital[], const sal_Unicode tabl if( n>=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<repeat_count; i++ ) - s += OUStringLiteral1( table_small[ n%tableSize ] ); + s += OUStringChar( table_small[ n%tableSize ] ); } diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx index 186f3a511f59..399b19b17382 100644 --- a/i18npool/source/indexentry/indexentrysupplier_default.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx @@ -205,10 +205,10 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm continue; } else if (keyStr[i] == '_') { for (curr=keyStr[i-1]+1; curr <= keyStr[i+1]; curr++) - skipping_chars+=OUStringLiteral1(curr); + skipping_chars+=OUStringChar(curr); i+=2; } else { - skipping_chars+=OUStringLiteral1(keyStr[i]); + skipping_chars+=OUStringChar(keyStr[i]); } } break; |