зеркало из https://github.com/mozilla/pjs.git
pass back the proper errors codes, instead of just a null devspec
Bug 101514 r=karnazr sr=kin
This commit is contained in:
Родитель
0b78a419e6
Коммит
eefec1d22c
|
@ -573,6 +573,8 @@ NS_IMETHODIMP nsDeviceContextSpecFactoryWin :: CreateDeviceContextSpec(nsIWidget
|
||||||
prntdlg.Flags = PD_ALLPAGES | PD_RETURNDEFAULT | PD_RETURNIC | PD_USEDEVMODECOPIESANDCOLLATE;
|
prntdlg.Flags = PD_ALLPAGES | PD_RETURNDEFAULT | PD_RETURNIC | PD_USEDEVMODECOPIESANDCOLLATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rv = NS_ERROR_FAILURE; // reset
|
||||||
|
|
||||||
BOOL result = ::PrintDlg(&prntdlg);
|
BOOL result = ::PrintDlg(&prntdlg);
|
||||||
|
|
||||||
if (TRUE == result){
|
if (TRUE == result){
|
||||||
|
@ -670,6 +672,9 @@ NS_IMETHODIMP nsDeviceContextSpecFactoryWin :: CreateDeviceContextSpec(nsIWidget
|
||||||
::GlobalUnlock(prntdlg.hDevNames);
|
::GlobalUnlock(prntdlg.hDevNames);
|
||||||
::GlobalFree(prntdlg.hDevNames);
|
::GlobalFree(prntdlg.hDevNames);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// print dialog aborted
|
||||||
|
rv = NS_ERROR_ABORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче