m_macPrintSettings = kPMNoPrintSettings;
#else
m_macPrintInfo = (THPrint) NewHandleClear( sizeof( TPrint ) ) ;
- (**m_macPrintInfo).iPrVersion = 0; // something invalid
+ (**m_macPrintInfo).iPrVersion = 0; // something invalid
(**m_macPrintInfo).prInfo.iHRes = 72;
(**m_macPrintInfo).prInfo.iVRes = 72;
Rect r2 = { -18, -36, 8*72 - 18, 11*72 - 36 } ;
(**m_macPrintInfo).rPaper = r2;
- (**m_macPrintInfo).prStl.iPageV = 11 * 120 ; // 11 inches in 120th of an inch
- (**m_macPrintInfo).prStl.iPageH = 8 * 120 ; // 8 inches in 120th of an inch
+ (**m_macPrintInfo).prStl.iPageV = 11 * 120 ; // 11 inches in 120th of an inch
+ (**m_macPrintInfo).prStl.iPageH = 8 * 120 ; // 8 inches in 120th of an inch
#endif
#endif
m_printOrientation = wxPORTRAIT;
}
#else
wxASSERT( m_macPrintInfo ) ;
- // we should perhaps delete
+ // we should perhaps delete
#endif
#endif
}
#ifndef __WXWINE__
//// Paper size
- if (devMode->dmFields & DM_PAPERSIZE)
+ // We don't know size of user defined paper and some buggy drivers
+ // set both DM_PAPERSIZE and DM_PAPERWIDTH & DM_PAPERLENGTH. Since
+ // dmPaperSize >= DMPAPER_USER wouldn't be in wxWin's database, this
+ // code wouldn't set m_paperSize correctly.
+ if ((devMode->dmFields & DM_PAPERSIZE) && (devMode->dmPaperSize < DMPAPER_USER))
{
if (wxThePrintPaperDatabase)
{
m_printData.SetNativeDataDevNames((void*) NULL);
pd->hDC = (HDC) NULL;
- pd->nFromPage = (UINT)m_printFromPage;
- pd->nToPage = (UINT)m_printToPage;
- pd->nMinPage = (UINT)m_printMinPage;
- pd->nMaxPage = (UINT)m_printMaxPage;
- pd->nCopies = (UINT)m_printNoCopies;
+ pd->nFromPage = (WORD)m_printFromPage;
+ pd->nToPage = (WORD)m_printToPage;
+ pd->nMinPage = (WORD)m_printMinPage;
+ pd->nMaxPage = (WORD)m_printMaxPage;
+ pd->nCopies = (WORD)m_printNoCopies;
pd->Flags = PD_RETURNDC ;
if ( m_printAllPages )
pd->Flags |= PD_ALLPAGES;
- if ( m_printAllPages )
+ if ( m_printSelection )
pd->Flags |= PD_SELECTION;
if ( m_printCollate )
pd->Flags |= PD_COLLATE;