summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-11-13 19:16:08 +0100
committerKurt Zenker <kz@openoffice.org>2009-11-13 19:16:08 +0100
commitde0356c665eb3fc168c4e8a168e3828d50992220 (patch)
treebf5e3c1b863412e41eca16570000b06c7b010cb2
parent02f6dbeae398c0735521c710a91c8e492941bc02 (diff)
parentd7b60d598deafab31002da002365debb853d6ec7 (diff)
CWS-TOOLING: integrate CWS cmcfixes66
Notes
split repo tag: libs-gui_ooo/DEV300_m65
-rw-r--r--i18npool/source/textconversion/genconv_dict.cxx12
-rw-r--r--svtools/source/svdde/ddeml1.cxx2
-rw-r--r--svtools/source/svdde/ddesvr.cxx2
-rw-r--r--tools/source/fsys/wntmsc.cxx2
-rw-r--r--tools/source/stream/strmunx.cxx2
-rw-r--r--vcl/os2/source/gdi/salgdi.cxx2
-rw-r--r--vcl/os2/source/window/salframe.cxx6
-rw-r--r--vcl/source/gdi/salmisc.cxx8
-rw-r--r--vcl/win/source/window/salframe.cxx26
9 files changed, 31 insertions, 31 deletions
diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx
index 23a264603df9..a49bf3031bbc 100644
--- a/i18npool/source/textconversion/genconv_dict.cxx
+++ b/i18npool/source/textconversion/genconv_dict.cxx
@@ -39,6 +39,8 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
+#include <vector>
+
using namespace ::rtl;
void make_hhc_char(FILE *sfp, FILE *cfp);
@@ -357,8 +359,8 @@ void make_stc_word(FILE *sfp, FILE *cfp)
{
sal_Int32 count, i, length;
sal_Unicode STC_WordData[0x10000];
- Index *STC_WordEntry_S2T = (Index*) malloc(0x10000 * sizeof(Index));
- Index *STC_WordEntry_T2S = (Index*) malloc(0x10000 * sizeof(Index));
+ std::vector<Index> STC_WordEntry_S2T(0x10000);
+ std::vector<Index> STC_WordEntry_T2S(0x10000);
sal_Int32 count_S2T = 0, count_T2S = 0;
sal_Int32 line = 0, char_total = 0;
sal_Char Cstr[1024];
@@ -416,7 +418,7 @@ void make_stc_word(FILE *sfp, FILE *cfp)
sal_uInt16 STC_WordIndex[0x100];
if (count_S2T > 0) {
- qsort(STC_WordEntry_S2T, count_S2T, sizeof(Index), Index_comp);
+ qsort(&STC_WordEntry_S2T[0], count_S2T, sizeof(Index), Index_comp);
fprintf(cfp, "\nstatic const sal_uInt16 STC_WordEntry_S2T[] = {");
count = 0;
@@ -449,7 +451,7 @@ void make_stc_word(FILE *sfp, FILE *cfp)
}
if (count_T2S > 0) {
- qsort(STC_WordEntry_T2S, count_T2S, sizeof(Index), Index_comp);
+ qsort(&STC_WordEntry_T2S[0], count_T2S, sizeof(Index), Index_comp);
fprintf(cfp, "\nstatic const sal_uInt16 STC_WordEntry_T2S[] = {");
count = 0;
@@ -480,7 +482,5 @@ void make_stc_word(FILE *sfp, FILE *cfp)
fprintf (cfp, "\tconst sal_uInt16* getSTC_WordEntry_T2S() { return NULL; }\n");
fprintf (cfp, "\tconst sal_uInt16* getSTC_WordIndex_T2S(sal_Int32& count) { count = 0; return NULL; }\n");
}
- free(STC_WordEntry_S2T);
- free(STC_WordEntry_T2S);
}
diff --git a/svtools/source/svdde/ddeml1.cxx b/svtools/source/svdde/ddeml1.cxx
index 6cc09b612ecf..4b8011627c7d 100644
--- a/svtools/source/svdde/ddeml1.cxx
+++ b/svtools/source/svdde/ddeml1.cxx
@@ -1089,7 +1089,7 @@ ImpService* ImpDdeMgr::PutService( HSZ hszService )
String aStr( (ULONG)hWndServer );
aStr += pBuf;
HSZ hszInstServ = DdeCreateStringHandle( (PSZ)(const char*)pBuf, 850 );
- delete pBuf;
+ delete [] pBuf;
pPtr->hBaseServName = hszService;
pPtr->hInstServName = hszInstServ;
diff --git a/svtools/source/svdde/ddesvr.cxx b/svtools/source/svdde/ddesvr.cxx
index a2124548b4c8..8c72c1713e90 100644
--- a/svtools/source/svdde/ddesvr.cxx
+++ b/svtools/source/svdde/ddesvr.cxx
@@ -190,7 +190,7 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback(
pInst->hDdeInstSvr, (LPBYTE) pPairs,
sizeof(HSZPAIR) * (nTopics+1),
0, NULL, nCbType, 0);
- delete pPairs;
+ delete [] pPairs;
return h;
}
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index 0e8e5ebc7918..153fbf37de2e 100644
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -91,7 +91,7 @@ struct dirent *readdir( DIR *pDir )
pDir->h = FindFirstFile( pBuf, &pDir->aDirEnt );
bOk = pDir->h != INVALID_HANDLE_VALUE;
pDir->p = NULL;
- delete pBuf;
+ delete [] pBuf;
}
else
pDir->h = INVALID_HANDLE_VALUE;
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 538c02e78fde..d27fe1f7f2c0 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -745,7 +745,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
aFileCopier.Execute();
}
}
- delete pBuf;
+ delete [] pBuf;
}
}
}
diff --git a/vcl/os2/source/gdi/salgdi.cxx b/vcl/os2/source/gdi/salgdi.cxx
index b6616eb3a24b..082e690c09e7 100644
--- a/vcl/os2/source/gdi/salgdi.cxx
+++ b/vcl/os2/source/gdi/salgdi.cxx
@@ -1016,7 +1016,7 @@ BOOL Os2SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void*
}
}
- delete pBuf;
+ delete [] pBuf;
return bRet;
}
diff --git a/vcl/os2/source/window/salframe.cxx b/vcl/os2/source/window/salframe.cxx
index 345573b268c3..5e4b843c7cff 100644
--- a/vcl/os2/source/window/salframe.cxx
+++ b/vcl/os2/source/window/salframe.cxx
@@ -3320,7 +3320,7 @@ static long ImplHandleIMEConversion( Os2SalFrame* pFrame, MPARAM nMP2Param )
if ( pBuf )
{
aEvt.maText = XubString( pBuf, (USHORT)nBufLen );
- delete pBuf;
+ delete [] pBuf;
if ( pAttrBuf )
{
USHORT nTextLen = aEvt.maText.Len();
@@ -3346,7 +3346,7 @@ static long ImplHandleIMEConversion( Os2SalFrame* pFrame, MPARAM nMP2Param )
}
aEvt.mpTextAttr = pSalAttrAry;
}
- delete pAttrBuf;
+ delete [] pAttrBuf;
}
if ( bLastCursor )
aEvt.mnCursorPos = aEvt.maText.Len();
@@ -3358,7 +3358,7 @@ static long ImplHandleIMEConversion( Os2SalFrame* pFrame, MPARAM nMP2Param )
// wieder zerstoeren
pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&aEvt );
if ( pSalAttrAry )
- delete pSalAttrAry;
+ delete [] pSalAttrAry;
}
else
pIMEData->mpReleaseIME( hWnd, hIMI );
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index fc24c0289b50..8b442086eabf 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -426,10 +426,10 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
// memory exception, clean up
// remark: the buffer ptr causing the exception
// is still NULL here
- delete pSrcScan;
- delete pDstScan;
- delete pMapX;
- delete pMapY;
+ delete[] pSrcScan;
+ delete[] pDstScan;
+ delete[] pMapX;
+ delete[] pMapY;
delete pDstBuffer;
return NULL;
}
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 78c4e4e6ddcc..53f822a1e409 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2158,15 +2158,15 @@ static void ImplSalToTop( HWND hWnd, USHORT nFlags )
if ( nFlags & SAL_FRAME_TOTOP_FOREGROUNDTASK )
{
- // This magic code is necessary to connect the input focus of the
- // current window thread and the thread which owns the window that
- // should be the new foreground window.
- HWND hCurrWnd = GetForegroundWindow();
- DWORD myThreadID = GetCurrentThreadId();
- DWORD currThreadID = GetWindowThreadProcessId(hCurrWnd,NULL);
- AttachThreadInput(myThreadID, currThreadID,TRUE);
- SetForegroundWindow(hWnd);
- AttachThreadInput(myThreadID,currThreadID,FALSE);
+ // This magic code is necessary to connect the input focus of the
+ // current window thread and the thread which owns the window that
+ // should be the new foreground window.
+ HWND hCurrWnd = GetForegroundWindow();
+ DWORD myThreadID = GetCurrentThreadId();
+ DWORD currThreadID = GetWindowThreadProcessId(hCurrWnd,NULL);
+ AttachThreadInput(myThreadID, currThreadID,TRUE);
+ SetForegroundWindow(hWnd);
+ AttachThreadInput(myThreadID,currThreadID,FALSE);
}
if ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN )
@@ -5436,7 +5436,7 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
WCHAR* pTextBuf = new WCHAR[nTextLen];
ImmGetCompositionStringW( hIMC, GCS_RESULTSTR, pTextBuf, nTextLen*sizeof( WCHAR ) );
aEvt.maText = XubString( reinterpret_cast<const xub_Unicode*>(pTextBuf), (xub_StrLen)nTextLen );
- delete pTextBuf;
+ delete [] pTextBuf;
}
aEvt.mnCursorPos = aEvt.maText.Len();
@@ -5462,7 +5462,7 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
WCHAR* pTextBuf = new WCHAR[nTextLen];
ImmGetCompositionStringW( hIMC, GCS_COMPSTR, pTextBuf, nTextLen*sizeof( WCHAR ) );
aEvt.maText = XubString( reinterpret_cast<const xub_Unicode*>(pTextBuf), (xub_StrLen)nTextLen );
- delete pTextBuf;
+ delete [] pTextBuf;
WIN_BYTE* pAttrBuf = NULL;
LONG nAttrLen = ImmGetCompositionStringW( hIMC, GCS_COMPATTR, 0, 0 );
@@ -5498,7 +5498,7 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
}
aEvt.mpTextAttr = pSalAttrAry;
- delete pAttrBuf;
+ delete [] pAttrBuf;
}
}
@@ -5535,7 +5535,7 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
}
if ( pSalAttrAry )
- delete pSalAttrAry;
+ delete [] pSalAttrAry;
}
return !bDef;