[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 1327
Date : Thu Jun 15 18:44:09 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/main3.cpp
M /Trunk/XaraLX/Kernel/view.cpp
M /Trunk/XaraLX/wxOil/Makefile.am
M /Trunk/XaraLX/wxOil/prncamvw.cpp
Printing work
Diff:
Index: Trunk/XaraLX/Kernel/view.cpp
===================================================================
--- Trunk/XaraLX/Kernel/view.cpp (revision 1326)
+++ Trunk/XaraLX/Kernel/view.cpp (revision 1327)
@@ -1802,13 +1802,7 @@
// Check to see if we do not do the first stage, - if not then we do the whole
// thing as a bitmap without bothering with the mask (becuase it's too much for
// most printer drivers to cope with).
- if (
-PORTNOTE("printing", "Force optimal mask")
-#ifndef EXCLUDE_FROM_XARALX
- (PrintMonitor::PrintMaskType==PrintMonitor::MASK_SIMPLE) &&
-#else
- (0) &&
-#endif
+ if ((PrintMonitor::PrintMaskType==PrintMonitor::MASK_SIMPLE) &&
(CCDC::GetType(pRender->GetRenderDC(), TRUE) != RENDERTYPE_PRINTER_PS))
{
FirstStageCount = 0;
@@ -2738,10 +2732,7 @@
BOOL PrintPaper)
{
// TRACEUSER( "Gerry", _T("View::RenderOptimalView
"));
-PORTNOTE("printing", "Force optimal mask")
-#ifndef EXCLUDE_FROM_XARALX
ERROR3IF(PrintMonitor::PrintMaskType!=PrintMonitor::MASK_OPTIMAL, "PrintMaskType must be OPTIMAL here
");
-#endif
// Find out what the host render region is capable of
RRCaps Caps;
@@ -3525,14 +3516,7 @@
BOOL bIsOnScreen = pRender->IS_KIND_OF(GRenderRegion);
// if the preference says we should not be in this function then call the other function
- if (!bIsOnScreen &&
-PORTNOTE("printing", "Force optimal mask")
-#ifndef EXCLUDE_FROM_XARALX
- PrintMonitor::PrintMaskType==PrintMonitor::MASK_OPTIMAL
-#else
- (1)
-#endif
- )
+ if (!bIsOnScreen && PrintMonitor::PrintMaskType==PrintMonitor::MASK_OPTIMAL)
return RenderOptimalView(pRender, ViewTrans, pSpread, PrintPaper);
// Find out what the host render region is capable of
@@ -3547,8 +3531,9 @@
// Work out whether we need to render all objects, or just the selected ones.
BOOL RenderAllObjects = TRUE;
+PORTNOTE("other", "disabled CCPrintInfo");
+#ifndef EXCLUDE_FROM_XARALX
#ifndef WEBSTER
-/*GAT
CCPrintInfo *pPrintInfo = NULL;
if (!bIsOnScreen && pRender->IsPrinting())
{
@@ -3560,9 +3545,8 @@
RenderAllObjects = (pPrCtrl->GetObjPrintRange() == PRINTRANGEOBJ_ALL);
}
}
-*/
#endif //webster
-
+#endif
// Create and set up a new Scanning render region
ScanningRenderRegion Scanner(pRender->IsPrinting());
@@ -3572,10 +3556,10 @@
{
// Now check the print method to determine if we need to do a three-pass render
// Get document pointer
-// Document* pDoc = GetDoc();
+ Document* pDoc = GetDoc();
// Get print information for this document.
-/*GAT PrintComponent *pPrint = (PrintComponent *) pDoc->GetDocComponent(CC_RUNTIME_CLASS(PrintComponent));
+ PrintComponent *pPrint = (PrintComponent *) pDoc->GetDocComponent(CC_RUNTIME_CLASS(PrintComponent));
if (pPrint)
{
PrintControl *pPrintControl = pPrint->GetPrintControl();
@@ -3587,7 +3571,7 @@
}
}
}
-*/ }
+ }
// Declare some useful vars before the scanning chunk
// Node* pFirstInkNode = NULL;
@@ -3610,11 +3594,14 @@
Scanner.SetHostRRCaps(Caps);
// WEBSTER-ranbirr-13/11/96
+PORTNOTE("other", "disabled CCPrintInfo");
+#ifndef EXCLUDE_FROM_XARALX
#ifndef WEBSTER
// We going to analyse the document
-//GAT if (pPrintInfo != NULL)
-// pPrintInfo->SetAnalysing();
+ if (pPrintInfo != NULL)
+ pPrintInfo->SetAnalysing();
#endif //webster
+#endif
// Find the first node to render
// pFirstInkNode = pSpread->FindFirstForUnclippedInkRender(&Scanner);
// Scanner.SetRenderState(pFirstInkNode);
@@ -3629,17 +3616,19 @@
}
// WEBSTER-ranbirr-13/11/96
+PORTNOTE("other", "disabled CCPrintInfo");
+#ifndef EXCLUDE_FROM_XARALX
#ifndef WEBSTER
// We going to print the document now
-//GAT
-// if (pPrintInfo != NULL)
-// pPrintInfo->SetPrinting();
+ if (pPrintInfo != NULL)
+ pPrintInfo->SetPrinting();
#endif //webster
+#endif
// Ok, we now have a Scanning render region that has all the info we need to know in it.
// See if there were any complex shapes in the region
// If we didn't do a scan then pretend there is one complex node
- //INT32 NumComplex = bDoScan ? Scanner.GetNumComplex() : 1;
+ /*INT32 NumComplex =*/ bDoScan ? Scanner.GetNumComplex() : 1;
// Oh well, there are complex shapes to draw, so we had better do the comlpex thing
@@ -3711,7 +3700,6 @@
// We always do it under NT, or to a PostScript printer or EPS file; under other conditions
// we are controlled by the printing preference.
BOOL DoMaskedBlit = FALSE;
-/*GAT
if (//IsWin32NT() ||
bIsOnScreen ||
(PrintMonitor::PrintMaskType==PrintMonitor::MASK_MASKED) ||
@@ -3720,7 +3708,6 @@
{
DoMaskedBlit = bDoScan; // Don't render simple phase if not scanning
}
-*/
SimplePrintRenderCallback MyCallback(this, pSpread, RenderAllObjects, &Scanner, DoMaskedBlit, PrintPaper, &NodesRendered, &Progress);
pRender->RenderTree(pSpread, FALSE, FALSE, &MyCallback);
@@ -3802,19 +3789,14 @@
BOOL bIsOnScreen = pHostRegion->IS_KIND_OF(GRenderRegion);
ERROR3IF(!bIsOnScreen &&
-PORTNOTE("printing", "Force optimal mask")
-#ifndef EXCLUDE_FROM_XARALX
PrintMonitor::PrintMaskType==PrintMonitor::MASK_OPTIMAL,
-#else
- 1,
-#endif
"PrintMaskType must be SIMPLE or MASKED here
");
// This needs to be done in 2 phases - one to create the bitmap we will blit into the
// host render region and one to create the mask to show us which parts of the bitmap
// need to be blitted. First we will create the bitmap to blit into the host.
// create the bitmap render region
- // CDC* pDC = pHostRegion->GetRenderDC();
+// CNativeDC* pDC = pHostRegion->GetRenderDC();
double Dpi;
if (bIsOnScreen)
@@ -3867,12 +3849,7 @@
BOOL DoMaskedBlit = FALSE;
if (//IsWin32NT() ||
bIsOnScreen ||
-PORTNOTE("printing", "Force optimal mask")
-#ifndef EXCLUDE_FROM_XARALX
(PrintMonitor::PrintMaskType==PrintMonitor::MASK_MASKED) ||
-#else
- (0) ||
-#endif
(CCDC::GetType(pHostRegion->GetRenderDC(), TRUE) == RENDERTYPE_PRINTER_PS) ||
IS_A(pHostRegion, CamelotEPSRenderRegion))
{
Index: Trunk/XaraLX/Kernel/main3.cpp
===================================================================
--- Trunk/XaraLX/Kernel/main3.cpp (revision 1326)
+++ Trunk/XaraLX/Kernel/main3.cpp (revision 1327)
@@ -147,7 +147,7 @@
#include "pathops.h"
#include "tunemem.h"
//#include "epsfiltr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
-//#include "prncamvw.h"
+#include "prncamvw.h"
//#include "oilruler.h"
//#include "registry.h"
#include "appstate.h"
@@ -244,9 +244,9 @@
InitDiagnosticPrefs() && // Get the diagnostic preferences
#endif
CCamView::ReadViewPrefs() &&
-#ifndef EXCLUDE_FROM_XARALX
PrintMonitor::InitPrefs() &&
+#ifndef EXCLUDE_FROM_XARALX
BaseBar::DeclarePreferences() &&
TransOperation::DeclarePrefs() &&
Index: Trunk/XaraLX/wxOil/Makefile.am
===================================================================
--- Trunk/XaraLX/wxOil/Makefile.am (revision 1326)
+++ Trunk/XaraLX/wxOil/Makefile.am (revision 1327)
@@ -36,7 +36,7 @@
fontbase.cpp ftfonts.cpp textfuns.cpp dragbmp.cpp xpoilflt.cpp xmlutils.cpp \
camprocess.cpp dropdown.cpp coldrop.cpp fontdrop.cpp bfxalu.cpp bfxpixop.cpp \
binreloc.c exceptio.cpp colpick.cpp dragpick.cpp sgldrag.cpp cctime.cpp \
- lddirect.cpp \
+ lddirect.cpp prncamvw.cpp \
resources.cpp
# Keep resources.cpp on a separate line as it is odd
Index: Trunk/XaraLX/wxOil/prncamvw.cpp
===================================================================
--- Trunk/XaraLX/wxOil/prncamvw.cpp (revision 1326)
+++ Trunk/XaraLX/wxOil/prncamvw.cpp (revision 1327)
@@ -132,6 +132,8 @@
// Make sure we don't already have a print job going.
if (CurrentPrintJob != NULL)
{
+PORTNOTE("printing", "Don't call ::AbortDoc")
+#ifndef EXCLUDE_FROM_XARALX
// Print job going already - must have been terminated early if the
// user has initiated another print job, so clean it up first.
if (::AbortDoc(CurrentPrintJob) <= 0)
@@ -140,6 +142,7 @@
CurrentPrintJob = NULL;
ERROR1(FALSE, _R(IDE_ALREADY_PRINTING));
}
+#endif
}
// Ok, starting a print job - keep a record of it.
@@ -155,6 +158,8 @@
BOOL PrintMonitor::IsPrintStatusOK()
{
+PORTNOTE("printing", "Disabled IsPrintStatusOK()")
+#ifndef EXCLUDE_FROM_XARALX
if (CCamApp::SeriousErrorCount == MySeriousErrorCount)
{
// We haven't had a serious error so any current print job will be
@@ -194,6 +199,7 @@
#endif //webster
// Re-enable print Operation, and return result to caller.
SetPrintingActive(FALSE);
+#endif
return TRUE;
}
@@ -276,6 +282,8 @@
BOOL PrintMonitor::PrintWithMask = TRUE;
PrintMonitor::MaskType PrintMonitor::PrintMaskType = MASK_OPTIMAL;
+PORTNOTE("printing", "Disabled lots of printing code")
+#ifndef EXCLUDE_FROM_XARALX
static RECT DriverBand;
static RECT TestBand;
@@ -1464,3 +1472,4 @@
}
#endif //webster
+#endif //EXCLUDE_FROM_XARALX
Xara