X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b7b750dd1ffd0d26b78728adb613b282a37c058..0becd470109886a71b5fb51c60f9842318eaeca9:/src/mac/printmac.cpp?ds=sidebyside diff --git a/src/mac/printmac.cpp b/src/mac/printmac.cpp index 426bd42de3..1240fd6622 100644 --- a/src/mac/printmac.cpp +++ b/src/mac/printmac.cpp @@ -29,6 +29,8 @@ #include "wx/msgdlg.h" #endif +#include "wx/mac/private.h" + #include "wx/mac/printmac.h" #include "wx/dcprint.h" #include "wx/printdlg.h" @@ -274,7 +276,7 @@ void wxMacPrintPreview::DetermineScaling(void) m_previewPrintout->SetPPIScreen( 72 , 72 ) ; m_previewPrintout->SetPPIPrinter( 72 , 72 ) ; - m_previewPrintout->SetPageSizeMM( 8 * 25.6 , 11 * 25.6 ) ; + m_previewPrintout->SetPageSizeMM( (int) (8.0 * 25.6), (int) (11.0 * 25.6) ); m_previewPrintout->SetPageSizePixels( 8 * 72 , 11 * 72 ) ; m_pageWidth = 8 * 72 ; m_pageHeight = 11 * 72 ; @@ -293,7 +295,10 @@ void wxMacPrintPreview::DetermineScaling(void) m_pageWidth = x ; m_pageHeight = y ; m_isOk = true ; - + } + else + { + m_isOk = false ; } // At 100%, the page should look about page-size on the screen. // m_previewScale = (float)((float)screenWidth/(float)printerWidth);