loplugin:stringconstant: adapt to improved OUStringLiteral1 (svl)

Change-Id: I5b9c503fd28209b893688e81ddd00eb843b44e37
This commit is contained in:
Stephan Bergmann
2016-08-30 15:29:26 +02:00
parent f5a99c3748
commit d7beb36e94
3 changed files with 23 additions and 24 deletions

View File

@@ -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;

View File

@@ -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:

View File

@@ -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;
}