From e1656f01aef3ba51a5115dfd33162bc961e96d5b Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Sun, 23 Mar 2008 16:17:52 +0000 Subject: [PATCH] * build fix, removed leftover debug var... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24533 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/print/PrintJobReader.h | 21 +++++++++++---------- src/add-ons/print/shared/PrintJobReader.cpp | 17 ++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/headers/private/print/PrintJobReader.h b/headers/private/print/PrintJobReader.h index 29b9ec82a5..0263ac9ff3 100644 --- a/headers/private/print/PrintJobReader.h +++ b/headers/private/print/PrintJobReader.h @@ -2,11 +2,11 @@ PrintJobReader -Copyright (c) 2002 OpenBeOS. +Copyright (c) 2002 OpenBeOS. -Author: +Author: Michael Pfeiffer - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to @@ -32,6 +32,7 @@ THE SOFTWARE. #include #include +#include class PrintJobPage { BFile fJobFile; // the job file @@ -39,17 +40,17 @@ class PrintJobPage { int32 fNumberOfPictures; // of this page int32 fPicture; // the picture returned by NextPicture() status_t fStatus; - + public: PrintJobPage(); PrintJobPage(const PrintJobPage& copy); PrintJobPage(BFile* jobFile, off_t start); status_t InitCheck() const; - + int32 NumberOfPictures() const { return fNumberOfPictures; } - + status_t NextPicture(BPicture& picture, BPoint& p, BRect& r); - + PrintJobPage& operator=(const PrintJobPage& copy); }; @@ -65,10 +66,10 @@ class PrintJobReader { public: PrintJobReader(BFile* jobFile); virtual ~PrintJobReader(); - + // test after construction if this is a valid job file status_t InitCheck() const; - + // accessors to informations from job file int32 NumberOfPages() const { return fNumberOfPages; } int32 FirstPage() const { return fFirstPage; } @@ -78,7 +79,7 @@ public: BRect PrintableRect() const; void GetResolution(int32 *xdpi, int32 *ydpi) const; float GetScale() const; - + // retrieve page status_t GetPage(int32 no, PrintJobPage& pjp); }; diff --git a/src/add-ons/print/shared/PrintJobReader.cpp b/src/add-ons/print/shared/PrintJobReader.cpp index 05c6e2a93c..19c1995f55 100644 --- a/src/add-ons/print/shared/PrintJobReader.cpp +++ b/src/add-ons/print/shared/PrintJobReader.cpp @@ -2,11 +2,11 @@ PrintJobReader -Copyright (c) 2002 OpenBeOS. +Copyright (c) 2002 OpenBeOS. -Author: +Author: Michael Pfeiffer - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to @@ -45,7 +45,7 @@ PrintJobPage::PrintJobPage() , fNumberOfPictures(0) , fPicture(0) , fStatus(B_ERROR) -{ +{ } @@ -72,7 +72,7 @@ PrintJobPage& PrintJobPage::operator=(const PrintJobPage& copy) } -PrintJobPage::PrintJobPage(BFile* jobFile, off_t start) +PrintJobPage::PrintJobPage(BFile* jobFile, off_t start) : fJobFile(*jobFile) , fPicture(0) , fStatus(B_ERROR) @@ -84,7 +84,6 @@ PrintJobPage::PrintJobPage(BFile* jobFile, off_t start) if (fJobFile.Seek(start, SEEK_SET) != start) return; - off_t nextPage; if (fJobFile.Read(&fNumberOfPictures, sizeof(int32)) == sizeof(int32)) { // (sizeof(int32) * 10) == padding in _page_header_ fJobFile.Seek(sizeof(off_t) + sizeof(int32) * 10, SEEK_CUR); @@ -105,13 +104,13 @@ status_t PrintJobPage::NextPicture(BPicture& picture, BPoint& point, BRect& rect if (fPicture >= fNumberOfPictures) return B_ERROR; fPicture++; - + fJobFile.Seek(fNextPicture, SEEK_SET); fJobFile.Read(&point, sizeof(BPoint)); fJobFile.Read(&rect, sizeof(BRect)); status_t rc = picture.Unflatten(&fJobFile); fNextPicture = fJobFile.Position(); - + if (rc != B_OK) fPicture = fNumberOfPictures; @@ -122,7 +121,7 @@ status_t PrintJobPage::NextPicture(BPicture& picture, BPoint& point, BRect& rect // # pragma mark --- PrintJobReader -PrintJobReader::PrintJobReader(BFile* jobFile) +PrintJobReader::PrintJobReader(BFile* jobFile) : fJobFile(*jobFile) , fNumberOfPages(-1) , fPageIndex(NULL)