зеркало из https://github.com/mozilla/pjs.git
argh, more bustage fixing - applying my original patch, which somehow never made the first landing
This commit is contained in:
Родитель
dd0533d318
Коммит
97fe36ece7
|
@ -400,13 +400,13 @@ void nsMacControl::StringToStr255(const nsString& aText, Str255& aStr255)
|
|||
|
||||
// get file system charset and create a unicode encoder
|
||||
if (nsnull == mUnicodeEncoder) {
|
||||
nsAutoString fileSystemCharset;
|
||||
nsCAutoString fileSystemCharset;
|
||||
GetFileSystemCharset(fileSystemCharset);
|
||||
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = ccm->GetUnicodeEncoder(&fileSystemCharset, &mUnicodeEncoder);
|
||||
rv = ccm->GetUnicodeEncoderRaw(fileSystemCharset.get(), &mUnicodeEncoder);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = mUnicodeEncoder->SetOutputErrorBehavior(nsIUnicodeEncoder::kOnError_Replace, nsnull, (PRUnichar)'?');
|
||||
}
|
||||
|
@ -442,13 +442,13 @@ void nsMacControl::Str255ToString(const Str255& aStr255, nsString& aText)
|
|||
|
||||
// get file system charset and create a unicode encoder
|
||||
if (nsnull == mUnicodeDecoder) {
|
||||
nsAutoString fileSystemCharset;
|
||||
nsCAutoString fileSystemCharset;
|
||||
GetFileSystemCharset(fileSystemCharset);
|
||||
|
||||
nsCOMPtr<nsICharsetConverterManager> ccm =
|
||||
do_GetService(kCharsetConverterManagerCID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = ccm->GetUnicodeDecoder(&fileSystemCharset, &mUnicodeDecoder);
|
||||
rv = ccm->GetUnicodeDecoderRaw(fileSystemCharset.get(), &mUnicodeDecoder);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -608,9 +608,9 @@ void nsMacControl::SetupMacControlFontForScript(short theScript)
|
|||
//
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
void nsMacControl::GetFileSystemCharset(nsString & fileSystemCharset)
|
||||
void nsMacControl::GetFileSystemCharset(nsCString & fileSystemCharset)
|
||||
{
|
||||
static nsAutoString aCharset;
|
||||
static nsCAutoString aCharset;
|
||||
nsresult rv;
|
||||
|
||||
if (aCharset.IsEmpty()) {
|
||||
|
@ -620,7 +620,7 @@ void nsMacControl::GetFileSystemCharset(nsString & fileSystemCharset)
|
|||
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "error getting platform charset");
|
||||
if (NS_FAILED(rv))
|
||||
aCharset.Assign(NS_LITERAL_STRING("x-mac-roman"));
|
||||
aCharset.Assign(NS_LITERAL_CSTRING("x-mac-roman"));
|
||||
}
|
||||
fileSystemCharset = aCharset;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ protected:
|
|||
void ControlChanged(PRInt32 aNewValue);
|
||||
void NSStringSetControlTitle(ControlHandle theControl, nsString title);
|
||||
void SetupMacControlFontForScript(short theScript);
|
||||
static void GetFileSystemCharset(nsString & fileSystemCharset);
|
||||
static void GetFileSystemCharset(nsCString & fileSystemCharset);
|
||||
|
||||
nsString mLabel;
|
||||
PRBool mWidgetArmed;
|
||||
|
|
Загрузка…
Ссылка в новой задаче