diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-08-30 15:29:26 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-08-30 15:29:26 +0200 |
commit | d7beb36e94a65f7cfea44b964aa7fbd2a734937b (patch) | |
tree | 8dc00b3363759aae6ab6f8adde7fe7bce3e94322 | |
parent | f5a99c3748b9221ae58e38f85d549deeef425abb (diff) |
loplugin:stringconstant: adapt to improved OUStringLiteral1 (svl)
Change-Id: I5b9c503fd28209b893688e81ddd00eb843b44e37
-rw-r--r-- | svl/source/numbers/zformat.cxx | 3 | ||||
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 38 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 6 |
3 files changed, 23 insertions, 24 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 9e90167236a7..767daddb709c 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -776,10 +776,9 @@ SvNumberformat::SvNumberformat(OUString& rString, } else { - sStr = "DBNum"; //! eSymbolType is negative sal_uInt8 nNum = (sal_uInt8)(1 - (eSymbolType - BRACKET_SYMBOLTYPE_DBNUM1)); - sStr += OUString((sal_Unicode)('0' + nNum)); + sStr = "DBNum" + OUStringLiteral1('0' + nNum); NumFor[nIndex].SetNatNumNum( nNum, true ); } break; diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index 82971a5fe0da..40cc9d3b9850 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -676,28 +676,28 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, case ':': case '-': eType = NF_SYMBOLTYPE_DEL; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); eState = SsStop; break; case '*': eType = NF_SYMBOLTYPE_STAR; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); eState = SsGetStar; break; case '_': eType = NF_SYMBOLTYPE_BLANK; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); eState = SsGetBlank; break; case '"': eType = NF_SYMBOLTYPE_STRING; eState = SsGetString; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); break; case '\\': eType = NF_SYMBOLTYPE_STRING; eState = SsGetChar; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); break; case '$': case '+': @@ -705,7 +705,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, case ')': eType = NF_SYMBOLTYPE_STRING; eState = SsStop; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); break; default : if (StringEqualsChar( pFormatter->GetNumDecimalSep(), cToken) || @@ -716,7 +716,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, { // Another separator than pre-known ASCII eType = NF_SYMBOLTYPE_DEL; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); eState = SsStop; } else if ( pChrCls->isLetter( rStr, nPos-1 ) ) @@ -740,7 +740,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, if ( bCurrency ) { eState = SsGetWord; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); } else { @@ -754,7 +754,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, { case '+' : case '-' : // E+ E- combine to one symbol - sSymbol += OUString(cNext); + sSymbol += OUStringLiteral1(cNext); eType = NF_KEY_E; nPos++; break; @@ -772,20 +772,20 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, else { eState = SsGetWord; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); } } else { eType = NF_SYMBOLTYPE_STRING; eState = SsStop; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); } break; } break; case SsGetChar: - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); eState = SsStop; break; case SsGetString: @@ -793,7 +793,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, { eState = SsStop; } - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); break; case SsGetWord: if ( pChrCls->isLetter( rStr, nPos-1 ) ) @@ -808,7 +808,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, } else { - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); } } else @@ -828,7 +828,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, (nLen == 2 && (sSymbol[1] == 'M' || sSymbol[1] == 'm') && (rStr[nPos + 1] == 'M' || rStr[nPos + 1] == 'm')))) { - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); bDontStop = true; } } @@ -845,11 +845,11 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, break; case SsGetStar: eState = SsStop; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); break; case SsGetBlank: eState = SsStop; - sSymbol += OUString(cToken); + sSymbol += OUStringLiteral1(cToken); break; default: break; @@ -2715,7 +2715,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) { case '+': case '-': - rString += OUString(c); + rString += OUStringLiteral1(c); break; case ' ': case '.': @@ -2746,7 +2746,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) } else { - rString += OUString(c); + rString += OUStringLiteral1(c); } break; default: diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 3971ed06d06d..d5be5b4be774 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -97,7 +97,7 @@ static vector< OUString > getInfoFromInd( const OUString& aInd ) while( *pLine && !( pLine[0] == '_' && pLine[1] == '_' )) if( *pLine != '_' ) { - newItem += OUString( (sal_Unicode) *pLine ); + newItem += OUStringLiteral1( *pLine ); pLine++; } else @@ -114,10 +114,10 @@ static vector< OUString > getInfoFromInd( const OUString& aInd ) return aResult; } - aNum += OUString( (sal_Unicode) pLine[i] ); + aNum += OUStringLiteral1( pLine[i] ); } - newItem += OUString( (sal_Unicode) aNum.toUInt32( 16 ) ); + newItem += OUStringLiteral1( aNum.toUInt32( 16 ) ); pLine += 3; } |