~ubuntu-branches/ubuntu/precise/poppler/precise-security

« back to all changes in this revision

Viewing changes to poppler/SplashOutputDev.cc

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2011-03-08 10:46:40 UTC
  • mfrom: (1.5.5) (4.3.2 experimental)
  • Revision ID: package-import@ubuntu.com-20110308104640-de1rwygu2cx2t0yt
Tags: 0.16.3-1ubuntu1
* Merge with Debian experimental. Remaining Ubuntu changes:
  - debian/control: Lower poppler-data to Suggests: (handled by
    language-selector).
  - Add 10_fix-a4-page-shift-on-brother-ps-printers.patch: Fix page shifts
    when printing on A4 paper with Brother PostScript printers.
    (LP #293832)
  - debian/control, debian/rules: Disable OpenJPEG, it's in universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
//
16
16
// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de>
17
17
// Copyright (C) 2006 Stefan Schweizer <genstef@gentoo.org>
18
 
// Copyright (C) 2006-2010 Albert Astals Cid <aacid@kde.org>
 
18
// Copyright (C) 2006-2011 Albert Astals Cid <aacid@kde.org>
19
19
// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
20
20
// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
21
21
// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
3011
3011
  tx = (int)floor(xMin);
3012
3012
  if (tx < 0) {
3013
3013
    tx = 0;
3014
 
  } else if (tx > bitmap->getWidth()) {
3015
 
    tx = bitmap->getWidth();
 
3014
  } else if (tx >= bitmap->getWidth()) {
 
3015
    tx = bitmap->getWidth() - 1;
3016
3016
  }
3017
3017
  ty = (int)floor(yMin);
3018
3018
  if (ty < 0) {
3019
3019
    ty = 0;
3020
 
  } else if (ty > bitmap->getHeight()) {
3021
 
    ty = bitmap->getHeight();
 
3020
  } else if (ty >= bitmap->getHeight()) {
 
3021
    ty = bitmap->getHeight() - 1;
3022
3022
  }
3023
3023
  w = (int)ceil(xMax) - tx + 1;
3024
3024
  if (tx + w > bitmap->getWidth()) {