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 /svl | |
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 'svl')
-rw-r--r-- | svl/qa/unit/svl.cxx | 8 | ||||
-rw-r--r-- | svl/qa/unit/test_lngmisc.cxx | 2 | ||||
-rw-r--r-- | svl/source/misc/lngmisc.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 38 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 4 |
6 files changed, 29 insertions, 29 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index d61daae8dd30..e36136e61896 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -1400,10 +1400,10 @@ void Test::testUserDefinedNumberFormats() { // tdf#79399 tdf#101462 Native Number Formats sCode = "[NatNum5][$-0404]General\\ "; // Chinese upper case number characters for 120 - sExpected = OUStringLiteral1(22777) + - OUStringLiteral1(20336) + - OUStringLiteral1(36019) + - OUStringLiteral1(25342) + + sExpected = OUStringChar(22777) + + OUStringChar(20336) + + OUStringChar(36019) + + OUStringChar(25342) + " "; checkPreviewString(aFormatter, sCode, 120, eLang, sExpected); sCode = "[DBNum2][$-0404]General\\ "; diff --git a/svl/qa/unit/test_lngmisc.cxx b/svl/qa/unit/test_lngmisc.cxx index 748b61e2b57e..f3071111b189 100644 --- a/svl/qa/unit/test_lngmisc.cxx +++ b/svl/qa/unit/test_lngmisc.cxx @@ -42,7 +42,7 @@ namespace OUString str1(""); OUString str2("a-b--c---"); - OUString str3 = OUStringLiteral1(SVT_SOFT_HYPHEN) + OUStringLiteral1(SVT_HARD_HYPHEN) + OUStringLiteral1(SVT_HARD_HYPHEN); + OUString str3 = OUStringChar(SVT_SOFT_HYPHEN) + OUStringChar(SVT_HARD_HYPHEN) + OUStringChar(SVT_HARD_HYPHEN); OUString str4("asdf"); diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx index 1c7928fc6ba9..a5d38b1a21c6 100644 --- a/svl/source/misc/lngmisc.cxx +++ b/svl/source/misc/lngmisc.cxx @@ -38,8 +38,8 @@ namespace linguistic bool RemoveHyphens(OUString &rTxt) { sal_Int32 n = rTxt.getLength(); - rTxt = rTxt.replaceAll(OUStringLiteral1(SVT_SOFT_HYPHEN), ""); - rTxt = rTxt.replaceAll(OUStringLiteral1(SVT_HARD_HYPHEN), ""); + rTxt = rTxt.replaceAll(OUStringChar(SVT_SOFT_HYPHEN), ""); + rTxt = rTxt.replaceAll(OUStringChar(SVT_HARD_HYPHEN), ""); return n != rTxt.getLength(); } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 092d6b2b5908..dfb41fb0f496 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -998,7 +998,7 @@ SvNumberformat::SvNumberformat(OUString& rString, { //! eSymbolType is negative sal_uInt8 nNum = static_cast<sal_uInt8>(1 - (eSymbolType - BRACKET_SYMBOLTYPE_DBNUM1)); - sStr = "DBNum" + OUStringLiteral1('0' + nNum); + sStr = "DBNum" + OUStringChar('0' + nNum); NumFor[nIndex].SetNatNumNum( nNum, true ); } break; diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index cf036c8d39ed..04e86ea2ca5b 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -820,28 +820,28 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, case ':': case '-': eType = NF_SYMBOLTYPE_DEL; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); eState = SsStop; break; case '*': eType = NF_SYMBOLTYPE_STAR; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); eState = SsGetStar; break; case '_': eType = NF_SYMBOLTYPE_BLANK; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); eState = SsGetBlank; break; case '"': eType = NF_SYMBOLTYPE_STRING; eState = SsGetString; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); break; case '\\': eType = NF_SYMBOLTYPE_STRING; eState = SsGetChar; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); break; case '$': case '+': @@ -849,7 +849,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, case ')': eType = NF_SYMBOLTYPE_STRING; eState = SsStop; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); break; default : if (StringEqualsChar( pFormatter->GetNumDecimalSep(), cToken) || @@ -860,7 +860,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, { // Another separator than pre-known ASCII eType = NF_SYMBOLTYPE_DEL; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); eState = SsStop; } else if ( pChrCls->isLetter( rStr, nPos-1 ) ) @@ -885,7 +885,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, if ( bCurrency ) { eState = SsGetWord; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); } else { @@ -913,7 +913,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, { case '+' : case '-' : // E+ E- combine to one symbol - sSymbolBuffer.append(OUStringLiteral1(cNext)); + sSymbolBuffer.append(OUStringChar(cNext)); eType = NF_KEY_E; nPos++; break; @@ -931,20 +931,20 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, else { eState = SsGetWord; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); } } else { eType = NF_SYMBOLTYPE_STRING; eState = SsStop; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); } break; } break; case SsGetChar: - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); eState = SsStop; break; case SsGetString: @@ -952,7 +952,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, { eState = SsStop; } - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); break; case SsGetWord: if ( pChrCls->isLetter( rStr, nPos-1 ) ) @@ -968,7 +968,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, } else { - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); } } else @@ -990,7 +990,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, (nLen == 2 && (sSymbolBuffer[1] == 'M' || sSymbolBuffer[1] == 'm') && (rStr[nPos + 1] == 'M' || rStr[nPos + 1] == 'm')))) { - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); bDontStop = true; } } @@ -1008,11 +1008,11 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, break; case SsGetStar: eState = SsStop; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); break; case SsGetBlank: eState = SsStop; - sSymbolBuffer.append(OUStringLiteral1(cToken)); + sSymbolBuffer.append(OUStringChar(cToken)); break; default: break; @@ -3101,7 +3101,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) { case '+': case '-': - rString += OUStringLiteral1(c); + rString += OUStringChar(c); break; case ' ': case '.': @@ -3132,7 +3132,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) } else { - rString += OUStringLiteral1(c); + rString += OUStringChar(c); } break; default: diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 55f959cfc3a5..e72707c58cd8 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -112,10 +112,10 @@ static std::vector< OUString > getInfoFromInd( const OUString& aInd ) return aResult; } - aNum += OUStringLiteral1( pLine[i] ); + aNum += OUStringChar( pLine[i] ); } - newItem.append( OUStringLiteral1( aNum.toUInt32( 16 ) ) ); + newItem.append( OUStringChar( aNum.toUInt32( 16 ) ) ); pLine += 3; } |