[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1454
Date       : Mon Jul 17 12:52:53 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/printctl.cpp
   M /Trunk/XaraLX/wxOil/grndrgn.cpp

Make landscape printing etc. work


Diff:
Index: Trunk/XaraLX/Kernel/printctl.cpp
===================================================================
--- Trunk/XaraLX/Kernel/printctl.cpp	(revision 1453)
+++ Trunk/XaraLX/Kernel/printctl.cpp	(revision 1454)
@@ -114,7 +114,7 @@
 //#include "justin2.h"
 //#include "markn.h"
 #include "osrndrgn.h"
-//#include "prdlgctl.h"
+#include "prdlgctl.h"
 #include "princomp.h"
 #include "printctl.h"
 #include "prntview.h"
@@ -439,8 +439,6 @@
 		Str += TempStr;
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
-PORTNOTE("printing", "Disabled Use of CCPrintDialog")
-#ifndef EXCLUDE_FROM_XARALX
 		INT32 PrScale;
 		if (CCPrintDialog::GetScale(&PrScale))
 		{
@@ -454,7 +452,6 @@
 				Str += s;
 			}
 		}
-#endif
 #endif //webster
 		pDimScale->SetActiveState(ActiveState);
 	}
@@ -621,22 +618,20 @@
 
 BOOL PrintControl::CalcPrintAreaVars(BOOL RedrawPrintBorders)
 {
-PORTNOTE("printing", "Disabled Use of CCPrintDialog")
-#ifndef EXCLUDE_FROM_XARALX
 	// Calc the print area origin
 	Origin.x = TotalPrintArea.lo.x;
 	Origin.y = TotalPrintArea.hi.y;
 
 	//-------------------------
 	// Find out the dimensions of the printer's paper (in MILLIPOINTS)
-	SIZEL PaperSize;
+	wxSize PaperSize;
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER
 	if (!CCPrintDialog::GetPaperSize(&PaperSize, RedrawPrintBorders))
 		return FALSE;
 #endif //webster
-	PaperWidth  = PaperSize.cx;
-	PaperHeight = PaperSize.cy;
+	PaperWidth  = PaperSize.GetWidth();
+	PaperHeight = PaperSize.GetHeight();
 
 	// ------------------------
 	// Get the printable area on the paper (defined relative to a origin at the bottom left of paper)
@@ -665,7 +660,6 @@
 	if (Orient == PRINTORIENTATION_SIDEWAYS)
 		Swap(PageWidth,PageHeight);
 
-#endif
 	return TRUE;
 }
 
@@ -1588,12 +1582,9 @@
 		// Set up the local variable to the max auto dpi!
 		INT32 PrinterDPI = MAXAUTOBITMAPDPI;
 
-PORTNOTE("printing", "Disabled Use of CCPrintDialog")
-#ifndef EXCLUDE_FROM_XARALX
 		// Get the printer resolution (if this fails, choose the maximum setting)
 		if (!CCPrintDialog::GetResolution(&PrinterDPI))
 			PrinterDPI = MAXAUTOBITMAPDPI; // Failing could change the variable so reset it!
-#endif
 
 		// Make the DPI half the printer res
 		DotsPerInch = PrinterDPI >> 1;
@@ -1762,15 +1753,12 @@
 BOOL PrintControl::CalcNumPaper()
 {
 	BOOL CanMultiCopy=TRUE;
-PORTNOTE("printing", "Disabled Use of CCPrintDialog")
-#ifndef EXCLUDE_FROM_XARALX
 //	WEBSTER-ranbirr-13/11/96
 #ifndef WEBSTER	
 	// Can the printer do multiple copies?
 	if (!CCPrintDialog::CanMultiCopy(&CanMultiCopy))
 		return FALSE;
 #endif //webster
-#endif
 	INT32 NumActualPiecesOfPaper = NumPrintablePages * NumCopies;	// Num pieces of paper that will come out of printer
 
 	// NumPaper will be the number of pieces of paper we will print to
Index: Trunk/XaraLX/wxOil/grndrgn.cpp
===================================================================
--- Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1453)
+++ Trunk/XaraLX/wxOil/grndrgn.cpp	(revision 1454)
@@ -190,7 +190,7 @@
 #include "clipattr.h"	// so we know what a ClipRegionAttribute is.
 
 #include "maskedrr.h"
-//GAT #include "prdlgctl.h"
+#include "prdlgctl.h"
 
 #include "camprofile.h"
 #include "fillattr2.h"
@@ -5830,12 +5830,7 @@
 						}
 #endif
 						// Now check what sort of printer we have to get the RenderRegion Caps correct
-PORTNOTE("printing", "Assume postscript")
-#ifndef EXCLUDE_FROM_XARALX
 						UINT32 PrintType = CCPrintDialog::IsPostscript() ? 2 : 1;
-#else
-						UINT32 PrintType = 2;
-#endif
 						pRegion->SetSimulatePrinting(PrintType);
 					}
 				}


Xara