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