Kaydet (Commit) 2cef646f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringconstant: OUStringBuffer: appendAscii -> append

Change-Id: Iff961fccfa7b60e788b538569bb724e806e99408
üst 1656b722
...@@ -585,7 +585,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw ( ...@@ -585,7 +585,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw (
(rLocale.Country == "HK" || (rLocale.Country == "HK" ||
rLocale.Country == "MO" ) && rLocale.Country == "MO" ) &&
// if the country code is HK or MO, one more step to try TW. // if the country code is HK or MO, one more step to try TW.
createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).appendAscii( createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).append(
"TW").makeStringAndClear())) || "TW").makeStringAndClear())) ||
(l > 0 && (l > 0 &&
// load service with name <base>_<lang> // load service with name <base>_<lang>
......
...@@ -162,11 +162,11 @@ void xdictionary::initDictionaryData(const sal_Char *pLang) ...@@ -162,11 +162,11 @@ void xdictionary::initDictionaryData(const sal_Char *pLang)
#ifdef SAL_DLLPREFIX #ifdef SAL_DLLPREFIX
OUStringBuffer aBuf( sal::static_int_cast<int>(strlen(pLang) + 7 + 6) ); // mostly "lib*.so" (with * == dict_zh) OUStringBuffer aBuf( sal::static_int_cast<int>(strlen(pLang) + 7 + 6) ); // mostly "lib*.so" (with * == dict_zh)
aBuf.appendAscii( SAL_DLLPREFIX ); aBuf.append( SAL_DLLPREFIX );
#else #else
OUStringBuffer aBuf( sal::static_int_cast<int>(strlen(pLang) + 7 + 4) ); // mostly "*.dll" (with * == dict_zh) OUStringBuffer aBuf( sal::static_int_cast<int>(strlen(pLang) + 7 + 4) ); // mostly "*.dll" (with * == dict_zh)
#endif #endif
aBuf.appendAscii( "dict_" ).appendAscii( pLang ).appendAscii( SAL_DLLEXTENSION ); aBuf.append( "dict_" ).appendAscii( pLang ).append( SAL_DLLEXTENSION );
aEntry.mhModule = osl_loadModuleRelative( &thisModule, aBuf.makeStringAndClear().pData, SAL_LOADMODULE_DEFAULT ); aEntry.mhModule = osl_loadModuleRelative( &thisModule, aBuf.makeStringAndClear().pData, SAL_LOADMODULE_DEFAULT );
if( aEntry.mhModule ) { if( aEntry.mhModule ) {
oslGenericFunction func; oslGenericFunction func;
......
...@@ -148,12 +148,12 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: ...@@ -148,12 +148,12 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
OUStringBuffer aBuf; OUStringBuffer aBuf;
#ifdef SAL_DLLPREFIX #ifdef SAL_DLLPREFIX
aBuf.appendAscii(SAL_DLLPREFIX); aBuf.append(SAL_DLLPREFIX);
#endif #endif
aBuf.appendAscii( "collator_data" ).appendAscii( SAL_DLLEXTENSION ); aBuf.append( "collator_data" ).append( SAL_DLLEXTENSION );
hModule = osl_loadModuleRelative( &thisModule, aBuf.makeStringAndClear().pData, SAL_LOADMODULE_DEFAULT ); hModule = osl_loadModuleRelative( &thisModule, aBuf.makeStringAndClear().pData, SAL_LOADMODULE_DEFAULT );
if (hModule) { if (hModule) {
aBuf.appendAscii("get_").append(rLocale.Language).appendAscii("_"); aBuf.append("get_").append(rLocale.Language).append("_");
if ( rLocale.Language == "zh" ) { if ( rLocale.Language == "zh" ) {
OUString func_base = aBuf.makeStringAndClear(); OUString func_base = aBuf.makeStringAndClear();
OUString funclen_base = func_base + "_length"; OUString funclen_base = func_base + "_length";
...@@ -175,9 +175,9 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: ...@@ -175,9 +175,9 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
if ( rLocale.Language == "ja" ) { if ( rLocale.Language == "ja" ) {
// replace algorithm name to implementation name. // replace algorithm name to implementation name.
if (rAlgorithm == "phonetic (alphanumeric first)") if (rAlgorithm == "phonetic (alphanumeric first)")
aBuf.appendAscii("phonetic_alphanumeric_first"); aBuf.append("phonetic_alphanumeric_first");
else if (rAlgorithm == "phonetic (alphanumeric last)") else if (rAlgorithm == "phonetic (alphanumeric last)")
aBuf.appendAscii("phonetic_alphanumeric_last"); aBuf.append("phonetic_alphanumeric_last");
else else
aBuf.append(rAlgorithm); aBuf.append(rAlgorithm);
} else { } else {
......
...@@ -188,13 +188,13 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, ...@@ -188,13 +188,13 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry,
if (address != 0xFFFF) { if (address != 0xFFFF) {
address = idx[1][address + (ch & 0xFF)]; address = idx[1][address + (ch & 0xFF)];
if ( i > 0 && rLocale.Language == "zh" ) if ( i > 0 && rLocale.Language == "zh" )
candidate.appendAscii(" "); candidate.append(" ");
if (idx[2]) if (idx[2])
candidate.append(&idx[2][address]); candidate.append(&idx[2][address]);
else else
candidate.append(address); candidate.append(address);
} else } else
candidate.appendAscii(" "); candidate.append(" ");
} }
} }
return candidate.makeStringAndClear(); return candidate.makeStringAndClear();
......
...@@ -878,7 +878,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const ...@@ -878,7 +878,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
incErrorInt( "Error: Time100SecSeparator not present in FormatCode formatindex=\"%d\".\n", incErrorInt( "Error: Time100SecSeparator not present in FormatCode formatindex=\"%d\".\n",
formatindex); formatindex);
OUStringBuffer a100s( pSep->getValue()); OUStringBuffer a100s( pSep->getValue());
a100s.appendAscii( "00"); a100s.append( "00");
n100s = aCode.indexOf( a100s.makeStringAndClear()); n100s = aCode.indexOf( a100s.makeStringAndClear());
if (n100s < 0) if (n100s < 0)
incErrorInt( "Error: Time100SecSeparator+00 not present in FormatCode formatindex=\"%d\".\n", incErrorInt( "Error: Time100SecSeparator+00 not present in FormatCode formatindex=\"%d\".\n",
......
...@@ -508,7 +508,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName( ...@@ -508,7 +508,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
// Library not loaded, load it and add it to the list. // Library not loaded, load it and add it to the list.
#ifdef SAL_DLLPREFIX #ifdef SAL_DLLPREFIX
aBuf.ensureCapacity(strlen(aLibTable[i].pLib) + 6); // mostly "lib*.so" aBuf.ensureCapacity(strlen(aLibTable[i].pLib) + 6); // mostly "lib*.so"
aBuf.appendAscii( SAL_DLLPREFIX ).appendAscii(aLibTable[i].pLib).appendAscii( SAL_DLLEXTENSION ); aBuf.append( SAL_DLLPREFIX ).appendAscii(aLibTable[i].pLib).append( SAL_DLLEXTENSION );
#else #else
aBuf.ensureCapacity(strlen(aLibTable[i].pLib) + 4); // mostly "*.dll" aBuf.ensureCapacity(strlen(aLibTable[i].pLib) + 4); // mostly "*.dll"
aBuf.appendAscii(aLibTable[i].pLib).appendAscii( SAL_DLLEXTENSION ); aBuf.appendAscii(aLibTable[i].pLib).appendAscii( SAL_DLLEXTENSION );
......
...@@ -845,7 +845,7 @@ void makeHebrewNumber(sal_Int64 value, OUStringBuffer& output, bool isLast, bool ...@@ -845,7 +845,7 @@ void makeHebrewNumber(sal_Int64 value, OUStringBuffer& output, bool isLast, bool
if (value > 1000) { if (value > 1000) {
makeHebrewNumber(value / 1000, output, num != 0, useGeresh); makeHebrewNumber(value / 1000, output, num != 0, useGeresh);
output.appendAscii(" "); output.append(" ");
} }
if (num == 0) { if (num == 0) {
output.append(value == 1000 ? thousand : isLast ? thousands_last : thousands); output.append(value == 1000 ? thousand : isLast ? thousands_last : thousands);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment