Autosyncing with Wine HEAD
[reactos.git] / reactos / dll / win32 / comdlg32 / comdlg32_ros.diff
1 Index: printdlg.c
2 ===================================================================
3 --- printdlg.c (revision 23123)
4 +++ printdlg.c (working copy)
5 @@ -352,7 +352,7 @@
6 lpdm->dmCollate =
7 (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED);
8 if (lpdm->dmFields & DM_COPIES)
9 - lpdm->dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
10 + lpdm->u.s.dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
11 } else {
12 if (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED)
13 lppd->Flags |= PD_COLLATE;
14 @@ -435,7 +435,7 @@
15 lpdm->dmCollate =
16 (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED);
17 if (lpdm->dmFields & DM_COPIES)
18 - lpdm->dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
19 + lpdm->u.s.dmCopies = GetDlgItemInt(hDlg, edt3, NULL, FALSE);
20 } else {
21 if (IsDlgButtonChecked(hDlg, chx2) == BST_CHECKED)
22 lppd->Flags |= PD_COLLATE;
23 @@ -600,9 +600,9 @@
24 Sel, 0);
25 if (dm) {
26 if (nIDComboBox == cmb2)
27 - dm->u1.s1.dmPaperSize = oldWord;
28 + dm->u.s.dmPaperSize = oldWord;
29 else
30 - dm->dmDefaultSource = oldWord;
31 + dm->u.s.dmDefaultSource = oldWord;
32 }
33 }
34 else {
35 @@ -612,9 +612,9 @@
36 */
37 if (dm) {
38 if (nIDComboBox == cmb2)
39 - oldWord = dm->u1.s1.dmPaperSize;
40 + oldWord = dm->u.s.dmPaperSize;
41 else
42 - oldWord = dm->dmDefaultSource;
43 + oldWord = dm->u.s.dmDefaultSource;
44 }
45 }
46
47 @@ -710,9 +710,9 @@
48 Sel, 0);
49 if (dm) {
50 if (nIDComboBox == cmb2)
51 - dm->u1.s1.dmPaperSize = oldWord;
52 + dm->u.s.dmPaperSize = oldWord;
53 else
54 - dm->dmDefaultSource = oldWord;
55 + dm->u.s.dmDefaultSource = oldWord;
56 }
57 }
58 else {
59 @@ -722,9 +722,9 @@
60 */
61 if (dm) {
62 if (nIDComboBox == cmb2)
63 - oldWord = dm->u1.s1.dmPaperSize;
64 + oldWord = dm->u.s.dmPaperSize;
65 else
66 - oldWord = dm->dmDefaultSource;
67 + oldWord = dm->u.s.dmDefaultSource;
68 }
69 }
70
71 @@ -974,7 +974,7 @@
72 if (lppd->hDevMode == 0)
73 copies = lppd->nCopies;
74 else
75 - copies = lpdm->dmCopies;
76 + copies = lpdm->u.s.dmCopies;
77 if(copies == 0) copies = 1;
78 else if(copies < 0) copies = MAX_COPIES;
79 SetDlgItemInt(hDlg, edt3, copies, FALSE);
80 @@ -996,7 +996,7 @@
81 ShowWindow(GetDlgItem(hDlg, chx1), SW_HIDE);
82
83 } else { /* PD_PRINTSETUP */
84 - BOOL bPortrait = (lpdm->u1.s1.dmOrientation == DMORIENT_PORTRAIT);
85 + BOOL bPortrait = (lpdm->u.s.dmOrientation == DMORIENT_PORTRAIT);
86
87 PRINTDLG_SetUpPaperComboBoxA(hDlg, cmb2,
88 PrintStructures->lpPrinterInfo->pPrinterName,
89 @@ -1123,7 +1123,7 @@
90 if (lppd->hDevMode == 0)
91 copies = lppd->nCopies;
92 else
93 - copies = lpdm->dmCopies;
94 + copies = lpdm->u.s.dmCopies;
95 if(copies == 0) copies = 1;
96 else if(copies < 0) copies = MAX_COPIES;
97 SetDlgItemInt(hDlg, edt3, copies, FALSE);
98 @@ -1145,7 +1145,7 @@
99 ShowWindow(GetDlgItem(hDlg, chx1), SW_HIDE);
100
101 } else { /* PD_PRINTSETUP */
102 - BOOL bPortrait = (lpdm->u1.s1.dmOrientation == DMORIENT_PORTRAIT);
103 + BOOL bPortrait = (lpdm->u.s.dmOrientation == DMORIENT_PORTRAIT);
104
105 PRINTDLG_SetUpPaperComboBoxW(hDlg, cmb2,
106 PrintStructures->lpPrinterInfo->pPrinterName,
107 @@ -1519,7 +1519,7 @@
108 case rad1: /* Paperorientation */
109 if (lppd->Flags & PD_PRINTSETUP)
110 {
111 - lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
112 + lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
113 SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
114 (LPARAM)(PrintStructures->hPortraitIcon));
115 }
116 @@ -1528,7 +1528,7 @@
117 case rad2: /* Paperorientation */
118 if (lppd->Flags & PD_PRINTSETUP)
119 {
120 - lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
121 + lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
122 SendDlgItemMessageA(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
123 (LPARAM)(PrintStructures->hLandscapeIcon));
124 }
125 @@ -1552,7 +1552,7 @@
126 {
127 DWORD Sel = SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0);
128 if(Sel != CB_ERR)
129 - lpdm->u1.s1.dmPaperSize = SendDlgItemMessageA(hDlg, cmb2,
130 + lpdm->u.s.dmPaperSize = SendDlgItemMessageA(hDlg, cmb2,
131 CB_GETITEMDATA,
132 Sel, 0);
133 }
134 @@ -1562,7 +1562,7 @@
135 {
136 DWORD Sel = SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0);
137 if(Sel != CB_ERR)
138 - lpdm->dmDefaultSource = SendDlgItemMessageA(hDlg, cmb3,
139 + lpdm->u.s.dmDefaultSource = SendDlgItemMessageA(hDlg, cmb3,
140 CB_GETITEMDATA, Sel,
141 0);
142 }
143 @@ -1573,8 +1573,8 @@
144 case rad1: /* orientation */
145 case rad2:
146 if (IsDlgButtonChecked(hDlg, rad1) == BST_CHECKED) {
147 - if(lpdm->u1.s1.dmOrientation != DMORIENT_PORTRAIT) {
148 - lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
149 + if(lpdm->u.s.dmOrientation != DMORIENT_PORTRAIT) {
150 + lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
151 SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
152 (WPARAM)IMAGE_ICON,
153 (LPARAM)PrintStructures->hPortraitIcon);
154 @@ -1583,8 +1583,8 @@
155 (LPARAM)PrintStructures->hPortraitIcon);
156 }
157 } else {
158 - if(lpdm->u1.s1.dmOrientation != DMORIENT_LANDSCAPE) {
159 - lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
160 + if(lpdm->u.s.dmOrientation != DMORIENT_LANDSCAPE) {
161 + lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
162 SendDlgItemMessageA(hDlg, stc10, STM_SETIMAGE,
163 (WPARAM)IMAGE_ICON,
164 (LPARAM)PrintStructures->hLandscapeIcon);
165 @@ -1683,7 +1683,7 @@
166 case rad1: /* Paperorientation */
167 if (lppd->Flags & PD_PRINTSETUP)
168 {
169 - lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
170 + lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
171 SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
172 (LPARAM)(PrintStructures->hPortraitIcon));
173 }
174 @@ -1692,7 +1692,7 @@
175 case rad2: /* Paperorientation */
176 if (lppd->Flags & PD_PRINTSETUP)
177 {
178 - lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
179 + lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
180 SendDlgItemMessageW(hDlg, ico1, STM_SETIMAGE, (WPARAM) IMAGE_ICON,
181 (LPARAM)(PrintStructures->hLandscapeIcon));
182 }
183 @@ -1716,7 +1716,7 @@
184 {
185 DWORD Sel = SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
186 if(Sel != CB_ERR)
187 - lpdm->u1.s1.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2,
188 + lpdm->u.s.dmPaperSize = SendDlgItemMessageW(hDlg, cmb2,
189 CB_GETITEMDATA,
190 Sel, 0);
191 }
192 @@ -1726,7 +1726,7 @@
193 {
194 DWORD Sel = SendDlgItemMessageW(hDlg, cmb3, CB_GETCURSEL, 0, 0);
195 if(Sel != CB_ERR)
196 - lpdm->dmDefaultSource = SendDlgItemMessageW(hDlg, cmb3,
197 + lpdm->u.s.dmDefaultSource = SendDlgItemMessageW(hDlg, cmb3,
198 CB_GETITEMDATA, Sel,
199 0);
200 }
201 @@ -1737,8 +1737,8 @@
202 case rad1: /* orientation */
203 case rad2:
204 if (IsDlgButtonChecked(hDlg, rad1) == BST_CHECKED) {
205 - if(lpdm->u1.s1.dmOrientation != DMORIENT_PORTRAIT) {
206 - lpdm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
207 + if(lpdm->u.s.dmOrientation != DMORIENT_PORTRAIT) {
208 + lpdm->u.s.dmOrientation = DMORIENT_PORTRAIT;
209 SendDlgItemMessageW(hDlg, stc10, STM_SETIMAGE,
210 (WPARAM)IMAGE_ICON,
211 (LPARAM)PrintStructures->hPortraitIcon);
212 @@ -1747,8 +1747,8 @@
213 (LPARAM)PrintStructures->hPortraitIcon);
214 }
215 } else {
216 - if(lpdm->u1.s1.dmOrientation != DMORIENT_LANDSCAPE) {
217 - lpdm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
218 + if(lpdm->u.s.dmOrientation != DMORIENT_LANDSCAPE) {
219 + lpdm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
220 SendDlgItemMessageW(hDlg, stc10, STM_SETIMAGE,
221 (WPARAM)IMAGE_ICON,
222 (LPARAM)PrintStructures->hLandscapeIcon);
223 @@ -2513,15 +2513,15 @@
224
225 /* Save paper orientation into device context */
226 if(pda->curdlg.ptPaperSize.x > pda->curdlg.ptPaperSize.y)
227 - dm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
228 + dm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
229 else
230 - dm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
231 + dm->u.s.dmOrientation = DMORIENT_PORTRAIT;
232
233 /* Save paper size into the device context */
234 paperword = SendDlgItemMessageA(hDlg,cmb2,CB_GETITEMDATA,
235 SendDlgItemMessageA(hDlg, cmb2, CB_GETCURSEL, 0, 0), 0);
236 if (paperword != CB_ERR)
237 - dm->u1.s1.dmPaperSize = paperword;
238 + dm->u.s.dmPaperSize = paperword;
239 else
240 FIXME("could not get dialog text for papersize cmbbox?\n");
241
242 @@ -2529,7 +2529,7 @@
243 paperword = SendDlgItemMessageA(hDlg,cmb1,CB_GETITEMDATA,
244 SendDlgItemMessageA(hDlg, cmb1, CB_GETCURSEL, 0, 0), 0);
245 if (paperword != CB_ERR)
246 - dm->dmDefaultSource = paperword;
247 + dm->u.s.dmDefaultSource = paperword;
248 else
249 FIXME("could not get dialog text for papersize cmbbox?\n");
250
251 @@ -2580,9 +2580,9 @@
252
253 /* Save orientation */
254 if (pda->dlga->ptPaperSize.x > pda->dlga->ptPaperSize.y)
255 - dm->u1.s1.dmOrientation = DMORIENT_LANDSCAPE;
256 + dm->u.s.dmOrientation = DMORIENT_LANDSCAPE;
257 else
258 - dm->u1.s1.dmOrientation = DMORIENT_PORTRAIT;
259 + dm->u.s.dmOrientation = DMORIENT_PORTRAIT;
260
261 GlobalUnlock(pda->pdlg.hDevNames);
262 GlobalUnlock(pda->pdlg.hDevMode);
263 @@ -2834,7 +2834,7 @@
264 case cmb3:
265 if(msg == CBN_SELCHANGE){
266 DEVMODEA *dm = GlobalLock(pda->pdlg.hDevMode);
267 - dm->dmDefaultSource = SendDlgItemMessageA(hDlg, cmb3,CB_GETITEMDATA,
268 + dm->u.s.dmDefaultSource = SendDlgItemMessageA(hDlg, cmb3,CB_GETITEMDATA,
269 SendDlgItemMessageA(hDlg, cmb3, CB_GETCURSEL, 0, 0), 0);
270 GlobalUnlock(pda->pdlg.hDevMode);
271 }
272 @@ -2857,10 +2857,10 @@
273 DM_IN_BUFFER | DM_OUT_BUFFER | DM_IN_PROMPT);
274 ClosePrinter(hPrinter);
275 /* Changing paper */
276 - PRINTDLG_PaperSizeA(&(pda->pdlg), dm->u1.s1.dmPaperSize, &(pda->curdlg.ptPaperSize));
277 + PRINTDLG_PaperSizeA(&(pda->pdlg), dm->u.s.dmPaperSize, &(pda->curdlg.ptPaperSize));
278 pda->curdlg.ptPaperSize.x = _c_10mm2size(pda->dlga, pda->curdlg.ptPaperSize.x);
279 pda->curdlg.ptPaperSize.y = _c_10mm2size(pda->dlga, pda->curdlg.ptPaperSize.y);
280 - if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE){
281 + if (dm->u.s.dmOrientation == DMORIENT_LANDSCAPE){
282 DWORD tmp = pda->curdlg.ptPaperSize.x;
283 pda->curdlg.ptPaperSize.x = pda->curdlg.ptPaperSize.y;
284 pda->curdlg.ptPaperSize.y = tmp;
285 @@ -2874,7 +2874,7 @@
286 count = SendDlgItemMessageA(hDlg, cmb2, CB_GETCOUNT, 0, 0);
287 if(count != CB_ERR){
288 for(i=0; i<count; ++i){
289 - if(SendDlgItemMessageA(hDlg, cmb2, CB_GETITEMDATA, i, 0) == dm->u1.s1.dmPaperSize) {
290 + if(SendDlgItemMessageA(hDlg, cmb2, CB_GETITEMDATA, i, 0) == dm->u.s.dmPaperSize) {
291 SendDlgItemMessageA(hDlg, cmb2, CB_SETCURSEL, i, 0);
292 break;
293 }
294 @@ -3180,7 +3180,7 @@
295 if(pda->dlga->hDevMode)
296 {
297 dm = GlobalLock(pda->dlga->hDevMode);
298 - if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE)
299 + if (dm->u.s.dmOrientation == DMORIENT_LANDSCAPE)
300 CheckRadioButton(hDlg, rad1, rad2, rad2);
301 else /* this is default if papersize is not set */
302 CheckRadioButton(hDlg, rad1, rad2, rad1);
303 @@ -3226,8 +3226,8 @@
304 PRINTDLG_PS_ChangePrinterA(hDlg, pda);
305 dm = GlobalLock(pda->pdlg.hDevMode);
306 if(dm){
307 - dm->dmDefaultSource = 15; /*FIXME: Automatic select. Does it always 15 at start? */
308 - PRINTDLG_PaperSizeA(&(pda->pdlg), dm->u1.s1.dmPaperSize, &pda->curdlg.ptPaperSize);
309 + dm->u.s.dmDefaultSource = 15; /*FIXME: Automatic select. Does it always 15 at start? */
310 + PRINTDLG_PaperSizeA(&(pda->pdlg), dm->u.s.dmPaperSize, &pda->curdlg.ptPaperSize);
311 GlobalUnlock(pda->pdlg.hDevMode);
312 pda->curdlg.ptPaperSize.x = _c_10mm2size(pda->dlga, pda->curdlg.ptPaperSize.x);
313 pda->curdlg.ptPaperSize.y = _c_10mm2size(pda->dlga, pda->curdlg.ptPaperSize.y);
314 @@ -3297,7 +3297,7 @@
315 {
316 dm = GlobalLock(pda->dlga->hDevMode);
317 /* Landscape orientation */
318 - if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE)
319 + if (dm->u.s.dmOrientation == DMORIENT_LANDSCAPE)
320 CheckRadioButton(hDlg, rad1, rad2, rad2);
321 else /* this is default if papersize is not set */
322 CheckRadioButton(hDlg, rad1, rad2, rad1);
323 @@ -3439,7 +3439,7 @@
324 setupdlg->hDevMode = pdlg.hDevMode;
325 setupdlg->hDevNames = pdlg.hDevNames;
326 dm = GlobalLock(pdlg.hDevMode);
327 - PRINTDLG_PaperSizeA(&pdlg, dm->u1.s1.dmPaperSize, &setupdlg->ptPaperSize);
328 + PRINTDLG_PaperSizeA(&pdlg, dm->u.s.dmPaperSize, &setupdlg->ptPaperSize);
329 GlobalUnlock(pdlg.hDevMode);
330 setupdlg->ptPaperSize.x=_c_10mm2size(setupdlg,setupdlg->ptPaperSize.x);
331 setupdlg->ptPaperSize.y=_c_10mm2size(setupdlg,setupdlg->ptPaperSize.y);