From 8b10dd2a8daed738527f92aa89104c8647e4535c Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 14 Jan 2009 14:42:38 +0000 Subject: [PATCH] comdlg32: We no longer need to update the dialog struct on exit as all of the information is up to date. --- dlls/comdlg32/printdlg.c | 49 ---------------------------------------- 1 file changed, 49 deletions(-) diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index 9669394aac7..c7e7d603edc 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -2568,53 +2568,6 @@ end: return retval; } -/**************************************************************************** - * PRINTDLG_PS_UpdateDlgStructA - * - * Updates pda->dlga structure - * Function calls when user presses OK button - * - * PARAMS - * hDlg [in] main window dialog HANDLE - * pda [in/out] ptr to PageSetupDataA structure - * - * RETURNS - * TRUE - */ -static BOOL -PRINTDLG_PS_UpdateDlgStructA(HWND hDlg, PageSetupDataA *pda) { - DEVMODEA *dm; - DWORD paperword; - - dm = GlobalLock(pda->dlga->hDevMode); - - /* Save paper orientation into device context */ - if(pda->dlga->ptPaperSize.x > pda->dlga->ptPaperSize.y) - dm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE; - else - dm->u1.s1.dmOrientation = DMORIENT_PORTRAIT; - - /* Save paper size into the device context */ - paperword = SendDlgItemMessageA(hDlg,cmb2,CB_GETITEMDATA, - SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0), 0); - if (paperword != CB_ERR) - dm->u1.s1.dmPaperSize = paperword; - else - FIXME("could not get dialog text for papersize cmbbox?\n"); - - /* Save paper source into the device context */ - paperword = SendDlgItemMessageA(hDlg,cmb1,CB_GETITEMDATA, - SendDlgItemMessageA(hDlg, cmb1, CB_GETCURSEL, 0, 0), 0); - if (paperword != CB_ERR) - dm->u1.s1.dmDefaultSource = paperword; - else - FIXME("could not get dialog text for papersize cmbbox?\n"); - - GlobalUnlock(pda->dlga->hDevMode); - - return TRUE; -} - static BOOL PRINTDLG_PS_UpdateDlgStructW(HWND hDlg, PageSetupDataW *pdw) { DEVNAMES *dn; @@ -2898,8 +2851,6 @@ PRINTDLG_PS_WMCommandA( LOWORD(lParam),wParam,lParam); switch (id) { case IDOK: - if (!PRINTDLG_PS_UpdateDlgStructA(hDlg, pda)) - return(FALSE); EndDialog(hDlg, TRUE); return TRUE ;