small cleanup at the code I looked at

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22979 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2007-11-22 13:05:06 +00:00
parent cb752f1822
commit 3177ae7785

View File

@ -1097,23 +1097,20 @@ ShowImageWindow::Print(BMessage *msg)
BPrintJob printJob(name.String());
printJob.SetSettings(new BMessage(*fPrintSettings));
if (printJob.ConfigJob() == B_OK) {
int32 firstPage;
int32 lastPage;
BRect printableRect = printJob.PrintableRect();
float width, imageWidth, imageHeight, w1, w2;
BBitmap* bitmap;
float width, w1, w2;
// first/lastPage is unused for now
firstPage = printJob.FirstPage();
lastPage = printJob.LastPage();
int32 firstPage = printJob.FirstPage();
int32 lastPage = printJob.LastPage();
if (firstPage < 1)
firstPage = 1;
if (lastPage < firstPage)
lastPage = firstPage;
bitmap = fImageView->GetBitmap();
imageWidth = bitmap->Bounds().Width() + 1.0;
imageHeight = bitmap->Bounds().Height() + 1.0;
BBitmap* bitmap = fImageView->GetBitmap();
float imageWidth = bitmap->Bounds().Width() + 1.0;
float imageHeight = bitmap->Bounds().Height() + 1.0;
switch (fPrintOptions.Option()) {
case PrintOptions::kFitToPage: