]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/printps.cpp
removed extremely user-unfriendly translations
[wxWidgets.git] / src / generic / printps.cpp
index adf67bf80fd0c85e80795b4fb370aaceeba86241..dfa661141641430f8d3387a8736870ea5c9e0706 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "wx/defs.h"
 
-#if wxUSE_PRINTING_ARCHITECTURE
+#if wxUSE_PRINTING_ARCHITECTURE && wxUSE_POSTSCRIPT
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
@@ -39,6 +39,7 @@
     #include "wx/msgdlg.h"
     #include "wx/intl.h"
     #include "wx/progdlg.h"
+    #include "wx/log.h"                                                                          
 #endif
 
 #include "wx/generic/printps.h"
@@ -56,7 +57,7 @@
 
     IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase)
     IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase)
-
+    
 // ============================================================================
 // implementation
 // ============================================================================
@@ -151,8 +152,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
     wxSize ScreenPixels = wxGetDisplaySize();
     wxSize ScreenMM = wxGetDisplaySizeMM();
 
-    printout->SetPPIScreen( (ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth(),
-                            (ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight() );
+    printout->SetPPIScreen( (int) ((ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth()),
+                            (int) ((ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight()) );
     printout->SetPPIPrinter( wxPostScriptDC::GetResolution(),
                              wxPostScriptDC::GetResolution() );
 
@@ -339,8 +340,8 @@ void wxPostScriptPrintPreview::DetermineScaling()
         wxSize ScreenPixels = wxGetDisplaySize();
         wxSize ScreenMM = wxGetDisplaySizeMM();
 
-        m_previewPrintout->SetPPIScreen( (ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth(),
-                                         (ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight() );
+        m_previewPrintout->SetPPIScreen( (int) ((ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth()),
+                                         (int) ((ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight()) );
         m_previewPrintout->SetPPIPrinter(wxPostScriptDC::GetResolution(), wxPostScriptDC::GetResolution()); 
 
         wxSize sizeDevUnits(paper->GetSizeDeviceUnits());