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 (
(rLocale.Country == "HK" ||
rLocale.Country == "MO" ) &&
// 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())) ||
(l > 0 &&
// load service with name <base>_<lang>
......
......@@ -162,11 +162,11 @@ void xdictionary::initDictionaryData(const sal_Char *pLang)
#ifdef SAL_DLLPREFIX
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
OUStringBuffer aBuf( sal::static_int_cast<int>(strlen(pLang) + 7 + 4) ); // mostly "*.dll" (with * == dict_zh)
#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 );
if( aEntry.mhModule ) {
oslGenericFunction func;
......
......@@ -148,12 +148,12 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
#ifndef DISABLE_DYNLOADING
OUStringBuffer aBuf;
#ifdef SAL_DLLPREFIX
aBuf.appendAscii(SAL_DLLPREFIX);
aBuf.append(SAL_DLLPREFIX);
#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 );
if (hModule) {
aBuf.appendAscii("get_").append(rLocale.Language).appendAscii("_");
aBuf.append("get_").append(rLocale.Language).append("_");
if ( rLocale.Language == "zh" ) {
OUString func_base = aBuf.makeStringAndClear();
OUString funclen_base = func_base + "_length";
......@@ -175,9 +175,9 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
if ( rLocale.Language == "ja" ) {
// replace algorithm name to implementation name.
if (rAlgorithm == "phonetic (alphanumeric first)")
aBuf.appendAscii("phonetic_alphanumeric_first");
aBuf.append("phonetic_alphanumeric_first");
else if (rAlgorithm == "phonetic (alphanumeric last)")
aBuf.appendAscii("phonetic_alphanumeric_last");
aBuf.append("phonetic_alphanumeric_last");
else
aBuf.append(rAlgorithm);
} else {
......
......@@ -188,13 +188,13 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry,
if (address != 0xFFFF) {
address = idx[1][address + (ch & 0xFF)];
if ( i > 0 && rLocale.Language == "zh" )
candidate.appendAscii(" ");
candidate.append(" ");
if (idx[2])
candidate.append(&idx[2][address]);
else
candidate.append(address);
} else
candidate.appendAscii(" ");
candidate.append(" ");
}
}
return candidate.makeStringAndClear();
......
......@@ -878,7 +878,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
incErrorInt( "Error: Time100SecSeparator not present in FormatCode formatindex=\"%d\".\n",
formatindex);
OUStringBuffer a100s( pSep->getValue());
a100s.appendAscii( "00");
a100s.append( "00");
n100s = aCode.indexOf( a100s.makeStringAndClear());
if (n100s < 0)
incErrorInt( "Error: Time100SecSeparator+00 not present in FormatCode formatindex=\"%d\".\n",
......
......@@ -508,7 +508,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
// Library not loaded, load it and add it to the list.
#ifdef SAL_DLLPREFIX
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
aBuf.ensureCapacity(strlen(aLibTable[i].pLib) + 4); // mostly "*.dll"
aBuf.appendAscii(aLibTable[i].pLib).appendAscii( SAL_DLLEXTENSION );
......
......@@ -845,7 +845,7 @@ void makeHebrewNumber(sal_Int64 value, OUStringBuffer& output, bool isLast, bool
if (value > 1000) {
makeHebrewNumber(value / 1000, output, num != 0, useGeresh);
output.appendAscii(" ");
output.append(" ");
}
if (num == 0) {
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