diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-14 19:22:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-14 20:27:33 +0000 |
commit | fffb674c1e5352048caeae325ecdc6428cb210bc (patch) | |
tree | 52e4a6988549c8168acac2ee7ae8a86d449dae89 /i18nutil | |
parent | 2b407adc78c97863223653cb24e7a7226ae1e6cf (diff) |
coverity#1371289 avoid the need for an assignment
Change-Id: I7f9b8d21652c79642f9a2f916ad0609c8abd430b
Diffstat (limited to 'i18nutil')
-rw-r--r-- | i18nutil/source/utility/unicode.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index 984c5f7f48e0..61ce7c04d2b2 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -1192,21 +1192,21 @@ OUString ToggleUnicodeCodepoint::StringToReplace() mbAllowMoreChars = false; //validate unicode notation. - OUStringBuffer sIn; + OUString sIn; sal_uInt32 nUnicode = 0; sal_Int32 nUPlus = maInput.indexOf("U+"); //if U+ notation used, strip off all extra chars added not in U+ notation if( nUPlus != -1 ) { maInput = maInput.copy(nUPlus); - sIn = maInput.copy(2); + sIn = maInput.copy(2).toString(); nUPlus = sIn.indexOf("U+"); } else - sIn = maInput; + sIn = maInput.toString(); while( nUPlus != -1 ) { - nUnicode = sIn.copy(0, nUPlus).toString().toUInt32(16); + nUnicode = sIn.copy(0, nUPlus).toUInt32(16); //prevent creating control characters or invalid Unicode values if( !rtl::isUnicodeCodePoint(nUnicode) || nUnicode < 0x20 ) maInput = sIn.copy(nUPlus); @@ -1214,7 +1214,7 @@ OUString ToggleUnicodeCodepoint::StringToReplace() nUPlus = sIn.indexOf("U+"); } - nUnicode = sIn.toString().toUInt32(16); + nUnicode = sIn.toUInt32(16); if( !rtl::isUnicodeCodePoint(nUnicode) || nUnicode < 0x20 ) maInput.truncate().append( sIn[sIn.getLength()-1] ); return maInput.toString(); |