[poppler] poppler/SplashOutputDev.cc utils/HtmlOutputDev.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Apr 27 11:39:17 PDT 2011
poppler/SplashOutputDev.cc | 11 ------
utils/HtmlOutputDev.cc | 75 ---------------------------------------------
2 files changed, 2 insertions(+), 84 deletions(-)
New commits:
commit 39bcce0c8ed378aafb1019ffd1ae40330f6bb63f
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Apr 27 19:39:01 2011 +0100
Remove more variables that are set but then unused
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index baa0ef9..9f00115 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -1512,7 +1512,7 @@ void SplashOutputDev::doUpdateFont(GfxState *state) {
double *textMat;
double m11, m12, m21, m22, fontSize;
SplashCoord mat[4];
- int substIdx, n;
+ int n;
int faceIndex = 0;
GBool recreateFont = gFalse;
GBool doAdjustFontMatrix = gFalse;
@@ -1521,7 +1521,6 @@ void SplashOutputDev::doUpdateFont(GfxState *state) {
font = NULL;
fileName = NULL;
tmpBuf = NULL;
- substIdx = -1;
dfp = NULL;
if (!(gfxFont = state->getFont())) {
@@ -3307,13 +3306,10 @@ void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
}
void SplashOutputDev::endTransparencyGroup(GfxState *state) {
- double *ctm;
-
// restore state
delete splash;
bitmap = transpGroupStack->origBitmap;
splash = transpGroupStack->origSplash;
- ctm = state->getCTM();
state->shiftCTM(transpGroupStack->tx, transpGroupStack->ty);
updateCTM(state, 0, 0, 0, 0, 0, 0);
}
@@ -3557,7 +3553,6 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Catalog *catalog, Obje
SplashBitmap *formerBitmap = bitmap;
double width, height;
int surface_width, surface_height, result_width, result_height, i;
- int xMin, xMax, yMin, yMax;
int repeatX, repeatY;
SplashCoord matc[6];
Matrix m1;
@@ -3584,10 +3579,6 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Catalog *catalog, Obje
}
matc[4] = x0 * xStep * ctm[0] + y0 * yStep * ctm[2] + ctm[4];
matc[5] = x0 * xStep * ctm[1] + y0 * yStep * ctm[3] + ctm[5];
- xMin = (int) ceil (matc[4]);
- yMin = (int) ceil (matc[5]);
- xMax = xMin;
- yMax = yMin;
if (splashAbs(ctm[1]) > splashAbs(ctm[0])) {
kx = -ctm[1];
ky = ctm[2] - (ctm[0] * ctm[3]) / ctm[1];
diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 4f065ea..0c707da 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -17,7 +17,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
-// Copyright (C) 2005-2010 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2005-2011 Albert Astals Cid <aacid at kde.org>
// Copyright (C) 2008 Kjartan Maraas <kmaraas at gnome.org>
// Copyright (C) 2008 Boris Toloknov <tlknv at yandex.ru>
// Copyright (C) 2008 Haruyuki Kawabe <Haruyuki.Kawabe at unisys.co.jp>
@@ -1164,42 +1164,6 @@ void HtmlOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
FILE *f1;
int c;
- int x0, y0; // top left corner of image
- int w0, h0, w1, h1; // size of image
- double xt, yt, wt, ht;
- GBool rotate, xFlip, yFlip;
-
- // get image position and size
- state->transform(0, 0, &xt, &yt);
- state->transformDelta(1, 1, &wt, &ht);
- if (wt > 0) {
- x0 = xoutRound(xt);
- w0 = xoutRound(wt);
- } else {
- x0 = xoutRound(xt + wt);
- w0 = xoutRound(-wt);
- }
- if (ht > 0) {
- y0 = xoutRound(yt);
- h0 = xoutRound(ht);
- } else {
- y0 = xoutRound(yt + ht);
- h0 = xoutRound(-ht);
- }
- state->transformDelta(1, 0, &xt, &yt);
- rotate = fabs(xt) < fabs(yt);
- if (rotate) {
- w1 = h0;
- h1 = w0;
- xFlip = ht < 0;
- yFlip = wt > 0;
- } else {
- w1 = w0;
- h1 = h0;
- xFlip = wt < 0;
- yFlip = ht > 0;
- }
-
// dump JPEG file
if (dumpJPEG && str->getKind() == strDCT) {
GooString *fName=new GooString(Docname);
@@ -1248,43 +1212,6 @@ void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
FILE *f1;
int c;
- int x0, y0; // top left corner of image
- int w0, h0, w1, h1; // size of image
- double xt, yt, wt, ht;
- GBool rotate, xFlip, yFlip;
-
- // get image position and size
- state->transform(0, 0, &xt, &yt);
- state->transformDelta(1, 1, &wt, &ht);
- if (wt > 0) {
- x0 = xoutRound(xt);
- w0 = xoutRound(wt);
- } else {
- x0 = xoutRound(xt + wt);
- w0 = xoutRound(-wt);
- }
- if (ht > 0) {
- y0 = xoutRound(yt);
- h0 = xoutRound(ht);
- } else {
- y0 = xoutRound(yt + ht);
- h0 = xoutRound(-ht);
- }
- state->transformDelta(1, 0, &xt, &yt);
- rotate = fabs(xt) < fabs(yt);
- if (rotate) {
- w1 = h0;
- h1 = w0;
- xFlip = ht < 0;
- yFlip = wt > 0;
- } else {
- w1 = w0;
- h1 = h0;
- xFlip = wt < 0;
- yFlip = ht > 0;
- }
-
-
/*if( !globalParams->getErrQuiet() )
printf("image stream of kind %d\n", str->getKind());*/
// dump JPEG file
More information about the poppler
mailing list