diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-03-26 14:50:49 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-03-26 14:50:49 +0000 |
commit | fb2dbe00e9998f0733fd42729dd96fbbd07fc1b4 (patch) | |
tree | fb3543107f654eb590283803c361d02644b4dbab /rsc/source/tools | |
parent | e283533c78f713003e15853ac143460d513ecd39 (diff) |
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'rsc/source/tools')
-rw-r--r-- | rsc/source/tools/rscchar.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/rsc/source/tools/rscchar.cxx b/rsc/source/tools/rscchar.cxx index 3862ca88b616..537b6a0877f7 100644 --- a/rsc/source/tools/rscchar.cxx +++ b/rsc/source/tools/rscchar.cxx @@ -2,9 +2,9 @@ * * $RCSfile: rscchar.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: pl $ $Date: 2001-10-10 11:51:29 $ + * last change: $Author: hr $ $Date: 2003-03-26 15:50:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -223,8 +223,9 @@ char * RscChar::MakeUTF8( char * pStr, UINT16 nTextEncoding ) rtl_destroyTextToUnicodeConverter( hConv ); - delete pUniCode; - delete pOrgStr; + delete[] pUniCode; + delete[] pOrgStr; + return pUtf8; }; @@ -338,6 +339,7 @@ char * RscChar::MakeUTF8FromL( char * pStr ) sal_Size nMaxUtf8Len = nUniPos * 6; if( nUniPos * 6 > 0xFFFF ) RscExit( 10 ); + char * pUtf8 = (char *)RscMem::Malloc( (USHORT)nMaxUtf8Len ); rtl_TextToUnicodeConverter hConv = rtl_createUnicodeToTextConverter( RTL_TEXTENCODING_UTF8 ); @@ -354,7 +356,8 @@ char * RscChar::MakeUTF8FromL( char * pStr ) rtl_destroyUnicodeToTextConverter( hConv ); - delete pUniCode; + delete[] pUniCode; + return pUtf8; }; |