diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-23 16:59:33 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-23 16:59:33 +0100 |
commit | 932fb7b958f8e7204275cb709965b30e390c76ad (patch) | |
tree | 75f695663a97693416f8a84e140fa61805cf5bd2 /rsc | |
parent | bb54b94e5f48c4f6dce72f59dc6bc83f17d2c590 (diff) | |
parent | 78f80b020fe009bc48e9e5f8b7862de51f1f8381 (diff) |
Merge commit 'ooo/DEV300_m103'
Conflicts:
cppcanvas/source/mtfrenderer/implrenderer.cxx
dtrans/source/win32/dtobj/XTDataObject.cxx
dtrans/source/win32/dtobj/XTDataObject.hxx
sot/source/sdstor/stgio.cxx
tools/source/debug/debug.cxx
vcl/source/gdi/jobset.cxx
vcl/unx/kde4/KDEData.cxx
vcl/unx/kde4/KDEData.hxx
vcl/unx/kde4/KDESalDisplay.cxx
vcl/unx/kde4/KDESalFrame.cxx
vcl/unx/kde4/KDESalFrame.hxx
vcl/unx/kde4/KDESalGraphics.cxx
vcl/unx/kde4/KDESalGraphics.hxx
vcl/unx/kde4/KDESalInstance.cxx
vcl/unx/kde4/KDESalInstance.hxx
vcl/unx/kde4/KDEXLib.cxx
vcl/unx/kde4/VCLKDEApplication.cxx
vcl/unx/kde4/VCLKDEApplication.hxx
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/source/rscpp/cpp4.c | 2 | ||||
-rw-r--r-- | rsc/source/tools/rscchar.cxx | 16 |
2 files changed, 8 insertions, 10 deletions
diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index fe7de9156cb6..3f5e03a0b5b7 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -626,7 +626,7 @@ void dumpparm(char* why) nargs, parmp - parm, why); for (i = 0; i < nargs; i++) { fprintf( pCppOut, "parm[%d] (%d) = \"%s\"\n", - i + 1, strlen(parlist[i]), parlist[i]); + i + 1, (int)strlen(parlist[i]), parlist[i]); } } #endif diff --git a/rsc/source/tools/rscchar.cxx b/rsc/source/tools/rscchar.cxx index 3031ff668bb8..f110a260de27 100644 --- a/rsc/source/tools/rscchar.cxx +++ b/rsc/source/tools/rscchar.cxx @@ -52,13 +52,13 @@ *************************************************************************/ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) { - sal_Size nMaxUniCodeBuf = strlen( pStr ) + 1; - char * pOrgStr = new char[ nMaxUniCodeBuf ]; - sal_uInt32 nOrgLen = 0; - + sal_Size nMaxUniCodeBuf = strlen( pStr ) + 1; if( nMaxUniCodeBuf * 6 > 0x0FFFFF ) RscExit( 10 ); + char * pOrgStr = new char[ nMaxUniCodeBuf ]; + sal_uInt32 nOrgLen = 0; + char cOld = '1'; while( cOld != 0 ) { @@ -116,9 +116,8 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) } if( nChar > 255 ) { - rtl_freeMemory( pOrgStr ); - // Wert zu gross, oder kein 3 Ziffern + delete [] pOrgStr; return( NULL ); } c = (char)nChar; @@ -171,6 +170,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) &nSrcCvtBytes ); rtl_destroyTextToUnicodeConverter( hConv ); + delete[] pOrgStr, pOrgStr = 0; hConv = rtl_createUnicodeToTextConverter( RTL_TEXTENCODING_UTF8 ); // factor fo 6 is the maximum size of an UNICODE character as utf8 @@ -185,9 +185,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) &nSrcCvtBytes ); rtl_destroyTextToUnicodeConverter( hConv ); - - delete[] pUniCode; - delete[] pOrgStr; + delete[] pUniCode, pUniCode = 0; return pUtf8; }; |