From d71b43eb8ee00317fe3fd64a6d9aeaef1b4616d2 Mon Sep 17 00:00:00 2001 From: jp Date: Fri, 8 Feb 2002 11:06:44 +0000 Subject: Bug #97378#: add needed context information for the conversation routine --- sw/source/filter/ascii/parasc.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sw/source/filter/ascii/parasc.cxx') diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index e93f16d46bfd..6b0c9ca6cf63 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: parasc.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: jp $ $Date: 2001-11-13 13:47:41 $ + * last change: $Author: jp $ $Date: 2002-02-08 12:06:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -714,6 +714,7 @@ ULONG SwASCIIParser::ReadChars() BOOL bSwapUnicode; rtl_TextToUnicodeConverter hConverter; + rtl_TextToUnicodeContext hContext; if( RTL_TEXTENCODING_UCS2 != rOpt.GetCharSet() ) { hConverter = rtl_createTextToUnicodeConverter( rOpt.GetCharSet() ); @@ -721,6 +722,7 @@ ULONG SwASCIIParser::ReadChars() if( !hConverter ) return ERR_W4W_DLL_ERROR | ERROR_SW_READ_BASE; bSwapUnicode = FALSE; + hContext = rtl_createTextToUnicodeContext( hConverter ); } else { @@ -751,7 +753,7 @@ ULONG SwASCIIParser::ReadChars() sal_Size nNewLen = lGCount, nCntBytes; sal_Unicode* pBuf = sWork.AllocBuffer( nNewLen ); - nNewLen = rtl_convertTextToUnicode( hConverter, 0, + nNewLen = rtl_convertTextToUnicode( hConverter, hContext, pArr, lGCount, pBuf, nNewLen, ( RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_DEFAULT | @@ -915,8 +917,10 @@ ULONG SwASCIIParser::ReadChars() } while( TRUE ); if( hConverter ) + { rtl_destroyTextToUnicodeConverter( hConverter ); - + rtl_destroyTextToUnicodeContext( hConverter, hContext ); + } return 0; } -- cgit v1.2.3