зеркало из https://github.com/mozilla/gecko-dev.git
[OS/2] Bug 396767: fix OS/2 build break in widget following bug 394691, p=wuno, r=me/chris@pearce
This commit is contained in:
Родитель
851b7a28ae
Коммит
6dd643f9d4
|
@ -157,7 +157,7 @@ PRBool nsClipboard::GetClipboardDataByID(ULONG ulFormatID, const char *aFlavor)
|
|||
PRInt32 bufLength;
|
||||
MultiByteToWideChar(0, static_cast<char*>(pDataMem), NumOfChars,
|
||||
buffer, bufLength);
|
||||
pDataMem = ToNewUnicode(nsDependentString(buffer.get()));
|
||||
pDataMem = ToNewUnicode(nsDependentString(buffer.Elements()));
|
||||
TempBufAllocated = PR_TRUE;
|
||||
NumOfBytes = bufLength * sizeof(UniChar);
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ void nsClipboard::SetClipboardData(const char *aFlavor)
|
|||
PRInt32 bufLength;
|
||||
WideCharToMultiByte(0, static_cast<PRUnichar*>(pMozData),
|
||||
NumOfBytes, buffer, bufLength);
|
||||
memcpy(pByteMem, buffer.get(), NumOfBytes);
|
||||
memcpy(pByteMem, buffer.Elements(), NumOfBytes);
|
||||
// With Warp4 copying more than 64K to the clipboard works well, but
|
||||
// legacy apps cannot always handle it. So output an alarm to alert the
|
||||
// user that there might be a problem.
|
||||
|
|
|
@ -472,7 +472,7 @@ nsresult GlobalPrinters::InitializeGlobalPrinters ()
|
|||
PRInt32 printerNameLength;
|
||||
rv = MultiByteToWideChar(0, printer, strlen(printer),
|
||||
printerName, printerNameLength);
|
||||
mGlobalPrinterList->AppendString(nsDependentString(printerName.get()));
|
||||
mGlobalPrinterList->AppendString(nsDependentString(printerName.Elements()));
|
||||
|
||||
// store printer description in prefs for the print dialog
|
||||
if (!prefFailed) {
|
||||
|
@ -509,7 +509,7 @@ void GlobalPrinters::GetDefaultPrinterName(PRUnichar*& aDefaultPrinterName)
|
|||
PRInt32 printerNameLength;
|
||||
MultiByteToWideChar(0, printer, strlen(printer), printerName,
|
||||
printerNameLength);
|
||||
aDefaultPrinterName = ToNewUnicode(nsDependentString(printerName.get()));
|
||||
aDefaultPrinterName = ToNewUnicode(nsDependentString(printerName.Elements()));
|
||||
|
||||
GlobalPrinters::GetInstance()->FreeGlobalPrinters();
|
||||
}
|
||||
|
|
|
@ -1742,7 +1742,7 @@ int UnicodeToCodepage(const nsAString& aString, char **aResult)
|
|||
PRInt32 bufLength;
|
||||
WideCharToMultiByte(0, PromiseFlatString(aString).get(), aString.Length(),
|
||||
buffer, bufLength);
|
||||
*aResult = ToNewCString(nsDependentCString(buffer.get()));
|
||||
*aResult = ToNewCString(nsDependentCString(buffer.Elements()));
|
||||
return bufLength;
|
||||
}
|
||||
|
||||
|
@ -1754,7 +1754,7 @@ int CodepageToUnicode(const nsACString& aString, PRUnichar **aResult)
|
|||
PRInt32 bufLength;
|
||||
MultiByteToWideChar(0, PromiseFlatCString(aString).get(),
|
||||
aString.Length(), buffer, bufLength);
|
||||
*aResult = ToNewUnicode(nsDependentString(buffer.get()));
|
||||
*aResult = ToNewUnicode(nsDependentString(buffer.Elements()));
|
||||
return bufLength;
|
||||
}
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval)
|
|||
PRInt32 bufLength;
|
||||
WideCharToMultiByte(0, typeWide.get(), typeWide.Length(),
|
||||
buffer, bufLength);
|
||||
apszTypeList[i] = ToNewCString(nsDependentCString(buffer.get()));
|
||||
apszTypeList[i] = ToNewCString(nsDependentCString(buffer.Elements()));
|
||||
}
|
||||
apszTypeList[i] = 0;
|
||||
filedlg.papszITypeList = (PAPSZ)apszTypeList;
|
||||
|
|
|
@ -1679,7 +1679,7 @@ NS_METHOD nsWindow::SetFont(const nsFont &aFont)
|
|||
|
||||
char *buffer = new char[fontnameLength + 6];
|
||||
if (buffer) {
|
||||
sprintf(buffer, "%d.%s", points, fontname.get());
|
||||
sprintf(buffer, "%d.%s", points, fontname.Elements());
|
||||
::WinSetPresParam(mWnd, PP_FONTNAMESIZE,
|
||||
strlen(buffer) + 1, buffer);
|
||||
delete [] buffer;
|
||||
|
@ -2530,7 +2530,7 @@ PRBool nsWindow::OnKey(MPARAM mp1, MPARAM mp2)
|
|||
PRInt32 bufLength;
|
||||
MultiByteToWideChar(0, (const char*)inbuf, 2, outbuf, bufLength);
|
||||
|
||||
pressEvent.charCode = outbuf.get()[0];
|
||||
pressEvent.charCode = outbuf[0];
|
||||
|
||||
if (pressEvent.isControl && !(fsFlags & (KC_VIRTUALKEY | KC_DEADKEY))) {
|
||||
if (!pressEvent.isShift && (pressEvent.charCode >= 'A' && pressEvent.charCode <= 'Z')) {
|
||||
|
@ -3596,15 +3596,15 @@ NS_METHOD nsWindow::SetTitle(const nsAString& aTitle)
|
|||
PRInt32 titleLength;
|
||||
WideCharToMultiByte(0, uchtemp, aTitle.Length(), title, titleLength);
|
||||
if (titleLength > MAX_TITLEBAR_LENGTH) {
|
||||
title.get()[MAX_TITLEBAR_LENGTH] = '\0';
|
||||
title[MAX_TITLEBAR_LENGTH] = '\0';
|
||||
}
|
||||
::WinSetWindowText(GetMainWindow(), title.get());
|
||||
::WinSetWindowText(GetMainWindow(), title.Elements());
|
||||
if (mChromeHidden) {
|
||||
/* If the chrome is hidden, set the text of the titlebar directly */
|
||||
if (mFrameWnd) {
|
||||
HWND hwndTitleBar = (HWND)::WinQueryProperty(mFrameWnd,
|
||||
"hwndTitleBar");
|
||||
::WinSetWindowText(hwndTitleBar, title.get());
|
||||
::WinSetWindowText(hwndTitleBar, title.Elements());
|
||||
}
|
||||
}
|
||||
nsMemory::Free(uchtemp);
|
||||
|
|
Загрузка…
Ссылка в новой задаче