diff options
Diffstat (limited to 'i18nutil/source/utility/widthfolding.cxx')
-rw-r--r-- | i18nutil/source/utility/widthfolding.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/i18nutil/source/utility/widthfolding.cxx b/i18nutil/source/utility/widthfolding.cxx index ed636b2e5cc4..edfe573e70be 100644 --- a/i18nutil/source/utility/widthfolding.cxx +++ b/i18nutil/source/utility/widthfolding.cxx @@ -55,7 +55,8 @@ OUString widthfolding::decompose_ja_voiced_sound_marks (const OUString& inStr, s { // Create a string buffer which can hold nCount * 2 + 1 characters. // Its size may become double of nCount. - rtl_uString * newStr = x_rtl_uString_new_WithLength(nCount * 2 ); // defined in x_rtl_ustring.h The reference count is 0 now. + // The reference count is 1 now. + rtl_uString * newStr = x_rtl_uString_new_WithLength(nCount * 2); sal_Int32 *p = NULL; sal_Int32 position = 0; @@ -99,7 +100,7 @@ OUString widthfolding::decompose_ja_voiced_sound_marks (const OUString& inStr, s newStr->length = sal_Int32(dst - newStr->buffer); if (useOffset) offset.realloc(newStr->length); - return OUString( newStr ); // defined in rtl/usrting. The reference count is increased from 0 to 1. + return OUString(newStr, SAL_NO_ACQUIRE); // take ownership } oneToOneMapping& widthfolding::getfull2halfTable(void) @@ -116,8 +117,8 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const OUString& inStr, sal { // Create a string buffer which can hold nCount + 1 characters. // Its size may become equal to nCount or smaller. - // The reference count is 0 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h + // The reference count is 1 now. + rtl_uString * newStr = x_rtl_uString_new_WithLength(nCount); // Prepare pointers of unicode character arrays. const sal_Unicode* src = inStr.getStr() + startPos; @@ -204,7 +205,7 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const OUString& inStr, sal } if (useOffset) offset.realloc(newStr->length); - return OUString( newStr ); // defined in rtl/usrting. The reference count is increased from 0 to 1. + return OUString(newStr, SAL_NO_ACQUIRE); // take ownership } oneToOneMapping& widthfolding::gethalf2fullTable(void) |