From: Václav Slavík Date: Tue, 15 May 2001 22:04:27 +0000 (+0000) Subject: applied patch that fixes paper size handling under MSW and sets PD_SELECTION correctly X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8084a109b624b293efe7c9f9567083b4cfb3daed applied patch that fixes paper size handling under MSW and sets PD_SELECTION correctly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 741840dc8a..de57dda478 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -589,7 +589,11 @@ void wxPrintData::ConvertFromNative() #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) { @@ -942,7 +946,7 @@ void wxPrintDialogData::ConvertToNative() if ( m_printAllPages ) pd->Flags |= PD_ALLPAGES; - if ( m_printAllPages ) + if ( m_printSelection ) pd->Flags |= PD_SELECTION; if ( m_printCollate ) pd->Flags |= PD_COLLATE;