loplugin:reftotemp in helpcompiler..i18npool
Change-Id: I6f7794e6988d1e91c848a093ed85ddb0c6d1c67a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176373 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
ce8816ff95
commit
2f94498419
8 changed files with 20 additions and 20 deletions
|
@ -87,7 +87,7 @@ void HelpCompiler::saveXhpForJar( xmlDocPtr doc, const fs::path &filePath )
|
|||
#else
|
||||
std::string pathSep = "/";
|
||||
#endif
|
||||
const std::string& sourceXhpPath = filePath.native_file_string();
|
||||
const std::string sourceXhpPath = filePath.native_file_string();
|
||||
std::string zipdirPath = zipdir.native_file_string();
|
||||
const std::string srcdirPath( src.native_file_string() );
|
||||
// srcdirPath contains trailing /, but we want the file path with / at the beginning
|
||||
|
|
|
@ -68,7 +68,7 @@ CollatorImpl::compareString( const OUString& in_str1, const OUString& in_str2)
|
|||
sal_Int32 SAL_CALL
|
||||
CollatorImpl::loadDefaultCollator(const lang::Locale& rLocale, sal_Int32 collatorOptions)
|
||||
{
|
||||
const Sequence< Implementation > &imp = mxLocaleData->getCollatorImplementations(rLocale);
|
||||
const Sequence< Implementation > imp = mxLocaleData->getCollatorImplementations(rLocale);
|
||||
auto pImpl = std::find_if(imp.begin(), imp.end(),
|
||||
[](const Implementation& rImp) { return rImp.isDefault; });
|
||||
if (pImpl != imp.end())
|
||||
|
@ -105,7 +105,7 @@ Sequence< OUString > SAL_CALL
|
|||
CollatorImpl::listCollatorAlgorithms( const lang::Locale& rLocale )
|
||||
{
|
||||
nLocale = rLocale;
|
||||
const Sequence< Implementation > &imp = mxLocaleData->getCollatorImplementations(rLocale);
|
||||
const Sequence< Implementation > imp = mxLocaleData->getCollatorImplementations(rLocale);
|
||||
Sequence< OUString > list(imp.getLength());
|
||||
auto pBegin = list.getArray();
|
||||
auto pId = pBegin;
|
||||
|
|
|
@ -747,7 +747,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal
|
|||
break;
|
||||
case TRANSLITERATION:
|
||||
try {
|
||||
const OUString &tmp = OUString::number( number );
|
||||
const OUString tmp = OUString::number( number );
|
||||
OUString transliteration;
|
||||
getPropertyByName(aProperties, "Transliteration") >>= transliteration;
|
||||
if ( !translit )
|
||||
|
|
|
@ -600,7 +600,7 @@ OUString getNumberText(const Locale& rLocale, const OUString& rNumberString,
|
|||
}
|
||||
|
||||
// Handle also month and day names for NatNum12 date formatting
|
||||
const OUString& rNumberStr = (count == 0) ? rNumberString : sBuf.makeStringAndClear();
|
||||
const OUString aNumberStr = (count == 0) ? rNumberString : sBuf.makeStringAndClear();
|
||||
|
||||
static auto xNumberText
|
||||
= css::linguistic2::NumberText::create(comphelper::getProcessComponentContext());
|
||||
|
@ -616,14 +616,14 @@ OUString getNumberText(const Locale& rLocale, const OUString& rNumberString,
|
|||
// of the continuous update of the multiple number names during typing.
|
||||
// We fix this by buffering the result of the conversion.
|
||||
static std::unordered_map<OUString, std::map<OUString, OUString>> aBuff;
|
||||
auto& rItems = aBuff[rNumberStr];
|
||||
auto& rItems = aBuff[aNumberStr];
|
||||
auto& rItem = rItems[numbertext_prefix + aLoc];
|
||||
if (rItem.isEmpty())
|
||||
{
|
||||
rItem = xNumberText->getNumberText(numbertext_prefix + rNumberStr, rLocale);
|
||||
rItem = xNumberText->getNumberText(numbertext_prefix + aNumberStr, rLocale);
|
||||
// use number at missing number to text conversion
|
||||
if (rItem.isEmpty())
|
||||
rItem = rNumberStr;
|
||||
rItem = aNumberStr;
|
||||
}
|
||||
OUString sResult = rItem;
|
||||
if (i != 0 && i < len)
|
||||
|
|
|
@ -46,7 +46,7 @@ OUString
|
|||
fullwidthToHalfwidth::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
|
||||
{
|
||||
// Decomposition: GA --> KA + voice-mark
|
||||
const OUString& newStr = i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, nCount, pOffset);
|
||||
const OUString newStr = i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, nCount, pOffset);
|
||||
|
||||
// One to One mapping
|
||||
return transliteration_OneToOne::transliterateImpl( newStr, 0, newStr.getLength(), nullptr);
|
||||
|
@ -76,7 +76,7 @@ OUString
|
|||
FULLWIDTHKATAKANA_HALFWIDTHKATAKANA::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
|
||||
{
|
||||
// Decomposition: GA --> KA + voice-mark
|
||||
const OUString& newStr = i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, nCount, pOffset);
|
||||
const OUString newStr = i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, nCount, pOffset);
|
||||
|
||||
// One to One mapping
|
||||
return transliteration_OneToOne::transliterateImpl( newStr, 0, newStr.getLength(), nullptr);
|
||||
|
@ -106,7 +106,7 @@ OUString
|
|||
FULLWIDTH_HALFWIDTH_LIKE_ASC::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
|
||||
{
|
||||
// Decomposition: GA --> KA + voice-mark
|
||||
const OUString& newStr = i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, nCount, pOffset);
|
||||
const OUString newStr = i18nutil::widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, nCount, pOffset);
|
||||
|
||||
// One to One mapping
|
||||
return transliteration_OneToOne::transliterateImpl( newStr, 0, newStr.getLength(), nullptr);
|
||||
|
|
|
@ -38,7 +38,7 @@ OUString
|
|||
halfwidthToFullwidth::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
|
||||
{
|
||||
// One to One mapping
|
||||
const OUString& newStr = transliteration_OneToOne::transliterateImpl( inStr, startPos, nCount, nullptr);
|
||||
const OUString newStr = transliteration_OneToOne::transliterateImpl( inStr, startPos, nCount, nullptr);
|
||||
|
||||
// Composition: KA + voice-mark --> GA
|
||||
return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, newStr.getLength(), pOffset );
|
||||
|
@ -56,7 +56,7 @@ OUString
|
|||
HALFWIDTHKATAKANA_FULLWIDTHKATAKANA::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
|
||||
{
|
||||
// One to One mapping
|
||||
const OUString& newStr = transliteration_OneToOne::transliterateImpl( inStr, startPos, nCount, nullptr);
|
||||
const OUString newStr = transliteration_OneToOne::transliterateImpl( inStr, startPos, nCount, nullptr);
|
||||
|
||||
// Composition: KA + voice-mark --> GA
|
||||
return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, newStr.getLength(), pOffset );
|
||||
|
@ -74,7 +74,7 @@ OUString
|
|||
HALFWIDTH_FULLWIDTH_LIKE_JIS::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
|
||||
{
|
||||
// One to One mapping
|
||||
const OUString& newStr = transliteration_OneToOne::transliterateImpl( inStr, startPos, nCount, nullptr);
|
||||
const OUString newStr = transliteration_OneToOne::transliterateImpl( inStr, startPos, nCount, nullptr);
|
||||
|
||||
// Composition: KA + voice-mark --> GA
|
||||
return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, newStr.getLength(), pOffset, WIDTHFOLDING_DONT_USE_COMBINED_VU );
|
||||
|
|
|
@ -296,7 +296,7 @@ TransliterationImpl::loadModulesByImplNames(const Sequence< OUString >& implName
|
|||
Sequence<OUString> SAL_CALL
|
||||
TransliterationImpl::getAvailableModules( const Locale& rLocale, sal_Int16 sType )
|
||||
{
|
||||
const Sequence<OUString> &translist = mxLocaledata->getTransliterations(rLocale);
|
||||
const Sequence<OUString> translist = mxLocaledata->getTransliterations(rLocale);
|
||||
std::vector<OUString> r;
|
||||
r.reserve(translist.getLength());
|
||||
Reference<XExtendedTransliteration> body;
|
||||
|
@ -525,7 +525,7 @@ TransliterationImpl::getRange(const Sequence< OUString > &inStrs,
|
|||
std::vector<OUString> ostr;
|
||||
ostr.reserve(nMaxOutputLength);
|
||||
for (sal_Int32 j = 0; j < length; j+=2) {
|
||||
const Sequence< OUString >& temp = bodyCascade[_numCascade]->transliterateRange(inStrs[j], inStrs[j+1]);
|
||||
const Sequence< OUString > temp = bodyCascade[_numCascade]->transliterateRange(inStrs[j], inStrs[j+1]);
|
||||
|
||||
for (const auto& rStr : temp) {
|
||||
if ( j_tmp++ >= nMaxOutputLength ) throw RuntimeException();
|
||||
|
|
|
@ -138,7 +138,7 @@ Transliteration_body::transliterateImpl(
|
|||
// take care of TOGGLE_CASE transliteration:
|
||||
MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] );
|
||||
|
||||
const i18nutil::Mapping &map = i18nutil::casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType );
|
||||
const i18nutil::Mapping map = i18nutil::casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType );
|
||||
std::fill_n(offsetDataEnd, map.nmap, i + startPos);
|
||||
offsetDataEnd += map.nmap;
|
||||
std::copy_n(map.map, map.nmap, out + j);
|
||||
|
@ -154,7 +154,7 @@ Transliteration_body::transliterateImpl(
|
|||
// take care of TOGGLE_CASE transliteration:
|
||||
MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( nMappingType, in[i] );
|
||||
|
||||
const i18nutil::Mapping &map = i18nutil::casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType );
|
||||
const i18nutil::Mapping map = i18nutil::casefolding::getValue( in, i, nCount, aLocale, nTmpMappingType );
|
||||
std::copy_n(map.map, map.nmap, out + j);
|
||||
j += map.nmap;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ Transliteration_body::transliterateImpl(
|
|||
OUString SAL_CALL
|
||||
Transliteration_body::transliterateChar2String( sal_Unicode inChar )
|
||||
{
|
||||
const i18nutil::Mapping &map = i18nutil::casefolding::getValue(&inChar, 0, 1, aLocale, nMappingType);
|
||||
const i18nutil::Mapping map = i18nutil::casefolding::getValue(&inChar, 0, 1, aLocale, nMappingType);
|
||||
rtl_uString* pStr = rtl_uString_alloc(map.nmap);
|
||||
sal_Unicode* out = pStr->buffer;
|
||||
sal_Int32 i;
|
||||
|
@ -181,7 +181,7 @@ Transliteration_body::transliterateChar2String( sal_Unicode inChar )
|
|||
sal_Unicode SAL_CALL
|
||||
Transliteration_body::transliterateChar2Char( sal_Unicode inChar )
|
||||
{
|
||||
const i18nutil::Mapping &map = i18nutil::casefolding::getValue(&inChar, 0, 1, aLocale, nMappingType);
|
||||
const i18nutil::Mapping map = i18nutil::casefolding::getValue(&inChar, 0, 1, aLocale, nMappingType);
|
||||
if (map.nmap > 1)
|
||||
throw MultipleCharsOutputException();
|
||||
return map.map[0];
|
||||
|
|
Loading…
Reference in a new issue