Clean up. Renamed spool_file to spoolFile.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31521 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer
2009-07-11 14:37:11 +00:00
parent a365e1cfbb
commit 504033fbbe
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ public:
GraphicsDriver(BMessage *, PrinterData *, const PrinterCap *); GraphicsDriver(BMessage *, PrinterData *, const PrinterCap *);
virtual ~GraphicsDriver(); virtual ~GraphicsDriver();
const JobData *getJobData(BFile *spoolFile); const JobData *getJobData(BFile *spoolFile);
BMessage *takeJob(BFile *spool, uint32 flags = 0); BMessage *takeJob(BFile *spoolFile, uint32 flags = 0);
static BPoint getScale(int32 nup, BRect physicalRect, float scaling); static BPoint getScale(int32 nup, BRect physicalRect, float scaling);
static BPoint getOffset(int32 nup, int index, JobData::Orientation orientation, const BPoint *scale, static BPoint getOffset(int32 nup, int index, JobData::Orientation orientation, const BPoint *scale,
BRect scaledPhysicalRect, BRect scaledPrintableRect, BRect physicalRect); BRect scaledPhysicalRect, BRect scaledPrintableRect, BRect physicalRect);
+10 -10
View File
@@ -67,7 +67,7 @@ static BRect RotateRect(BRect rect)
} }
bool bool
GraphicsDriver::setupData(BFile *spool_file) GraphicsDriver::setupData(BFile *spoolFile)
{ {
if (fOrgJobData != NULL) { if (fOrgJobData != NULL) {
// already initialized // already initialized
@@ -79,8 +79,8 @@ GraphicsDriver::setupData(BFile *spool_file)
#else #else
BPrintJob::print_file_header pfh; BPrintJob::print_file_header pfh;
#endif #endif
spool_file->Seek(0, SEEK_SET); spoolFile->Seek(0, SEEK_SET);
spool_file->Read(&pfh, sizeof(pfh)); spoolFile->Read(&pfh, sizeof(pfh));
DBGMSG(("print_file_header::version = 0x%x\n", pfh.version)); DBGMSG(("print_file_header::version = 0x%x\n", pfh.version));
DBGMSG(("print_file_header::page_count = %d\n", pfh.page_count)); DBGMSG(("print_file_header::page_count = %d\n", pfh.page_count));
@@ -93,7 +93,7 @@ GraphicsDriver::setupData(BFile *spool_file)
fPageCount = (uint32) pfh.page_count; fPageCount = (uint32) pfh.page_count;
BMessage *msg = new BMessage(); BMessage *msg = new BMessage();
msg->Unflatten(spool_file); msg->Unflatten(spoolFile);
fOrgJobData = new JobData(msg, fPrinterCap, JobData::kJobSettings); fOrgJobData = new JobData(msg, fPrinterCap, JobData::kJobSettings);
DUMP_BMESSAGE(msg); DUMP_BMESSAGE(msg);
delete msg; delete msg;
@@ -123,7 +123,7 @@ GraphicsDriver::setupData(BFile *spool_file)
fInternalCopies = 1; fInternalCopies = 1;
} }
fSpoolMetaData = new SpoolMetaData(spool_file); fSpoolMetaData = new SpoolMetaData(spoolFile);
return true; return true;
} }
@@ -548,10 +548,10 @@ GraphicsDriver::getJobData(BFile *spoolFile)
} }
bool bool
GraphicsDriver::printJob(BFile *spool_file) GraphicsDriver::printJob(BFile *spoolFile)
{ {
bool success = true; bool success = true;
if (!setupData(spool_file)) { if (!setupData(spoolFile)) {
// silently exit if there is nothing to print // silently exit if there is nothing to print
return true; return true;
} }
@@ -563,7 +563,7 @@ GraphicsDriver::printJob(BFile *spool_file)
} else if (!fTransport->is_print_to_file_canceled()) { } else if (!fTransport->is_print_to_file_canceled()) {
BStopWatch stopWatch("printJob", !MEASURE_PRINT_JOB_TIME); BStopWatch stopWatch("printJob", !MEASURE_PRINT_JOB_TIME);
setupBitmap(); setupBitmap();
SpoolData spool_data(spool_file, fPageCount, fOrgJobData->getNup(), fOrgJobData->getReverse()); SpoolData spool_data(spoolFile, fPageCount, fOrgJobData->getNup(), fOrgJobData->getReverse());
success = startDoc(); success = startDoc();
if (success) { if (success) {
fStatusWindow = new StatusWindow( fStatusWindow = new StatusWindow(
@@ -604,11 +604,11 @@ GraphicsDriver::printJob(BFile *spool_file)
} }
BMessage * BMessage *
GraphicsDriver::takeJob(BFile* spool_file, uint32 flags) GraphicsDriver::takeJob(BFile* spoolFile, uint32 flags)
{ {
fFlags = flags; fFlags = flags;
BMessage *msg; BMessage *msg;
if (printJob(spool_file)) { if (printJob(spoolFile)) {
msg = new BMessage('okok'); msg = new BMessage('okok');
} else { } else {
msg = new BMessage('baad'); msg = new BMessage('baad');