diff options
author | Karl Hong <khong@openoffice.org> | 2002-09-16 15:31:37 +0000 |
---|---|---|
committer | Karl Hong <khong@openoffice.org> | 2002-09-16 15:31:37 +0000 |
commit | 0043384f51863bafc2e40b3ccd14016fc486eb74 (patch) | |
tree | dfb9e249fd7d708ce034f6923e3eb994e9524501 /i18npool/source/transliteration/transliteration_Ignore.cxx | |
parent | 4f1f9e6449e5210d4e8ba53bf8d54632efc574ea (diff) |
#103026# fix a string length problem
Diffstat (limited to 'i18npool/source/transliteration/transliteration_Ignore.cxx')
-rw-r--r-- | i18npool/source/transliteration/transliteration_Ignore.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/i18npool/source/transliteration/transliteration_Ignore.cxx b/i18npool/source/transliteration/transliteration_Ignore.cxx index 00632b3360f8..191ae07b0fbd 100644 --- a/i18npool/source/transliteration/transliteration_Ignore.cxx +++ b/i18npool/source/transliteration/transliteration_Ignore.cxx @@ -2,9 +2,9 @@ * * $RCSfile: transliteration_Ignore.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: svesik $ $Date: 2002-08-27 12:11:25 $ + * last change: $Author: khong $ $Date: 2002-09-16 16:31:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -174,6 +174,7 @@ transliteration_Ignore::transliterate( const OUString& inStr, sal_Int32 startPos offset.realloc( nCount ); sal_Int32 *p = offset.getArray(); sal_Int32 position = startPos; + sal_Int32 count = 0; // Translation while (nCount -- > 0) { @@ -182,12 +183,14 @@ transliteration_Ignore::transliterate( const OUString& inStr, sal_Int32 startPos if (c != 0xffff) { *dst ++ = c; *p ++ = position; + count++; } position ++; } *dst = (sal_Unicode) 0; - return OUString( newStr ); // defined in rtl/usrting. The reference count is increased from 0 to 1. + offset.realloc(count); + return OUString( newStr->buffer, count); // defined in rtl/usrting. The reference count is increased from 0 to 1. } @@ -205,6 +208,7 @@ transliteration_Ignore::transliterate( const OUString& inStr, sal_Int32 startPos offset.realloc( nCount ); sal_Int32 *p = offset.getArray(); sal_Int32 position = startPos; + sal_Int32 count = 0; // Translation while (nCount -- > 0) { @@ -213,12 +217,14 @@ transliteration_Ignore::transliterate( const OUString& inStr, sal_Int32 startPos if (c != 0xffff) { *dst ++ = c; *p ++ = position; + count++; } position ++; } *dst = (sal_Unicode) 0; - return OUString( newStr ); // defined in rtl/usrting. The reference count is increased from 0 to 1. + offset.realloc(count); + return OUString( newStr->buffer, count ); // defined in rtl/usrting. The reference count is increased from 0 to 1. } } } } } |