Merge lp:~matttbe/ubuntu/quantal/poppler/lp1072129 into lp:ubuntu/quantal-proposed/poppler

Proposed by Matthieu Baerts
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~matttbe/ubuntu/quantal/poppler/lp1072129
Merge into: lp:ubuntu/quantal-proposed/poppler
Diff against target: 14815 lines (+8447/-1082)
116 files modified
.pc/.quilt_patches (+1/-0)
.pc/.quilt_series (+1/-0)
.pc/applied-patches (+2/-0)
.pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc (+3121/-0)
.pc/ltmain-as-needed.diff/ltmain.sh (+19/-13)
.pc/qt4-visibility.diff/qt4/src/Makefile.am (+74/-0)
.pc/qt4-visibility.diff/qt4/src/Makefile.in (+948/-0)
.pc/qt4-visibility.diff/qt4/src/poppler-export.h (+17/-0)
CMakeLists.txt (+2/-2)
ChangeLog (+684/-0)
Makefile.am (+1/-0)
Makefile.in (+33/-10)
NEWS (+65/-0)
aclocal.m4 (+5/-5)
cmake/modules/FindLCMS2.cmake (+73/-0)
config.h.in (+5/-0)
config.sub (+10/-1)
configure (+346/-265)
configure.ac (+2/-2)
cpp/Makefile.in (+33/-10)
cpp/poppler-version.h (+2/-2)
cpp/tests/Makefile.in (+23/-1)
debian/changelog (+186/-10)
debian/control (+11/-11)
debian/copyright (+21/-9)
debian/libpoppler-dev.install (+0/-11)
debian/libpoppler-glib8.symbols.in (+270/-0)
debian/libpoppler-private-dev.install (+4/-0)
debian/libpoppler-private-dev.lintian-overrides (+0/-3)
debian/libpoppler-qt4-4.symbols.in (+754/-0)
debian/libpoppler25.install (+0/-1)
debian/libpoppler28.install (+1/-0)
debian/patches/git_gouraud_shading_support.patch (+38/-0)
debian/patches/ltmain-as-needed.diff (+1/-1)
debian/patches/qt4-visibility.diff (+42/-0)
debian/patches/series (+2/-0)
debian/rules (+17/-6)
depcomp (+126/-27)
fofi/FoFiType1C.cc (+17/-8)
fofi/FoFiType1C.h (+2/-0)
fofi/Makefile.in (+27/-2)
glib/Makefile.in (+45/-13)
glib/Poppler-0.18.gir (+171/-218)
glib/demo/Makefile.in (+27/-2)
glib/poppler-document.cc (+22/-23)
glib/reference/Makefile.in (+23/-1)
glib/reference/html/PopplerDocument.html (+2/-2)
glib/reference/html/ch01.html (+1/-1)
glib/reference/html/index.html (+1/-1)
glib/reference/html/poppler-Version-and-Features-Information.html (+1/-1)
glib/reference/version.xml (+1/-1)
goo/FixedPoint.h (+1/-1)
goo/GooTimer.h (+1/-1)
goo/JpegWriter.h (+1/-1)
goo/Makefile.in (+27/-2)
goo/PNGWriter.h (+1/-1)
goo/TiffWriter.h (+1/-1)
goo/gfile.h (+1/-1)
goo/gmem.h (+1/-1)
goo/gstrtod.cc (+5/-5)
ltmain.sh (+19/-13)
m4/libtool.m4 (+231/-61)
m4/ltoptions.m4 (+17/-2)
missing (+29/-65)
poppler/Annot.cc (+10/-1)
poppler/CairoOutputDev.cc (+15/-4)
poppler/Catalog.cc (+3/-1)
poppler/DCTStream.cc (+5/-1)
poppler/FileSpec.cc (+4/-0)
poppler/FontInfo.cc (+1/-0)
poppler/Form.cc (+1/-1)
poppler/Function.cc (+5/-0)
poppler/Gfx.cc (+71/-3)
poppler/Gfx.h (+3/-1)
poppler/GfxState.cc (+3/-1)
poppler/GlobalParams.cc (+32/-26)
poppler/GlobalParamsWin.cc (+6/-1)
poppler/JBIG2Stream.cc (+53/-15)
poppler/JPXStream.cc (+12/-2)
poppler/Linearization.cc (+2/-2)
poppler/Makefile.am (+1/-1)
poppler/Makefile.in (+34/-5)
poppler/OutputDev.h (+1/-0)
poppler/PDFDoc.cc (+14/-2)
poppler/PSOutputDev.cc (+76/-31)
poppler/PSOutputDev.h (+1/-1)
poppler/SecurityHandler.cc (+6/-1)
poppler/SplashOutputDev.cc (+66/-23)
poppler/SplashOutputDev.h (+1/-0)
poppler/XRef.cc (+18/-2)
poppler/XRef.h (+2/-3)
qt4/Makefile.in (+27/-8)
qt4/demos/Makefile.in (+23/-1)
qt4/src/Makefile.am (+1/-0)
qt4/src/Makefile.in (+30/-3)
qt4/src/poppler-annotation.cc (+20/-3)
qt4/src/poppler-annotation.h (+1/-1)
qt4/src/poppler-embeddedfile-private.h (+3/-1)
qt4/src/poppler-embeddedfile.cc (+12/-7)
qt4/src/poppler-export.h (+3/-0)
qt4/tests/Makefile.in (+23/-1)
splash/Makefile.in (+27/-2)
splash/Splash.cc (+82/-77)
splash/Splash.h (+2/-2)
splash/SplashBitmap.cc (+13/-8)
splash/SplashClip.cc (+23/-0)
splash/SplashFTFont.h (+1/-1)
splash/SplashMath.h (+1/-1)
splash/SplashXPathScanner.cc (+3/-0)
test/Makefile.in (+23/-1)
utils/HtmlFonts.cc (+18/-6)
utils/HtmlFonts.h (+2/-1)
utils/HtmlOutputDev.cc (+1/-3)
utils/Makefile.in (+39/-5)
utils/pdfseparate.1 (+3/-3)
utils/pdfseparate.cc (+5/-1)
To merge this branch: bzr merge lp:~matttbe/ubuntu/quantal/poppler/lp1072129
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+134708@code.launchpad.net

Description of the change

Hello,

Due to a bug in poppler, Evince crash when loading some PDF files (LP: #1072129).
This new version simply adds the upstream patch in order to fix this bug.

For more details about this new version, please have a look at this bug #1072129.

Thank you for your help! :)

PS: You can easily test the new version by using these packages:
  - Ubuntu Raring 13.04: https://launchpad.net/~matttbe/+archive/ppa/+sourcepub/2781218/+listing-archive-extra
  - Ubuntu Quantal 12.10: https://launchpad.net/~matttbe/+archive/ppa/+sourcepub/2781220/+listing-archive-extra
PS²: [2012-11-16] ACK still not received by the Ubuntu-SRU team for this new version but I guess this package can already been uploaded to the Quantal queue ;)

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your work Matthieu, I've sponsored that, it's in the queue waiting for review (that can take some weeks before somebody look at it seeing the current backlog from the SRU team there)

review: Approve
Revision history for this message
Matthieu Baerts (matttbe) wrote :

Thank you for your help ;)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.pc/.quilt_patches'
2--- .pc/.quilt_patches 1970-01-01 00:00:00 +0000
3+++ .pc/.quilt_patches 2012-11-16 16:39:27 +0000
4@@ -0,0 +1,1 @@
5+debian/patches
6
7=== added file '.pc/.quilt_series'
8--- .pc/.quilt_series 1970-01-01 00:00:00 +0000
9+++ .pc/.quilt_series 2012-11-16 16:39:27 +0000
10@@ -0,0 +1,1 @@
11+series
12
13=== modified file '.pc/applied-patches'
14--- .pc/applied-patches 2012-06-07 17:13:58 +0000
15+++ .pc/applied-patches 2012-11-16 16:39:27 +0000
16@@ -1,1 +1,3 @@
17 ltmain-as-needed.diff
18+qt4-visibility.diff
19+git_gouraud_shading_support.patch
20
21=== added directory '.pc/git_gouraud_shading_support.patch'
22=== added directory '.pc/git_gouraud_shading_support.patch/poppler'
23=== added file '.pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc'
24--- .pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc 1970-01-01 00:00:00 +0000
25+++ .pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc 2012-11-16 16:39:27 +0000
26@@ -0,0 +1,3121 @@
27+//========================================================================
28+//
29+// CairoOutputDev.cc
30+//
31+// Copyright 2003 Glyph & Cog, LLC
32+// Copyright 2004 Red Hat, Inc
33+//
34+//========================================================================
35+
36+//========================================================================
37+//
38+// Modified under the Poppler project - http://poppler.freedesktop.org
39+//
40+// All changes made under the Poppler project to this file are licensed
41+// under GPL version 2 or later
42+//
43+// Copyright (C) 2005-2008 Jeff Muizelaar <jeff@infidigm.net>
44+// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
45+// Copyright (C) 2005, 2009, 2012 Albert Astals Cid <aacid@kde.org>
46+// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
47+// Copyright (C) 2006-2011 Carlos Garcia Campos <carlosgc@gnome.org>
48+// Copyright (C) 2008 Carl Worth <cworth@cworth.org>
49+// Copyright (C) 2008-2012 Adrian Johnson <ajohnson@redneon.com>
50+// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
51+// Copyright (C) 2008, 2009 Chris Wilson <chris@chris-wilson.co.uk>
52+// Copyright (C) 2008 Hib Eris <hib@hiberis.nl>
53+// Copyright (C) 2009, 2010 David Benjamin <davidben@mit.edu>
54+// Copyright (C) 2011, 2012 Thomas Freitag <Thomas.Freitag@alfa.de>
55+// Copyright (C) 2012 Patrick Pfeifer <p2000@mailinator.com>
56+//
57+// To see a description of the changes please see the Changelog file that
58+// came with your tarball or type make ChangeLog if you are building from git
59+//
60+//========================================================================
61+
62+#include <config.h>
63+
64+#ifdef USE_GCC_PRAGMAS
65+#pragma implementation
66+#endif
67+
68+#include <string.h>
69+#include <math.h>
70+#include <assert.h>
71+#include <cairo.h>
72+
73+#include "goo/gfile.h"
74+#include "goo/gtypes_p.h"
75+#include "GlobalParams.h"
76+#include "Error.h"
77+#include "Object.h"
78+#include "Gfx.h"
79+#include "GfxState.h"
80+#include "GfxFont.h"
81+#include "Page.h"
82+#include "Link.h"
83+#include "FontEncodingTables.h"
84+#include "PDFDocEncoding.h"
85+#include <fofi/FoFiTrueType.h>
86+#include <splash/SplashBitmap.h>
87+#include "CairoOutputDev.h"
88+#include "CairoFontEngine.h"
89+#include "CairoRescaleBox.h"
90+#include "UTF8.h"
91+//------------------------------------------------------------------------
92+
93+// #define LOG_CAIRO
94+
95+#ifdef LOG_CAIRO
96+#define LOG(x) (x)
97+#else
98+#define LOG(x)
99+#endif
100+
101+static inline void printMatrix(cairo_matrix_t *matrix){
102+ printf("%f %f, %f %f (%f %f)\n", matrix->xx, matrix->yx,
103+ matrix->xy, matrix->yy,
104+ matrix->x0, matrix->y0);
105+}
106+
107+
108+#define MIN(a,b) (((a) < (b)) ? (a) : (b))
109+#define MAX(a,b) (((a) > (b)) ? (a) : (b))
110+
111+
112+//------------------------------------------------------------------------
113+// CairoImage
114+//------------------------------------------------------------------------
115+
116+CairoImage::CairoImage (double x1, double y1, double x2, double y2) {
117+ this->image = NULL;
118+ this->x1 = x1;
119+ this->y1 = y1;
120+ this->x2 = x2;
121+ this->y2 = y2;
122+}
123+
124+CairoImage::~CairoImage () {
125+ if (image)
126+ cairo_surface_destroy (image);
127+}
128+
129+void CairoImage::setImage (cairo_surface_t *image) {
130+ if (this->image)
131+ cairo_surface_destroy (this->image);
132+ this->image = cairo_surface_reference (image);
133+}
134+
135+//------------------------------------------------------------------------
136+// CairoOutputDev
137+//------------------------------------------------------------------------
138+
139+// We cannot tie the lifetime of an FT_Library object to that of
140+// CairoOutputDev, since any FT_Faces created with it may end up with a
141+// reference by Cairo which can be held long after the CairoOutputDev is
142+// deleted. The simplest way to avoid problems is to never tear down the
143+// FT_Library instance; to avoid leaks, just use a single global instance
144+// initialized the first time it is needed.
145+FT_Library CairoOutputDev::ft_lib;
146+GBool CairoOutputDev::ft_lib_initialized = gFalse;
147+
148+CairoOutputDev::CairoOutputDev() {
149+ doc = NULL;
150+
151+ if (!ft_lib_initialized) {
152+ FT_Init_FreeType(&ft_lib);
153+ ft_lib_initialized = gTrue;
154+ }
155+
156+ fontEngine = NULL;
157+ fontEngine_owner = gFalse;
158+ glyphs = NULL;
159+ fill_pattern = NULL;
160+ fill_color.r = fill_color.g = fill_color.b = 0;
161+ stroke_pattern = NULL;
162+ stroke_color.r = stroke_color.g = stroke_color.b = 0;
163+ stroke_opacity = 1.0;
164+ fill_opacity = 1.0;
165+ textClipPath = NULL;
166+ strokePathClip = NULL;
167+ cairo = NULL;
168+ currentFont = NULL;
169+ prescaleImages = gTrue;
170+ printing = gTrue;
171+ use_show_text_glyphs = gFalse;
172+ inType3Char = gFalse;
173+ t3_glyph_has_bbox = gFalse;
174+
175+ groupColorSpaceStack = NULL;
176+ maskStack = NULL;
177+ group = NULL;
178+ mask = NULL;
179+ shape = NULL;
180+ cairo_shape = NULL;
181+ knockoutCount = 0;
182+
183+ text = NULL;
184+ actualText = NULL;
185+
186+ // the SA parameter supposedly defaults to false, but Acrobat
187+ // apparently hardwires it to true
188+ stroke_adjust = globalParams->getStrokeAdjust();
189+ align_stroke_coords = gFalse;
190+ adjusted_stroke_width = gFalse;
191+}
192+
193+CairoOutputDev::~CairoOutputDev() {
194+ if (fontEngine_owner && fontEngine) {
195+ delete fontEngine;
196+ }
197+
198+ if (cairo)
199+ cairo_destroy (cairo);
200+ cairo_pattern_destroy (stroke_pattern);
201+ cairo_pattern_destroy (fill_pattern);
202+ if (group)
203+ cairo_pattern_destroy (group);
204+ if (mask)
205+ cairo_pattern_destroy (mask);
206+ if (shape)
207+ cairo_pattern_destroy (shape);
208+ if (text)
209+ text->decRefCnt();
210+ if (actualText)
211+ delete actualText;
212+}
213+
214+void CairoOutputDev::setCairo(cairo_t *cairo)
215+{
216+ if (this->cairo != NULL) {
217+ cairo_status_t status = cairo_status (this->cairo);
218+ if (status) {
219+ error(errInternal, -1, "cairo context error: {0:s}\n", cairo_status_to_string(status));
220+ }
221+ cairo_destroy (this->cairo);
222+ assert(!cairo_shape);
223+ }
224+ if (cairo != NULL) {
225+ this->cairo = cairo_reference (cairo);
226+ /* save the initial matrix so that we can use it for type3 fonts. */
227+ //XXX: is this sufficient? could we miss changes to the matrix somehow?
228+ cairo_get_matrix(cairo, &orig_matrix);
229+ } else {
230+ this->cairo = NULL;
231+ this->cairo_shape = NULL;
232+ }
233+}
234+
235+void CairoOutputDev::setTextPage(TextPage *text)
236+{
237+ if (this->text)
238+ this->text->decRefCnt();
239+ if (actualText)
240+ delete actualText;
241+ if (text) {
242+ this->text = text;
243+ this->text->incRefCnt();
244+ actualText = new ActualText(text);
245+ } else {
246+ this->text = NULL;
247+ actualText = NULL;
248+ }
249+}
250+
251+void CairoOutputDev::startDoc(PDFDoc *docA,
252+ CairoFontEngine *parentFontEngine) {
253+ doc = docA;
254+ if (parentFontEngine) {
255+ fontEngine = parentFontEngine;
256+ } else {
257+ if (fontEngine) {
258+ delete fontEngine;
259+ }
260+ fontEngine = new CairoFontEngine(ft_lib);
261+ fontEngine_owner = gTrue;
262+ }
263+}
264+
265+void CairoOutputDev::startPage(int pageNum, GfxState *state) {
266+ /* set up some per page defaults */
267+ cairo_pattern_destroy(fill_pattern);
268+ cairo_pattern_destroy(stroke_pattern);
269+
270+ fill_pattern = cairo_pattern_create_rgb(0., 0., 0.);
271+ stroke_pattern = cairo_pattern_reference(fill_pattern);
272+
273+ if (text)
274+ text->startPage(state);
275+}
276+
277+void CairoOutputDev::endPage() {
278+ if (text) {
279+ text->endPage();
280+ text->coalesce(gTrue, 0, gFalse);
281+ }
282+}
283+
284+void CairoOutputDev::saveState(GfxState *state) {
285+ LOG(printf ("save\n"));
286+ cairo_save (cairo);
287+ if (cairo_shape)
288+ cairo_save (cairo_shape);
289+
290+ MaskStack *ms = new MaskStack;
291+ ms->mask = cairo_pattern_reference(mask);
292+ ms->mask_matrix = mask_matrix;
293+ ms->next = maskStack;
294+ maskStack = ms;
295+}
296+
297+void CairoOutputDev::restoreState(GfxState *state) {
298+ LOG(printf ("restore\n"));
299+ cairo_restore (cairo);
300+ if (cairo_shape)
301+ cairo_restore (cairo_shape);
302+
303+ /* These aren't restored by cairo_restore() since we keep them in
304+ * the output device. */
305+ updateFillColor(state);
306+ updateStrokeColor(state);
307+ updateFillOpacity(state);
308+ updateStrokeOpacity(state);
309+ updateBlendMode(state);
310+
311+ MaskStack* ms = maskStack;
312+ if (ms) {
313+ if (mask)
314+ cairo_pattern_destroy(mask);
315+ mask = ms->mask;
316+ mask_matrix = ms->mask_matrix;
317+ maskStack = ms->next;
318+ delete ms;
319+ }
320+}
321+
322+void CairoOutputDev::updateAll(GfxState *state) {
323+ updateLineDash(state);
324+ updateLineJoin(state);
325+ updateLineCap(state);
326+ updateLineWidth(state);
327+ updateFlatness(state);
328+ updateMiterLimit(state);
329+ updateFillColor(state);
330+ updateStrokeColor(state);
331+ updateFillOpacity(state);
332+ updateStrokeOpacity(state);
333+ updateBlendMode(state);
334+ needFontUpdate = gTrue;
335+ if (text)
336+ text->updateFont(state);
337+}
338+
339+void CairoOutputDev::setDefaultCTM(double *ctm) {
340+ cairo_matrix_t matrix;
341+ matrix.xx = ctm[0];
342+ matrix.yx = ctm[1];
343+ matrix.xy = ctm[2];
344+ matrix.yy = ctm[3];
345+ matrix.x0 = ctm[4];
346+ matrix.y0 = ctm[5];
347+
348+ cairo_transform (cairo, &matrix);
349+ if (cairo_shape)
350+ cairo_transform (cairo_shape, &matrix);
351+
352+ OutputDev::setDefaultCTM(ctm);
353+}
354+
355+void CairoOutputDev::updateCTM(GfxState *state, double m11, double m12,
356+ double m21, double m22,
357+ double m31, double m32) {
358+ cairo_matrix_t matrix, invert_matrix;
359+ matrix.xx = m11;
360+ matrix.yx = m12;
361+ matrix.xy = m21;
362+ matrix.yy = m22;
363+ matrix.x0 = m31;
364+ matrix.y0 = m32;
365+
366+ /* Make sure the matrix is invertible before setting it.
367+ * cairo will blow up if we give it a matrix that's not
368+ * invertible, so we need to check before passing it
369+ * to cairo_transform. Ignoring it is likely to give better
370+ * results than not rendering anything at all. See #14398
371+ *
372+ * Ideally, we could do the cairo_transform
373+ * and then check if anything went wrong and fix it then
374+ * instead of having to invert the matrix. */
375+ invert_matrix = matrix;
376+ if (cairo_matrix_invert(&invert_matrix)) {
377+ error(errSyntaxWarning, -1, "matrix not invertible\n");
378+ return;
379+ }
380+
381+ cairo_transform (cairo, &matrix);
382+ if (cairo_shape)
383+ cairo_transform (cairo_shape, &matrix);
384+ updateLineDash(state);
385+ updateLineJoin(state);
386+ updateLineCap(state);
387+ updateLineWidth(state);
388+}
389+
390+void CairoOutputDev::updateLineDash(GfxState *state) {
391+ double *dashPattern;
392+ int dashLength;
393+ double dashStart;
394+
395+ state->getLineDash(&dashPattern, &dashLength, &dashStart);
396+ cairo_set_dash (cairo, dashPattern, dashLength, dashStart);
397+ if (cairo_shape)
398+ cairo_set_dash (cairo_shape, dashPattern, dashLength, dashStart);
399+}
400+
401+void CairoOutputDev::updateFlatness(GfxState *state) {
402+ // cairo_set_tolerance (cairo, state->getFlatness());
403+}
404+
405+void CairoOutputDev::updateLineJoin(GfxState *state) {
406+ switch (state->getLineJoin()) {
407+ case 0:
408+ cairo_set_line_join (cairo, CAIRO_LINE_JOIN_MITER);
409+ break;
410+ case 1:
411+ cairo_set_line_join (cairo, CAIRO_LINE_JOIN_ROUND);
412+ break;
413+ case 2:
414+ cairo_set_line_join (cairo, CAIRO_LINE_JOIN_BEVEL);
415+ break;
416+ }
417+ if (cairo_shape)
418+ cairo_set_line_join (cairo_shape, cairo_get_line_join(cairo));
419+}
420+
421+void CairoOutputDev::updateLineCap(GfxState *state) {
422+ switch (state->getLineCap()) {
423+ case 0:
424+ cairo_set_line_cap (cairo, CAIRO_LINE_CAP_BUTT);
425+ break;
426+ case 1:
427+ cairo_set_line_cap (cairo, CAIRO_LINE_CAP_ROUND);
428+ break;
429+ case 2:
430+ cairo_set_line_cap (cairo, CAIRO_LINE_CAP_SQUARE);
431+ break;
432+ }
433+ if (cairo_shape)
434+ cairo_set_line_cap (cairo_shape, cairo_get_line_cap(cairo));
435+}
436+
437+void CairoOutputDev::updateMiterLimit(GfxState *state) {
438+ cairo_set_miter_limit (cairo, state->getMiterLimit());
439+ if (cairo_shape)
440+ cairo_set_miter_limit (cairo_shape, state->getMiterLimit());
441+}
442+
443+void CairoOutputDev::updateLineWidth(GfxState *state) {
444+ LOG(printf ("line width: %f\n", state->getLineWidth()));
445+ adjusted_stroke_width = gFalse;
446+ double width = state->getLineWidth();
447+ if (stroke_adjust && !printing) {
448+ double x, y;
449+ x = y = width;
450+
451+ /* find out line width in device units */
452+ cairo_user_to_device_distance(cairo, &x, &y);
453+ if (fabs(x) <= 1.0 && fabs(y) <= 1.0) {
454+ /* adjust width to at least one device pixel */
455+ x = y = 1.0;
456+ cairo_device_to_user_distance(cairo, &x, &y);
457+ width = MIN(fabs(x),fabs(y));
458+ adjusted_stroke_width = gTrue;
459+ }
460+ } else if (width == 0.0) {
461+ /* Cairo does not support 0 line width == 1 device pixel. Find out
462+ * how big pixels (device unit) are in the x and y
463+ * directions. Choose the smaller of the two as our line width.
464+ */
465+ double x = 1.0, y = 1.0;
466+ if (printing) {
467+ // assume printer pixel size is 1/600 inch
468+ x = 72.0/600;
469+ y = 72.0/600;
470+ }
471+ cairo_device_to_user_distance(cairo, &x, &y);
472+ width = MIN(fabs(x),fabs(y));
473+ }
474+ cairo_set_line_width (cairo, width);
475+ if (cairo_shape)
476+ cairo_set_line_width (cairo_shape, cairo_get_line_width (cairo));
477+}
478+
479+void CairoOutputDev::updateFillColor(GfxState *state) {
480+ GfxRGB color = fill_color;
481+
482+ state->getFillRGB(&fill_color);
483+ if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID ||
484+ color.r != fill_color.r ||
485+ color.g != fill_color.g ||
486+ color.b != fill_color.b)
487+ {
488+ cairo_pattern_destroy(fill_pattern);
489+ fill_pattern = cairo_pattern_create_rgba(colToDbl(fill_color.r),
490+ colToDbl(fill_color.g),
491+ colToDbl(fill_color.b),
492+ fill_opacity);
493+
494+ LOG(printf ("fill color: %d %d %d\n",
495+ fill_color.r, fill_color.g, fill_color.b));
496+ }
497+}
498+
499+void CairoOutputDev::updateStrokeColor(GfxState *state) {
500+ GfxRGB color = stroke_color;
501+
502+ state->getStrokeRGB(&stroke_color);
503+ if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID ||
504+ color.r != stroke_color.r ||
505+ color.g != stroke_color.g ||
506+ color.b != stroke_color.b)
507+ {
508+ cairo_pattern_destroy(stroke_pattern);
509+ stroke_pattern = cairo_pattern_create_rgba(colToDbl(stroke_color.r),
510+ colToDbl(stroke_color.g),
511+ colToDbl(stroke_color.b),
512+ stroke_opacity);
513+
514+ LOG(printf ("stroke color: %d %d %d\n",
515+ stroke_color.r, stroke_color.g, stroke_color.b));
516+ }
517+}
518+
519+void CairoOutputDev::updateFillOpacity(GfxState *state) {
520+ double opacity = fill_opacity;
521+
522+ fill_opacity = state->getFillOpacity();
523+ if (opacity != fill_opacity) {
524+ cairo_pattern_destroy(fill_pattern);
525+ fill_pattern = cairo_pattern_create_rgba(colToDbl(fill_color.r),
526+ colToDbl(fill_color.g),
527+ colToDbl(fill_color.b),
528+ fill_opacity);
529+
530+ LOG(printf ("fill opacity: %f\n", fill_opacity));
531+ }
532+}
533+
534+void CairoOutputDev::updateStrokeOpacity(GfxState *state) {
535+ double opacity = stroke_opacity;
536+
537+ stroke_opacity = state->getStrokeOpacity();
538+ if (opacity != stroke_opacity) {
539+ cairo_pattern_destroy(stroke_pattern);
540+ stroke_pattern = cairo_pattern_create_rgba(colToDbl(stroke_color.r),
541+ colToDbl(stroke_color.g),
542+ colToDbl(stroke_color.b),
543+ stroke_opacity);
544+
545+ LOG(printf ("stroke opacity: %f\n", stroke_opacity));
546+ }
547+}
548+
549+void CairoOutputDev::updateFillColorStop(GfxState *state, double offset) {
550+ state->getFillRGB(&fill_color);
551+
552+ cairo_pattern_add_color_stop_rgba(fill_pattern, offset,
553+ colToDbl(fill_color.r),
554+ colToDbl(fill_color.g),
555+ colToDbl(fill_color.b),
556+ fill_opacity);
557+ LOG(printf ("fill color stop: %f (%d, %d, %d)\n",
558+ offset, fill_color.r, fill_color.g, fill_color.b));
559+}
560+
561+void CairoOutputDev::updateBlendMode(GfxState *state) {
562+ switch (state->getBlendMode()) {
563+ default:
564+ case gfxBlendNormal:
565+ cairo_set_operator (cairo, CAIRO_OPERATOR_OVER);
566+ break;
567+ case gfxBlendMultiply:
568+ cairo_set_operator (cairo, CAIRO_OPERATOR_MULTIPLY);
569+ break;
570+ case gfxBlendScreen:
571+ cairo_set_operator (cairo, CAIRO_OPERATOR_SCREEN);
572+ break;
573+ case gfxBlendOverlay:
574+ cairo_set_operator (cairo, CAIRO_OPERATOR_OVERLAY);
575+ break;
576+ case gfxBlendDarken:
577+ cairo_set_operator (cairo, CAIRO_OPERATOR_DARKEN);
578+ break;
579+ case gfxBlendLighten:
580+ cairo_set_operator (cairo, CAIRO_OPERATOR_LIGHTEN);
581+ break;
582+ case gfxBlendColorDodge:
583+ cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_DODGE);
584+ break;
585+ case gfxBlendColorBurn:
586+ cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_BURN);
587+ break;
588+ case gfxBlendHardLight:
589+ cairo_set_operator (cairo, CAIRO_OPERATOR_HARD_LIGHT);
590+ break;
591+ case gfxBlendSoftLight:
592+ cairo_set_operator (cairo, CAIRO_OPERATOR_SOFT_LIGHT);
593+ break;
594+ case gfxBlendDifference:
595+ cairo_set_operator (cairo, CAIRO_OPERATOR_DIFFERENCE);
596+ break;
597+ case gfxBlendExclusion:
598+ cairo_set_operator (cairo, CAIRO_OPERATOR_EXCLUSION);
599+ break;
600+ case gfxBlendHue:
601+ cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_HUE);
602+ break;
603+ case gfxBlendSaturation:
604+ cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_SATURATION);
605+ break;
606+ case gfxBlendColor:
607+ cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_COLOR);
608+ break;
609+ case gfxBlendLuminosity:
610+ cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_LUMINOSITY);
611+ break;
612+ }
613+ LOG(printf ("blend mode: %d\n", (int)state->getBlendMode()));
614+}
615+
616+void CairoOutputDev::updateFont(GfxState *state) {
617+ cairo_font_face_t *font_face;
618+ cairo_matrix_t matrix, invert_matrix;
619+
620+ LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString()));
621+
622+ needFontUpdate = gFalse;
623+
624+ //FIXME: use cairo font engine?
625+ if (text)
626+ text->updateFont(state);
627+
628+ currentFont = fontEngine->getFont (state->getFont(), doc, printing);
629+
630+ if (!currentFont)
631+ return;
632+
633+ font_face = currentFont->getFontFace();
634+ cairo_set_font_face (cairo, font_face);
635+
636+ use_show_text_glyphs = state->getFont()->hasToUnicodeCMap() &&
637+ cairo_surface_has_show_text_glyphs (cairo_get_target (cairo));
638+
639+ double fontSize = state->getFontSize();
640+ double *m = state->getTextMat();
641+ /* NOTE: adjusting by a constant is hack. The correct solution
642+ * is probably to use user-fonts and compute the scale on a per
643+ * glyph basis instead of for the entire font */
644+ double w = currentFont->getSubstitutionCorrection(state->getFont());
645+ matrix.xx = m[0] * fontSize * state->getHorizScaling() * w;
646+ matrix.yx = m[1] * fontSize * state->getHorizScaling() * w;
647+ matrix.xy = -m[2] * fontSize;
648+ matrix.yy = -m[3] * fontSize;
649+ matrix.x0 = 0;
650+ matrix.y0 = 0;
651+
652+ LOG(printf ("font matrix: %f %f %f %f\n", matrix.xx, matrix.yx, matrix.xy, matrix.yy));
653+
654+ /* Make sure the font matrix is invertible before setting it. cairo
655+ * will blow up if we give it a matrix that's not invertible, so we
656+ * need to check before passing it to cairo_set_font_matrix. Ignoring it
657+ * is likely to give better results than not rendering anything at
658+ * all. See #18254.
659+ */
660+ invert_matrix = matrix;
661+ if (cairo_matrix_invert(&invert_matrix)) {
662+ error(errSyntaxWarning, -1, "font matrix not invertible\n");
663+ return;
664+ }
665+
666+ cairo_set_font_matrix (cairo, &matrix);
667+}
668+
669+/* Tolerance in pixels for checking if strokes are horizontal or vertical
670+ * lines in device space */
671+#define STROKE_COORD_TOLERANCE 0.5
672+
673+/* Align stroke coordinate i if the point is the start or end of a
674+ * horizontal or vertical line */
675+void CairoOutputDev::alignStrokeCoords(GfxSubpath *subpath, int i, double *x, double *y)
676+{
677+ double x1, y1, x2, y2;
678+ GBool align = gFalse;
679+
680+ x1 = subpath->getX(i);
681+ y1 = subpath->getY(i);
682+ cairo_user_to_device (cairo, &x1, &y1);
683+
684+ // Does the current coord and prev coord form a horiz or vert line?
685+ if (i > 0 && !subpath->getCurve(i - 1)) {
686+ x2 = subpath->getX(i - 1);
687+ y2 = subpath->getY(i - 1);
688+ cairo_user_to_device (cairo, &x2, &y2);
689+ if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE)
690+ align = gTrue;
691+ }
692+
693+ // Does the current coord and next coord form a horiz or vert line?
694+ if (i < subpath->getNumPoints() - 1 && !subpath->getCurve(i + 1)) {
695+ x2 = subpath->getX(i + 1);
696+ y2 = subpath->getY(i + 1);
697+ cairo_user_to_device (cairo, &x2, &y2);
698+ if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE)
699+ align = gTrue;
700+ }
701+
702+ *x = subpath->getX(i);
703+ *y = subpath->getY(i);
704+ if (align) {
705+ /* see http://www.cairographics.org/FAQ/#sharp_lines */
706+ cairo_user_to_device (cairo, x, y);
707+ *x = floor(*x) + 0.5;
708+ *y = floor(*y) + 0.5;
709+ cairo_device_to_user (cairo, x, y);
710+ }
711+}
712+
713+#undef STROKE_COORD_TOLERANCE
714+
715+void CairoOutputDev::doPath(cairo_t *cairo, GfxState *state, GfxPath *path) {
716+ GfxSubpath *subpath;
717+ int i, j;
718+ double x, y;
719+ cairo_new_path (cairo);
720+ for (i = 0; i < path->getNumSubpaths(); ++i) {
721+ subpath = path->getSubpath(i);
722+ if (subpath->getNumPoints() > 0) {
723+ if (align_stroke_coords) {
724+ alignStrokeCoords(subpath, 0, &x, &y);
725+ } else {
726+ x = subpath->getX(0);
727+ y = subpath->getY(0);
728+ }
729+ cairo_move_to (cairo, x, y);
730+ j = 1;
731+ while (j < subpath->getNumPoints()) {
732+ if (subpath->getCurve(j)) {
733+ if (align_stroke_coords) {
734+ alignStrokeCoords(subpath, j + 2, &x, &y);
735+ } else {
736+ x = subpath->getX(j+2);
737+ y = subpath->getY(j+2);
738+ }
739+ cairo_curve_to( cairo,
740+ subpath->getX(j), subpath->getY(j),
741+ subpath->getX(j+1), subpath->getY(j+1),
742+ x, y);
743+
744+ j += 3;
745+ } else {
746+ if (align_stroke_coords) {
747+ alignStrokeCoords(subpath, j, &x, &y);
748+ } else {
749+ x = subpath->getX(j);
750+ y = subpath->getY(j);
751+ }
752+ cairo_line_to (cairo, x, y);
753+ ++j;
754+ }
755+ }
756+ if (subpath->isClosed()) {
757+ LOG (printf ("close\n"));
758+ cairo_close_path (cairo);
759+ }
760+ }
761+ }
762+}
763+
764+void CairoOutputDev::stroke(GfxState *state) {
765+ if (inType3Char) {
766+ GfxGray gray;
767+ state->getFillGray(&gray);
768+ if (colToDbl(gray) > 0.5)
769+ return;
770+ }
771+
772+ if (adjusted_stroke_width)
773+ align_stroke_coords = gTrue;
774+ doPath (cairo, state, state->getPath());
775+ align_stroke_coords = gFalse;
776+ cairo_set_source (cairo, stroke_pattern);
777+ LOG(printf ("stroke\n"));
778+ cairo_stroke (cairo);
779+ if (cairo_shape) {
780+ doPath (cairo_shape, state, state->getPath());
781+ cairo_stroke (cairo_shape);
782+ }
783+}
784+
785+void CairoOutputDev::fill(GfxState *state) {
786+ if (inType3Char) {
787+ GfxGray gray;
788+ state->getFillGray(&gray);
789+ if (colToDbl(gray) > 0.5)
790+ return;
791+ }
792+
793+ doPath (cairo, state, state->getPath());
794+ cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
795+ cairo_set_source (cairo, fill_pattern);
796+ LOG(printf ("fill\n"));
797+ //XXX: how do we get the path
798+ if (mask) {
799+ cairo_save (cairo);
800+ cairo_clip (cairo);
801+ cairo_set_matrix (cairo, &mask_matrix);
802+ cairo_mask (cairo, mask);
803+ cairo_restore (cairo);
804+ } else if (strokePathClip) {
805+ fillToStrokePathClip(state);
806+ } else {
807+ cairo_fill (cairo);
808+ }
809+ if (cairo_shape) {
810+ cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING);
811+ doPath (cairo_shape, state, state->getPath());
812+ cairo_fill (cairo_shape);
813+ }
814+}
815+
816+void CairoOutputDev::eoFill(GfxState *state) {
817+ doPath (cairo, state, state->getPath());
818+ cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD);
819+ cairo_set_source (cairo, fill_pattern);
820+ LOG(printf ("fill-eo\n"));
821+ cairo_fill (cairo);
822+
823+ if (cairo_shape) {
824+ cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD);
825+ doPath (cairo_shape, state, state->getPath());
826+ cairo_fill (cairo_shape);
827+ }
828+
829+}
830+
831+GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *cat, Object *str,
832+ double *pmat, int paintType, int /*tilingType*/, Dict *resDict,
833+ double *mat, double *bbox,
834+ int x0, int y0, int x1, int y1,
835+ double xStep, double yStep)
836+{
837+ PDFRectangle box;
838+ Gfx *gfx;
839+ cairo_pattern_t *pattern;
840+ cairo_surface_t *surface;
841+ cairo_matrix_t matrix;
842+ cairo_t *old_cairo;
843+ double xMin, yMin, xMax, yMax;
844+ double width, height;
845+ int surface_width, surface_height;
846+ StrokePathClip *strokePathTmp;
847+
848+ width = bbox[2] - bbox[0];
849+ height = bbox[3] - bbox[1];
850+
851+ if (xStep != width || yStep != height)
852+ return gFalse;
853+ /* TODO: implement the other cases here too */
854+
855+ surface_width = (int) ceil (width);
856+ surface_height = (int) ceil (height);
857+
858+ surface = cairo_surface_create_similar (cairo_get_target (cairo),
859+ CAIRO_CONTENT_COLOR_ALPHA,
860+ surface_width, surface_height);
861+ if (cairo_surface_status (surface))
862+ return gFalse;
863+
864+ old_cairo = cairo;
865+ cairo = cairo_create (surface);
866+ cairo_surface_destroy (surface);
867+
868+ box.x1 = bbox[0]; box.y1 = bbox[1];
869+ box.x2 = bbox[2]; box.y2 = bbox[3];
870+ strokePathTmp = strokePathClip;
871+ strokePathClip = NULL;
872+ gfx = new Gfx(doc, this, resDict, &box, NULL);
873+ gfx->display(str);
874+ delete gfx;
875+ strokePathClip = strokePathTmp;
876+
877+ pattern = cairo_pattern_create_for_surface (cairo_get_target (cairo));
878+ cairo_destroy (cairo);
879+ cairo = old_cairo;
880+ if (cairo_pattern_status (pattern))
881+ return gFalse;
882+
883+ state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
884+ cairo_rectangle (cairo, xMin, yMin, xMax - xMin, yMax - yMin);
885+
886+ cairo_matrix_init_scale (&matrix, surface_width / width, surface_height / height);
887+ cairo_pattern_set_matrix (pattern, &matrix);
888+
889+ cairo_matrix_init (&matrix, mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
890+ cairo_transform (cairo, &matrix);
891+ cairo_set_source (cairo, pattern);
892+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
893+ if (strokePathClip) {
894+ fillToStrokePathClip(state);
895+ } else {
896+ cairo_fill (cairo);
897+ }
898+
899+ cairo_pattern_destroy (pattern);
900+
901+ return gTrue;
902+}
903+
904+GBool CairoOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) {
905+ double x0, y0, x1, y1;
906+ double dx, dy;
907+
908+ shading->getCoords(&x0, &y0, &x1, &y1);
909+ dx = x1 - x0;
910+ dy = y1 - y0;
911+
912+ cairo_pattern_destroy(fill_pattern);
913+ fill_pattern = cairo_pattern_create_linear (x0 + tMin * dx, y0 + tMin * dy,
914+ x0 + tMax * dx, y0 + tMax * dy);
915+ if (!shading->getExtend0() && !shading->getExtend1())
916+ cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE);
917+ else
918+ cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD);
919+
920+ LOG (printf ("axial-sh\n"));
921+
922+ // TODO: use the actual stops in the shading in the case
923+ // of linear interpolation (Type 2 Exponential functions with N=1)
924+ return gFalse;
925+}
926+
927+GBool CairoOutputDev::axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading)
928+{
929+ return (shading->getExtend0() == shading->getExtend1());
930+}
931+
932+GBool CairoOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) {
933+ double x0, y0, r0, x1, y1, r1;
934+ double dx, dy, dr;
935+
936+ shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1);
937+ dx = x1 - x0;
938+ dy = y1 - y0;
939+ dr = r1 - r0;
940+ cairo_pattern_destroy(fill_pattern);
941+ fill_pattern = cairo_pattern_create_radial (x0 + sMin * dx,
942+ y0 + sMin * dy,
943+ r0 + sMin * dr,
944+ x0 + sMax * dx,
945+ y0 + sMax * dy,
946+ r0 + sMax * dr);
947+ if (shading->getExtend0() && shading->getExtend1())
948+ cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD);
949+ else
950+ cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE);
951+
952+ LOG (printf ("radial-sh\n"));
953+
954+ return gFalse;
955+}
956+
957+GBool CairoOutputDev::radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading)
958+{
959+ return (shading->getExtend0() == shading->getExtend1());
960+}
961+
962+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
963+GBool CairoOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading)
964+{
965+ double x0, y0, x1, y1, x2, y2;
966+ GfxColor color[3];
967+ int i, j;
968+ GfxRGB rgb;
969+
970+ cairo_pattern_destroy(fill_pattern);
971+ fill_pattern = cairo_pattern_create_mesh ();
972+
973+ for (i = 0; i < shading->getNTriangles(); i++) {
974+ shading->getTriangle(i,
975+ &x0, &y0, &color[0],
976+ &x1, &y1, &color[1],
977+ &x2, &y2, &color[2]);
978+
979+ cairo_mesh_pattern_begin_patch (fill_pattern);
980+
981+ cairo_mesh_pattern_move_to (fill_pattern, x0, y0);
982+ cairo_mesh_pattern_line_to (fill_pattern, x1, y1);
983+ cairo_mesh_pattern_line_to (fill_pattern, x2, y2);
984+
985+ for (j = 0; j < 3; j++) {
986+ shading->getColorSpace()->getRGB(&color[j], &rgb);
987+ cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j,
988+ colToDbl(rgb.r),
989+ colToDbl(rgb.g),
990+ colToDbl(rgb.b));
991+ }
992+
993+ cairo_mesh_pattern_end_patch (fill_pattern);
994+ }
995+
996+ double xMin, yMin, xMax, yMax;
997+ // get the clip region bbox
998+ state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
999+ state->moveTo(xMin, yMin);
1000+ state->lineTo(xMin, yMax);
1001+ state->lineTo(xMax, yMax);
1002+ state->lineTo(xMax, yMin);
1003+ state->closePath();
1004+ fill(state);
1005+ state->clearPath();
1006+
1007+ return gTrue;
1008+}
1009+
1010+GBool CairoOutputDev::patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading)
1011+{
1012+ int i, j, k;
1013+
1014+ cairo_pattern_destroy(fill_pattern);
1015+ fill_pattern = cairo_pattern_create_mesh ();
1016+
1017+ for (i = 0; i < shading->getNPatches(); i++) {
1018+ GfxPatch *patch = shading->getPatch(i);
1019+ GfxColor color;
1020+ GfxRGB rgb;
1021+
1022+ cairo_mesh_pattern_begin_patch (fill_pattern);
1023+
1024+ cairo_mesh_pattern_move_to (fill_pattern, patch->x[0][0], patch->y[0][0]);
1025+ cairo_mesh_pattern_curve_to (fill_pattern,
1026+ patch->x[0][1], patch->y[0][1],
1027+ patch->x[0][2], patch->y[0][2],
1028+ patch->x[0][3], patch->y[0][3]);
1029+
1030+ cairo_mesh_pattern_curve_to (fill_pattern,
1031+ patch->x[1][3], patch->y[1][3],
1032+ patch->x[2][3], patch->y[2][3],
1033+ patch->x[3][3], patch->y[3][3]);
1034+
1035+ cairo_mesh_pattern_curve_to (fill_pattern,
1036+ patch->x[3][2], patch->y[3][2],
1037+ patch->x[3][1], patch->y[3][1],
1038+ patch->x[3][0], patch->y[3][0]);
1039+
1040+ cairo_mesh_pattern_curve_to (fill_pattern,
1041+ patch->x[2][0], patch->y[2][0],
1042+ patch->x[1][0], patch->y[1][0],
1043+ patch->x[0][0], patch->y[0][0]);
1044+
1045+ cairo_mesh_pattern_set_control_point (fill_pattern, 0, patch->x[1][1], patch->y[1][1]);
1046+ cairo_mesh_pattern_set_control_point (fill_pattern, 1, patch->x[1][2], patch->y[1][2]);
1047+ cairo_mesh_pattern_set_control_point (fill_pattern, 2, patch->x[2][2], patch->y[2][2]);
1048+ cairo_mesh_pattern_set_control_point (fill_pattern, 3, patch->x[2][1], patch->y[2][1]);
1049+
1050+ for (j = 0; j < 4; j++) {
1051+ int u, v;
1052+
1053+ switch (j) {
1054+ case 0:
1055+ u = 0; v = 0;
1056+ break;
1057+ case 1:
1058+ u = 0; v = 1;
1059+ break;
1060+ case 2:
1061+ u = 1; v = 1;
1062+ break;
1063+ case 3:
1064+ u = 1; v = 0;
1065+ break;
1066+ }
1067+
1068+ if (shading->isParameterized()) {
1069+ shading->getParameterizedColor (patch->color[u][v].c[0], &color);
1070+ } else {
1071+ for (k = 0; k < shading->getColorSpace()->getNComps(); k++) {
1072+ // simply cast to the desired type; that's all what is needed.
1073+ color.c[k] = GfxColorComp (patch->color[u][v].c[k]);
1074+ }
1075+ }
1076+
1077+ shading->getColorSpace()->getRGB(&color, &rgb);
1078+ cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j,
1079+ colToDbl(rgb.r),
1080+ colToDbl(rgb.g),
1081+ colToDbl(rgb.b));
1082+ }
1083+ cairo_mesh_pattern_end_patch (fill_pattern);
1084+ }
1085+
1086+ double xMin, yMin, xMax, yMax;
1087+ // get the clip region bbox
1088+ state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
1089+ state->moveTo(xMin, yMin);
1090+ state->lineTo(xMin, yMax);
1091+ state->lineTo(xMax, yMax);
1092+ state->lineTo(xMax, yMin);
1093+ state->closePath();
1094+ fill(state);
1095+ state->clearPath();
1096+
1097+ return gTrue;
1098+}
1099+#endif /* CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) */
1100+
1101+void CairoOutputDev::clip(GfxState *state) {
1102+ doPath (cairo, state, state->getPath());
1103+ cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
1104+ cairo_clip (cairo);
1105+ LOG (printf ("clip\n"));
1106+ if (cairo_shape) {
1107+ doPath (cairo_shape, state, state->getPath());
1108+ cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING);
1109+ cairo_clip (cairo_shape);
1110+ }
1111+}
1112+
1113+void CairoOutputDev::eoClip(GfxState *state) {
1114+ doPath (cairo, state, state->getPath());
1115+ cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD);
1116+ cairo_clip (cairo);
1117+ LOG (printf ("clip-eo\n"));
1118+ if (cairo_shape) {
1119+ doPath (cairo_shape, state, state->getPath());
1120+ cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD);
1121+ cairo_clip (cairo_shape);
1122+ }
1123+
1124+}
1125+
1126+void CairoOutputDev::clipToStrokePath(GfxState *state) {
1127+ LOG(printf("clip-to-stroke-path\n"));
1128+ strokePathClip = (StrokePathClip*)gmalloc (sizeof(*strokePathClip));
1129+ strokePathClip->path = state->getPath()->copy();
1130+ cairo_get_matrix (cairo, &strokePathClip->ctm);
1131+ strokePathClip->line_width = cairo_get_line_width (cairo);
1132+ strokePathClip->dash_count = cairo_get_dash_count (cairo);
1133+ if (strokePathClip->dash_count) {
1134+ strokePathClip->dashes = (double*) gmallocn (sizeof(double), strokePathClip->dash_count);
1135+ cairo_get_dash (cairo, strokePathClip->dashes, &strokePathClip->dash_offset);
1136+ } else {
1137+ strokePathClip->dashes = NULL;
1138+ }
1139+ strokePathClip->cap = cairo_get_line_cap (cairo);
1140+ strokePathClip->join = cairo_get_line_join (cairo);
1141+ strokePathClip->miter = cairo_get_miter_limit (cairo);
1142+}
1143+
1144+void CairoOutputDev::fillToStrokePathClip(GfxState *state) {
1145+ cairo_save (cairo);
1146+
1147+ cairo_set_matrix (cairo, &strokePathClip->ctm);
1148+ cairo_set_line_width (cairo, strokePathClip->line_width);
1149+ strokePathClip->dash_count = cairo_get_dash_count (cairo);
1150+ cairo_set_dash (cairo, strokePathClip->dashes, strokePathClip->dash_count, strokePathClip->dash_offset);
1151+ cairo_set_line_cap (cairo, strokePathClip->cap);
1152+ cairo_set_line_join (cairo, strokePathClip->join);
1153+ cairo_set_miter_limit (cairo, strokePathClip->miter);
1154+ doPath (cairo, state, strokePathClip->path);
1155+ cairo_stroke (cairo);
1156+
1157+ cairo_restore (cairo);
1158+
1159+ delete strokePathClip->path;
1160+ if (strokePathClip->dashes)
1161+ gfree (strokePathClip->dashes);
1162+ gfree (strokePathClip);
1163+ strokePathClip = NULL;
1164+}
1165+
1166+void CairoOutputDev::beginString(GfxState *state, GooString *s)
1167+{
1168+ int len = s->getLength();
1169+
1170+ if (needFontUpdate)
1171+ updateFont(state);
1172+
1173+ if (!currentFont)
1174+ return;
1175+
1176+ glyphs = (cairo_glyph_t *) gmallocn (len, sizeof (cairo_glyph_t));
1177+ glyphCount = 0;
1178+ if (use_show_text_glyphs) {
1179+ clusters = (cairo_text_cluster_t *) gmallocn (len, sizeof (cairo_text_cluster_t));
1180+ clusterCount = 0;
1181+ utf8Max = len*2; // start with twice the number of glyphs. we will realloc if we need more.
1182+ utf8 = (char *) gmalloc (utf8Max);
1183+ utf8Count = 0;
1184+ }
1185+}
1186+
1187+void CairoOutputDev::drawChar(GfxState *state, double x, double y,
1188+ double dx, double dy,
1189+ double originX, double originY,
1190+ CharCode code, int nBytes, Unicode *u, int uLen)
1191+{
1192+ if (currentFont) {
1193+ glyphs[glyphCount].index = currentFont->getGlyph (code, u, uLen);
1194+ glyphs[glyphCount].x = x - originX;
1195+ glyphs[glyphCount].y = y - originY;
1196+ glyphCount++;
1197+ if (use_show_text_glyphs) {
1198+ if (utf8Max - utf8Count < uLen*6) {
1199+ // utf8 encoded characters can be up to 6 bytes
1200+ if (utf8Max > uLen*6)
1201+ utf8Max *= 2;
1202+ else
1203+ utf8Max += 2*uLen*6;
1204+ utf8 = (char *) grealloc (utf8, utf8Max);
1205+ }
1206+ clusters[clusterCount].num_bytes = 0;
1207+ for (int i = 0; i < uLen; i++) {
1208+ int size = mapUTF8 (u[i], utf8 + utf8Count, utf8Max - utf8Count);
1209+ utf8Count += size;
1210+ clusters[clusterCount].num_bytes += size;
1211+ }
1212+ clusters[clusterCount].num_glyphs = 1;
1213+ clusterCount++;
1214+ }
1215+ }
1216+
1217+ if (!text)
1218+ return;
1219+ actualText->addChar (state, x, y, dx, dy, code, nBytes, u, uLen);
1220+}
1221+
1222+void CairoOutputDev::endString(GfxState *state)
1223+{
1224+ int render;
1225+
1226+ if (!currentFont)
1227+ return;
1228+
1229+ // endString can be called without a corresponding beginString. If this
1230+ // happens glyphs will be null so don't draw anything, just return.
1231+ // XXX: OutputDevs should probably not have to deal with this...
1232+ if (!glyphs)
1233+ return;
1234+
1235+ // ignore empty strings and invisible text -- this is used by
1236+ // Acrobat Capture
1237+ render = state->getRender();
1238+ if (render == 3 || glyphCount == 0) {
1239+ gfree(glyphs);
1240+ glyphs = NULL;
1241+ return;
1242+ }
1243+
1244+ if (!(render & 1)) {
1245+ LOG (printf ("fill string\n"));
1246+ cairo_set_source (cairo, fill_pattern);
1247+ if (use_show_text_glyphs)
1248+ cairo_show_text_glyphs (cairo, utf8, utf8Count, glyphs, glyphCount, clusters, clusterCount, (cairo_text_cluster_flags_t)0);
1249+ else
1250+ cairo_show_glyphs (cairo, glyphs, glyphCount);
1251+ if (cairo_shape)
1252+ cairo_show_glyphs (cairo_shape, glyphs, glyphCount);
1253+ }
1254+
1255+ // stroke
1256+ if ((render & 3) == 1 || (render & 3) == 2) {
1257+ LOG (printf ("stroke string\n"));
1258+ cairo_set_source (cairo, stroke_pattern);
1259+ cairo_glyph_path (cairo, glyphs, glyphCount);
1260+ cairo_stroke (cairo);
1261+ if (cairo_shape) {
1262+ cairo_glyph_path (cairo_shape, glyphs, glyphCount);
1263+ cairo_stroke (cairo_shape);
1264+ }
1265+ }
1266+
1267+ // clip
1268+ if ((render & 4)) {
1269+ LOG (printf ("clip string\n"));
1270+ // append the glyph path to textClipPath.
1271+
1272+ // set textClipPath as the currentPath
1273+ if (textClipPath) {
1274+ cairo_append_path (cairo, textClipPath);
1275+ if (cairo_shape) {
1276+ cairo_append_path (cairo_shape, textClipPath);
1277+ }
1278+ cairo_path_destroy (textClipPath);
1279+ }
1280+
1281+ // append the glyph path
1282+ cairo_glyph_path (cairo, glyphs, glyphCount);
1283+
1284+ // move the path back into textClipPath
1285+ // and clear the current path
1286+ textClipPath = cairo_copy_path (cairo);
1287+ cairo_new_path (cairo);
1288+ if (cairo_shape) {
1289+ cairo_new_path (cairo_shape);
1290+ }
1291+ }
1292+
1293+ gfree (glyphs);
1294+ glyphs = NULL;
1295+ if (use_show_text_glyphs) {
1296+ gfree (clusters);
1297+ clusters = NULL;
1298+ gfree (utf8);
1299+ utf8 = NULL;
1300+ }
1301+}
1302+
1303+
1304+GBool CairoOutputDev::beginType3Char(GfxState *state, double x, double y,
1305+ double dx, double dy,
1306+ CharCode code, Unicode *u, int uLen) {
1307+
1308+ cairo_save (cairo);
1309+ double *ctm;
1310+ cairo_matrix_t matrix;
1311+
1312+ ctm = state->getCTM();
1313+ matrix.xx = ctm[0];
1314+ matrix.yx = ctm[1];
1315+ matrix.xy = ctm[2];
1316+ matrix.yy = ctm[3];
1317+ matrix.x0 = ctm[4];
1318+ matrix.y0 = ctm[5];
1319+ /* Restore the original matrix and then transform to matrix needed for the
1320+ * type3 font. This is ugly but seems to work. Perhaps there is a better way to do it?*/
1321+ cairo_set_matrix(cairo, &orig_matrix);
1322+ cairo_transform(cairo, &matrix);
1323+ if (cairo_shape) {
1324+ cairo_save (cairo_shape);
1325+ cairo_set_matrix(cairo_shape, &orig_matrix);
1326+ cairo_transform(cairo_shape, &matrix);
1327+ }
1328+ cairo_pattern_destroy(stroke_pattern);
1329+ cairo_pattern_reference(fill_pattern);
1330+ stroke_pattern = fill_pattern;
1331+ return gFalse;
1332+}
1333+
1334+void CairoOutputDev::endType3Char(GfxState *state) {
1335+ cairo_restore (cairo);
1336+ if (cairo_shape) {
1337+ cairo_restore (cairo_shape);
1338+ }
1339+}
1340+
1341+void CairoOutputDev::type3D0(GfxState *state, double wx, double wy) {
1342+ t3_glyph_wx = wx;
1343+ t3_glyph_wy = wy;
1344+}
1345+
1346+void CairoOutputDev::type3D1(GfxState *state, double wx, double wy,
1347+ double llx, double lly, double urx, double ury) {
1348+ t3_glyph_wx = wx;
1349+ t3_glyph_wy = wy;
1350+ t3_glyph_bbox[0] = llx;
1351+ t3_glyph_bbox[1] = lly;
1352+ t3_glyph_bbox[2] = urx;
1353+ t3_glyph_bbox[3] = ury;
1354+ t3_glyph_has_bbox = gTrue;
1355+}
1356+
1357+void CairoOutputDev::beginTextObject(GfxState *state) {
1358+}
1359+
1360+void CairoOutputDev::endTextObject(GfxState *state) {
1361+ if (textClipPath) {
1362+ // clip the accumulated text path
1363+ cairo_append_path (cairo, textClipPath);
1364+ cairo_clip (cairo);
1365+ if (cairo_shape) {
1366+ cairo_append_path (cairo_shape, textClipPath);
1367+ cairo_clip (cairo_shape);
1368+ }
1369+ cairo_path_destroy (textClipPath);
1370+ textClipPath = NULL;
1371+ }
1372+}
1373+
1374+void CairoOutputDev::beginActualText(GfxState *state, GooString *text)
1375+{
1376+ if (this->text)
1377+ actualText->begin(state, text);
1378+}
1379+
1380+void CairoOutputDev::endActualText(GfxState *state)
1381+{
1382+ if (text)
1383+ actualText->end(state);
1384+}
1385+
1386+static inline int splashRound(SplashCoord x) {
1387+ return (int)floor(x + 0.5);
1388+}
1389+
1390+static inline int splashCeil(SplashCoord x) {
1391+ return (int)ceil(x);
1392+}
1393+
1394+static inline int splashFloor(SplashCoord x) {
1395+ return (int)floor(x);
1396+}
1397+
1398+static
1399+cairo_surface_t *cairo_surface_create_similar_clip (cairo_t *cairo, cairo_content_t content)
1400+{
1401+ double x1, y1, x2, y2;
1402+ int width, height;
1403+ cairo_clip_extents (cairo, &x1, &y1, &x2, &y2);
1404+ cairo_matrix_t matrix;
1405+ cairo_get_matrix (cairo, &matrix);
1406+ //cairo_matrix_transform_point(&matrix, &x1, &y1);
1407+ //cairo_matrix_transform_point(&matrix, &x2, &y2);*/
1408+ cairo_user_to_device(cairo, &x1, &y1);
1409+ cairo_user_to_device(cairo, &x2, &y2);
1410+ width = splashCeil(x2) - splashFloor(x1);
1411+ //XXX: negative matrix
1412+ ////height = splashCeil(y2) - splashFloor(y1);
1413+ height = splashFloor(y1) - splashCeil(y2);
1414+ cairo_surface_t *target = cairo_get_target (cairo);
1415+ cairo_surface_t *result;
1416+
1417+ result = cairo_surface_create_similar (target, content, width, height);
1418+ double x_offset, y_offset;
1419+ cairo_surface_get_device_offset(target, &x_offset, &y_offset);
1420+ cairo_surface_set_device_offset(result, x_offset, y_offset);
1421+
1422+
1423+ return result;
1424+}
1425+
1426+
1427+
1428+void CairoOutputDev::beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
1429+ GfxColorSpace * blendingColorSpace,
1430+ GBool /*isolated*/, GBool knockout,
1431+ GBool forSoftMask) {
1432+ /* push color space */
1433+ ColorSpaceStack* css = new ColorSpaceStack;
1434+ css->cs = blendingColorSpace;
1435+ css->knockout = knockout;
1436+ cairo_get_matrix(cairo, &css->group_matrix);
1437+ css->next = groupColorSpaceStack;
1438+ groupColorSpaceStack = css;
1439+
1440+ LOG(printf ("begin transparency group. knockout: %s\n", knockout ? "yes":"no"));
1441+
1442+ if (knockout) {
1443+ knockoutCount++;
1444+ if (!cairo_shape) {
1445+ /* create a surface for tracking the shape */
1446+ cairo_surface_t *cairo_shape_surface = cairo_surface_create_similar_clip (cairo, CAIRO_CONTENT_ALPHA);
1447+ cairo_shape = cairo_create (cairo_shape_surface);
1448+ cairo_surface_destroy (cairo_shape_surface);
1449+
1450+ /* the color doesn't matter as long as it is opaque */
1451+ cairo_set_source_rgb (cairo_shape, 0, 0, 0);
1452+ cairo_matrix_t matrix;
1453+ cairo_get_matrix (cairo, &matrix);
1454+ //printMatrix(&matrix);
1455+ cairo_set_matrix (cairo_shape, &matrix);
1456+ } else {
1457+ cairo_reference (cairo_shape);
1458+ }
1459+ }
1460+ if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) {
1461+ /* we need to track the shape */
1462+ cairo_push_group (cairo_shape);
1463+ }
1464+ if (0 && forSoftMask)
1465+ cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA);
1466+ else
1467+ cairo_push_group (cairo);
1468+
1469+ /* push_group has an implicit cairo_save() */
1470+ if (knockout) {
1471+ /*XXX: let's hope this matches the semantics needed */
1472+ cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE);
1473+ } else {
1474+ cairo_set_operator(cairo, CAIRO_OPERATOR_OVER);
1475+ }
1476+}
1477+
1478+void CairoOutputDev::endTransparencyGroup(GfxState * /*state*/) {
1479+ if (group)
1480+ cairo_pattern_destroy(group);
1481+ group = cairo_pop_group (cairo);
1482+
1483+ LOG(printf ("end transparency group\n"));
1484+
1485+ if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) {
1486+ if (shape)
1487+ cairo_pattern_destroy(shape);
1488+ shape = cairo_pop_group (cairo_shape);
1489+ }
1490+}
1491+
1492+void CairoOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {
1493+ LOG(printf ("paint transparency group\n"));
1494+
1495+ cairo_save (cairo);
1496+ cairo_set_matrix (cairo, &groupColorSpaceStack->group_matrix);
1497+ cairo_set_source (cairo, group);
1498+
1499+ if (!mask) {
1500+ //XXX: deal with mask && shape case
1501+ if (shape) {
1502+ cairo_save (cairo);
1503+
1504+ /* OPERATOR_SOURCE w/ a mask is defined as (src IN mask) ADD (dest OUT mask)
1505+ * however our source has already been clipped to mask so we only need to
1506+ * do ADD and OUT */
1507+
1508+ /* clear the shape mask */
1509+ cairo_set_source (cairo, shape);
1510+ cairo_set_operator (cairo, CAIRO_OPERATOR_DEST_OUT);
1511+ cairo_paint (cairo);
1512+
1513+ cairo_set_operator (cairo, CAIRO_OPERATOR_ADD);
1514+ cairo_set_source (cairo, group);
1515+ cairo_paint (cairo);
1516+
1517+ cairo_restore (cairo);
1518+
1519+ cairo_pattern_destroy (shape);
1520+ shape = NULL;
1521+ } else {
1522+ cairo_paint_with_alpha (cairo, fill_opacity);
1523+ }
1524+ cairo_status_t status = cairo_status(cairo);
1525+ if (status)
1526+ printf("BAD status: %s\n", cairo_status_to_string(status));
1527+ } else {
1528+ if (fill_opacity < 1.0) {
1529+ cairo_push_group(cairo);
1530+ }
1531+ cairo_save(cairo);
1532+ cairo_set_matrix(cairo, &mask_matrix);
1533+ cairo_mask(cairo, mask);
1534+ cairo_restore(cairo);
1535+ if (fill_opacity < 1.0) {
1536+ cairo_pop_group_to_source(cairo);
1537+ cairo_paint_with_alpha (cairo, fill_opacity);
1538+ }
1539+ cairo_pattern_destroy(mask);
1540+ mask = NULL;
1541+ }
1542+
1543+ popTransparencyGroup();
1544+ cairo_restore(cairo);
1545+}
1546+
1547+static int luminocity(uint32_t x)
1548+{
1549+ int r = (x >> 16) & 0xff;
1550+ int g = (x >> 8) & 0xff;
1551+ int b = (x >> 0) & 0xff;
1552+ // an arbitrary integer approximation of .3*r + .59*g + .11*b
1553+ int y = (r*19661+g*38666+b*7209 + 32829)>>16;
1554+ return y;
1555+}
1556+
1557+
1558+/* XXX: do we need to deal with shape here? */
1559+void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha,
1560+ Function * transferFunc, GfxColor * backdropColor) {
1561+ cairo_pattern_destroy(mask);
1562+
1563+ LOG(printf ("set softMask\n"));
1564+
1565+ if (alpha == false) {
1566+ /* We need to mask according to the luminocity of the group.
1567+ * So we paint the group to an image surface convert it to a luminocity map
1568+ * and then use that as the mask. */
1569+
1570+ /* Get clip extents in device space */
1571+ double x1, y1, x2, y2, x_min, y_min, x_max, y_max;
1572+ cairo_clip_extents(cairo, &x1, &y1, &x2, &y2);
1573+ cairo_user_to_device(cairo, &x1, &y1);
1574+ cairo_user_to_device(cairo, &x2, &y2);
1575+ x_min = MIN(x1, x2);
1576+ y_min = MIN(y1, y2);
1577+ x_max = MAX(x1, x2);
1578+ y_max = MAX(y1, y2);
1579+ cairo_clip_extents(cairo, &x1, &y1, &x2, &y2);
1580+ cairo_user_to_device(cairo, &x1, &y2);
1581+ cairo_user_to_device(cairo, &x2, &y1);
1582+ x_min = MIN(x_min,MIN(x1, x2));
1583+ y_min = MIN(y_min,MIN(y1, y2));
1584+ x_max = MAX(x_max,MAX(x1, x2));
1585+ y_max = MAX(y_max,MAX(y1, y2));
1586+
1587+ int width = (int)(ceil(x_max) - floor(x_min));
1588+ int height = (int)(ceil(y_max) - floor(y_min));
1589+
1590+ /* Get group device offset */
1591+ double x_offset, y_offset;
1592+ if (cairo_get_group_target(cairo) == cairo_get_target(cairo)) {
1593+ cairo_surface_get_device_offset(cairo_get_group_target(cairo), &x_offset, &y_offset);
1594+ } else {
1595+ cairo_surface_t *pats;
1596+ cairo_pattern_get_surface(group, &pats);
1597+ cairo_surface_get_device_offset(pats, &x_offset, &y_offset);
1598+ }
1599+
1600+ /* Adjust extents by group offset */
1601+ x_min += x_offset;
1602+ y_min += y_offset;
1603+
1604+ cairo_surface_t *source = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
1605+ cairo_t *maskCtx = cairo_create(source);
1606+
1607+ //XXX: hopefully this uses the correct color space */
1608+ GfxRGB backdropColorRGB;
1609+ groupColorSpaceStack->cs->getRGB(backdropColor, &backdropColorRGB);
1610+ /* paint the backdrop */
1611+ cairo_set_source_rgb(maskCtx,
1612+ colToDbl(backdropColorRGB.r),
1613+ colToDbl(backdropColorRGB.g),
1614+ colToDbl(backdropColorRGB.b));
1615+ cairo_paint(maskCtx);
1616+
1617+ /* Copy source ctm to mask ctm and translate origin so that the
1618+ * mask appears it the same location on the source surface. */
1619+ cairo_matrix_t mat, tmat;
1620+ cairo_matrix_init_translate(&tmat, -x_min, -y_min);
1621+ cairo_get_matrix(cairo, &mat);
1622+ cairo_matrix_multiply(&mat, &mat, &tmat);
1623+ cairo_set_matrix(maskCtx, &mat);
1624+
1625+ /* make the device offset of the new mask match that of the group */
1626+ cairo_surface_set_device_offset(source, x_offset, y_offset);
1627+
1628+ /* paint the group */
1629+ cairo_set_source(maskCtx, group);
1630+ cairo_paint(maskCtx);
1631+
1632+ /* XXX status = cairo_status(maskCtx); */
1633+ cairo_destroy(maskCtx);
1634+
1635+ /* convert to a luminocity map */
1636+ uint32_t *source_data = (uint32_t*)cairo_image_surface_get_data(source);
1637+ /* get stride in units of 32 bits */
1638+ int stride = cairo_image_surface_get_stride(source)/4;
1639+ for (int y=0; y<height; y++) {
1640+ for (int x=0; x<width; x++) {
1641+ int lum;
1642+ lum = luminocity(source_data[y*stride + x]);
1643+ if (transferFunc) {
1644+ double lum_in, lum_out;
1645+ lum_in = lum/256.0;
1646+ transferFunc->transform(&lum_in, &lum_out);
1647+ lum = (int)(lum_out * 255.0 + 0.5);
1648+ }
1649+ source_data[y*stride + x] = lum << 24;
1650+ }
1651+ }
1652+ cairo_surface_mark_dirty (source);
1653+
1654+ /* setup the new mask pattern */
1655+ mask = cairo_pattern_create_for_surface(source);
1656+ cairo_get_matrix(cairo, &mask_matrix);
1657+
1658+ if (cairo_get_group_target(cairo) == cairo_get_target(cairo)) {
1659+ cairo_pattern_set_matrix(mask, &mat);
1660+ } else {
1661+ cairo_matrix_t patMatrix;
1662+ cairo_pattern_get_matrix(group, &patMatrix);
1663+ /* Apply x_min, y_min offset to it appears in the same location as source. */
1664+ cairo_matrix_multiply(&patMatrix, &patMatrix, &tmat);
1665+ cairo_pattern_set_matrix(mask, &patMatrix);
1666+ }
1667+
1668+ cairo_surface_destroy(source);
1669+ } else {
1670+ mask = cairo_pattern_reference(group);
1671+ cairo_get_matrix(cairo, &mask_matrix);
1672+ }
1673+
1674+ popTransparencyGroup();
1675+}
1676+
1677+void CairoOutputDev::popTransparencyGroup() {
1678+ /* pop color space */
1679+ ColorSpaceStack *css = groupColorSpaceStack;
1680+ if (css->knockout) {
1681+ knockoutCount--;
1682+ if (!knockoutCount) {
1683+ /* we don't need to track the shape anymore because
1684+ * we are not above any knockout groups */
1685+ cairo_destroy(cairo_shape);
1686+ cairo_shape = NULL;
1687+ }
1688+ }
1689+ groupColorSpaceStack = css->next;
1690+ delete css;
1691+}
1692+
1693+
1694+void CairoOutputDev::clearSoftMask(GfxState * /*state*/) {
1695+ if (mask)
1696+ cairo_pattern_destroy(mask);
1697+ mask = NULL;
1698+}
1699+
1700+/* Taken from cairo/doc/tutorial/src/singular.c */
1701+static void
1702+get_singular_values (const cairo_matrix_t *matrix,
1703+ double *major,
1704+ double *minor)
1705+{
1706+ double xx = matrix->xx, xy = matrix->xy;
1707+ double yx = matrix->yx, yy = matrix->yy;
1708+
1709+ double a = xx*xx+yx*yx;
1710+ double b = xy*xy+yy*yy;
1711+ double k = xx*xy+yx*yy;
1712+
1713+ double f = (a+b) * .5;
1714+ double g = (a-b) * .5;
1715+ double delta = sqrt (g*g + k*k);
1716+
1717+ if (major)
1718+ *major = sqrt (f + delta);
1719+ if (minor)
1720+ *minor = sqrt (f - delta);
1721+}
1722+
1723+void CairoOutputDev::getScaledSize(int orig_width,
1724+ int orig_height,
1725+ int *scaledWidth,
1726+ int *scaledHeight) {
1727+ cairo_matrix_t matrix;
1728+ cairo_get_matrix(cairo, &matrix);
1729+
1730+ double xScale;
1731+ double yScale;
1732+ if (orig_width > orig_height)
1733+ get_singular_values (&matrix, &xScale, &yScale);
1734+ else
1735+ get_singular_values (&matrix, &yScale, &xScale);
1736+
1737+ int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */
1738+ if (xScale >= 0) {
1739+ tx = splashRound(matrix.x0 - 0.01);
1740+ tx2 = splashRound(matrix.x0 + xScale + 0.01) - 1;
1741+ } else {
1742+ tx = splashRound(matrix.x0 + 0.01) - 1;
1743+ tx2 = splashRound(matrix.x0 + xScale - 0.01);
1744+ }
1745+ *scaledWidth = abs(tx2 - tx) + 1;
1746+ //scaledWidth = splashRound(fabs(xScale));
1747+ if (*scaledWidth == 0) {
1748+ // technically, this should draw nothing, but it generally seems
1749+ // better to draw a one-pixel-wide stripe rather than throwing it
1750+ // away
1751+ *scaledWidth = 1;
1752+ }
1753+ if (yScale >= 0) {
1754+ ty = splashFloor(matrix.y0 + 0.01);
1755+ ty2 = splashCeil(matrix.y0 + yScale - 0.01);
1756+ } else {
1757+ ty = splashCeil(matrix.y0 - 0.01);
1758+ ty2 = splashFloor(matrix.y0 + yScale + 0.01);
1759+ }
1760+ *scaledHeight = abs(ty2 - ty);
1761+ if (*scaledHeight == 0) {
1762+ *scaledHeight = 1;
1763+ }
1764+}
1765+
1766+cairo_surface_t *CairoOutputDev::downscaleSurface(cairo_surface_t *orig_surface) {
1767+ cairo_surface_t *dest_surface;
1768+ unsigned char *dest_buffer;
1769+ int dest_stride;
1770+ unsigned char *orig_buffer;
1771+ int orig_width, orig_height;
1772+ int orig_stride;
1773+ int scaledHeight;
1774+ int scaledWidth;
1775+ GBool res;
1776+
1777+ if (printing)
1778+ return NULL;
1779+
1780+ orig_width = cairo_image_surface_get_width (orig_surface);
1781+ orig_height = cairo_image_surface_get_height (orig_surface);
1782+ getScaledSize (orig_width, orig_height, &scaledWidth, &scaledHeight);
1783+ if (scaledWidth >= orig_width || scaledHeight >= orig_height)
1784+ return NULL;
1785+
1786+ dest_surface = cairo_surface_create_similar (orig_surface,
1787+ cairo_surface_get_content (orig_surface),
1788+ scaledWidth, scaledHeight);
1789+ dest_buffer = cairo_image_surface_get_data (dest_surface);
1790+ dest_stride = cairo_image_surface_get_stride (dest_surface);
1791+
1792+ orig_buffer = cairo_image_surface_get_data (orig_surface);
1793+ orig_stride = cairo_image_surface_get_stride (orig_surface);
1794+
1795+ res = downscale_box_filter((uint32_t *)orig_buffer,
1796+ orig_stride, orig_width, orig_height,
1797+ scaledWidth, scaledHeight, 0, 0,
1798+ scaledWidth, scaledHeight,
1799+ (uint32_t *)dest_buffer, dest_stride);
1800+ if (!res) {
1801+ cairo_surface_destroy (dest_surface);
1802+ return NULL;
1803+ }
1804+
1805+ return dest_surface;
1806+
1807+}
1808+
1809+cairo_filter_t
1810+CairoOutputDev::getFilterForSurface(cairo_surface_t *image,
1811+ GBool interpolate)
1812+{
1813+ if (interpolate)
1814+ return CAIRO_FILTER_BILINEAR;
1815+
1816+ int orig_width = cairo_image_surface_get_width (image);
1817+ int orig_height = cairo_image_surface_get_height (image);
1818+ if (orig_width == 0 || orig_height == 0)
1819+ return CAIRO_FILTER_NEAREST;
1820+
1821+ int scaled_width, scaled_height;
1822+ getScaledSize (orig_width, orig_height, &scaled_width, &scaled_height);
1823+
1824+ /* When scale factor is >= 400% we don't interpolate. See bugs #25268, #9860 */
1825+ if (scaled_width / orig_width >= 4 || scaled_height / orig_height >= 4)
1826+ return CAIRO_FILTER_NEAREST;
1827+
1828+ return CAIRO_FILTER_BILINEAR;
1829+}
1830+
1831+void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
1832+ int width, int height, GBool invert,
1833+ GBool interpolate, GBool inlineImg) {
1834+
1835+ /* FIXME: Doesn't the image mask support any colorspace? */
1836+ cairo_set_source (cairo, fill_pattern);
1837+
1838+ /* work around a cairo bug when scaling 1x1 surfaces */
1839+ if (width == 1 && height == 1) {
1840+ ImageStream *imgStr;
1841+ Guchar pix;
1842+ int invert_bit;
1843+
1844+ imgStr = new ImageStream(str, width, 1, 1);
1845+ imgStr->reset();
1846+ imgStr->getPixel(&pix);
1847+ imgStr->close();
1848+ delete imgStr;
1849+
1850+ invert_bit = invert ? 1 : 0;
1851+ if (pix ^ invert_bit)
1852+ return;
1853+
1854+ cairo_save (cairo);
1855+ cairo_rectangle (cairo, 0., 0., width, height);
1856+ cairo_fill (cairo);
1857+ cairo_restore (cairo);
1858+ if (cairo_shape) {
1859+ cairo_save (cairo_shape);
1860+ cairo_rectangle (cairo_shape, 0., 0., width, height);
1861+ cairo_fill (cairo_shape);
1862+ cairo_restore (cairo_shape);
1863+ }
1864+ return;
1865+ }
1866+
1867+ /* shape is 1.0 for painted areas, 0.0 for unpainted ones */
1868+
1869+ cairo_matrix_t matrix;
1870+ cairo_get_matrix (cairo, &matrix);
1871+ //XXX: it is possible that we should only do sub pixel positioning if
1872+ // we are rendering fonts */
1873+ if (!printing && prescaleImages
1874+ /* not rotated */
1875+ && matrix.xy == 0 && matrix.yx == 0
1876+ /* axes not flipped / not 180 deg rotated */
1877+ && matrix.xx > 0 && (upsideDown() ? -1 : 1) * matrix.yy > 0) {
1878+ drawImageMaskPrescaled(state, ref, str, width, height, invert, interpolate, inlineImg);
1879+ } else {
1880+ drawImageMaskRegular(state, ref, str, width, height, invert, interpolate, inlineImg);
1881+ }
1882+
1883+}
1884+
1885+void CairoOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str,
1886+ int width, int height, GBool invert,
1887+ GBool inlineImg, double *baseMatrix) {
1888+
1889+ /* FIXME: Doesn't the image mask support any colorspace? */
1890+ cairo_set_source (cairo, fill_pattern);
1891+
1892+ /* work around a cairo bug when scaling 1x1 surfaces */
1893+ if (width == 1 && height == 1) {
1894+ ImageStream *imgStr;
1895+ Guchar pix;
1896+ int invert_bit;
1897+
1898+ imgStr = new ImageStream(str, width, 1, 1);
1899+ imgStr->reset();
1900+ imgStr->getPixel(&pix);
1901+ imgStr->close();
1902+ delete imgStr;
1903+
1904+ invert_bit = invert ? 1 : 0;
1905+ if (pix ^ invert_bit)
1906+ return;
1907+
1908+ cairo_save (cairo);
1909+ cairo_rectangle (cairo, 0., 0., width, height);
1910+ cairo_fill (cairo);
1911+ cairo_restore (cairo);
1912+ if (cairo_shape) {
1913+ cairo_save (cairo_shape);
1914+ cairo_rectangle (cairo_shape, 0., 0., width, height);
1915+ cairo_fill (cairo_shape);
1916+ cairo_restore (cairo_shape);
1917+ }
1918+ return;
1919+ }
1920+
1921+ cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA);
1922+
1923+ /* shape is 1.0 for painted areas, 0.0 for unpainted ones */
1924+
1925+ cairo_matrix_t matrix;
1926+ cairo_get_matrix (cairo, &matrix);
1927+ //XXX: it is possible that we should only do sub pixel positioning if
1928+ // we are rendering fonts */
1929+ if (!printing && prescaleImages && matrix.xy == 0.0 && matrix.yx == 0.0) {
1930+ drawImageMaskPrescaled(state, ref, str, width, height, invert, gFalse, inlineImg);
1931+ } else {
1932+ drawImageMaskRegular(state, ref, str, width, height, invert, gFalse, inlineImg);
1933+ }
1934+
1935+ if (state->getFillColorSpace()->getMode() == csPattern) {
1936+ cairo_set_source_rgb (cairo, 1, 1, 1);
1937+ cairo_set_matrix (cairo, &mask_matrix);
1938+ cairo_mask (cairo, mask);
1939+ }
1940+
1941+ if (mask)
1942+ cairo_pattern_destroy (mask);
1943+ mask = cairo_pop_group (cairo);
1944+
1945+ saveState(state);
1946+ double bbox[4] = {0,0,1,1}; // dummy
1947+ beginTransparencyGroup(state, bbox, state->getFillColorSpace(),
1948+ gTrue, gFalse, gFalse);
1949+}
1950+
1951+void CairoOutputDev::unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) {
1952+ double bbox[4] = {0,0,1,1}; // dummy
1953+
1954+ endTransparencyGroup(state);
1955+ restoreState(state);
1956+ paintTransparencyGroup(state, bbox);
1957+ clearSoftMask(state);
1958+}
1959+
1960+void CairoOutputDev::drawImageMaskRegular(GfxState *state, Object *ref, Stream *str,
1961+ int width, int height, GBool invert,
1962+ GBool interpolate, GBool inlineImg) {
1963+ unsigned char *buffer;
1964+ unsigned char *dest;
1965+ cairo_surface_t *image;
1966+ cairo_pattern_t *pattern;
1967+ int x, y, i, bit;
1968+ ImageStream *imgStr;
1969+ Guchar *pix;
1970+ cairo_matrix_t matrix;
1971+ int invert_bit;
1972+ int row_stride;
1973+ cairo_filter_t filter;
1974+
1975+ /* TODO: Do we want to cache these? */
1976+ imgStr = new ImageStream(str, width, 1, 1);
1977+ imgStr->reset();
1978+
1979+ image = cairo_image_surface_create (CAIRO_FORMAT_A1, width, height);
1980+ if (cairo_surface_status (image))
1981+ goto cleanup;
1982+
1983+ buffer = cairo_image_surface_get_data (image);
1984+ row_stride = cairo_image_surface_get_stride (image);
1985+
1986+ invert_bit = invert ? 1 : 0;
1987+
1988+ for (y = 0; y < height; y++) {
1989+ pix = imgStr->getLine();
1990+ dest = buffer + y * row_stride;
1991+ i = 0;
1992+ bit = 0;
1993+ for (x = 0; x < width; x++) {
1994+ if (bit == 0)
1995+ dest[i] = 0;
1996+ if (!(pix[x] ^ invert_bit)) {
1997+#ifdef WORDS_BIGENDIAN
1998+ dest[i] |= (1 << (7 - bit));
1999+#else
2000+ dest[i] |= (1 << bit);
2001+#endif
2002+ }
2003+ bit++;
2004+ if (bit > 7) {
2005+ bit = 0;
2006+ i++;
2007+ }
2008+ }
2009+ }
2010+
2011+ filter = getFilterForSurface (image, interpolate);
2012+
2013+ cairo_surface_mark_dirty (image);
2014+ pattern = cairo_pattern_create_for_surface (image);
2015+ cairo_surface_destroy (image);
2016+ if (cairo_pattern_status (pattern))
2017+ goto cleanup;
2018+
2019+ LOG (printf ("drawImageMask %dx%d\n", width, height));
2020+
2021+ cairo_pattern_set_filter (pattern, filter);
2022+
2023+ if (!printing)
2024+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
2025+
2026+ cairo_matrix_init_translate (&matrix, 0, height);
2027+ cairo_matrix_scale (&matrix, width, -height);
2028+ cairo_pattern_set_matrix (pattern, &matrix);
2029+ if (cairo_pattern_status (pattern)) {
2030+ cairo_pattern_destroy (pattern);
2031+ goto cleanup;
2032+ }
2033+
2034+ if (state->getFillColorSpace()->getMode() == csPattern) {
2035+ mask = cairo_pattern_reference (pattern);
2036+ cairo_get_matrix (cairo, &mask_matrix);
2037+ } else if (!printing) {
2038+ cairo_save (cairo);
2039+ cairo_rectangle (cairo, 0., 0., 1., 1.);
2040+ cairo_clip (cairo);
2041+ cairo_mask (cairo, pattern);
2042+ cairo_restore (cairo);
2043+ } else {
2044+ cairo_mask (cairo, pattern);
2045+ }
2046+
2047+ if (cairo_shape) {
2048+ cairo_save (cairo_shape);
2049+ cairo_set_source (cairo_shape, pattern);
2050+ if (!printing) {
2051+ cairo_rectangle (cairo_shape, 0., 0., 1., 1.);
2052+ cairo_fill (cairo_shape);
2053+ } else {
2054+ cairo_mask (cairo_shape, pattern);
2055+ }
2056+ cairo_restore (cairo_shape);
2057+ }
2058+
2059+ cairo_pattern_destroy (pattern);
2060+
2061+cleanup:
2062+ imgStr->close();
2063+ delete imgStr;
2064+}
2065+
2066+
2067+void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str,
2068+ int width, int height, GBool invert,
2069+ GBool interpolate, GBool inlineImg) {
2070+ unsigned char *buffer;
2071+ cairo_surface_t *image;
2072+ cairo_pattern_t *pattern;
2073+ ImageStream *imgStr;
2074+ Guchar *pix;
2075+ cairo_matrix_t matrix;
2076+ int invert_bit;
2077+ int row_stride;
2078+
2079+ /* cairo does a very poor job of scaling down images so we scale them ourselves */
2080+
2081+ LOG (printf ("drawImageMaskPrescaled %dx%d\n", width, height));
2082+
2083+ /* this scaling code is adopted from the splash image scaling code */
2084+ cairo_get_matrix(cairo, &matrix);
2085+#if 0
2086+ printf("[%f %f], [%f %f], %f %f\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0);
2087+#endif
2088+ /* this whole computation should be factored out */
2089+ double xScale = matrix.xx;
2090+ double yScale = matrix.yy;
2091+ int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */
2092+ int scaledHeight;
2093+ int scaledWidth;
2094+ if (xScale >= 0) {
2095+ tx = splashRound(matrix.x0 - 0.01);
2096+ tx2 = splashRound(matrix.x0 + xScale + 0.01) - 1;
2097+ } else {
2098+ tx = splashRound(matrix.x0 + 0.01) - 1;
2099+ tx2 = splashRound(matrix.x0 + xScale - 0.01);
2100+ }
2101+ scaledWidth = abs(tx2 - tx) + 1;
2102+ //scaledWidth = splashRound(fabs(xScale));
2103+ if (scaledWidth == 0) {
2104+ // technically, this should draw nothing, but it generally seems
2105+ // better to draw a one-pixel-wide stripe rather than throwing it
2106+ // away
2107+ scaledWidth = 1;
2108+ }
2109+ if (yScale >= 0) {
2110+ ty = splashFloor(matrix.y0 + 0.01);
2111+ ty2 = splashCeil(matrix.y0 + yScale - 0.01);
2112+ } else {
2113+ ty = splashCeil(matrix.y0 - 0.01);
2114+ ty2 = splashFloor(matrix.y0 + yScale + 0.01);
2115+ }
2116+ scaledHeight = abs(ty2 - ty);
2117+ if (scaledHeight == 0) {
2118+ scaledHeight = 1;
2119+ }
2120+#if 0
2121+ printf("xscale: %g, yscale: %g\n", xScale, yScale);
2122+ printf("width: %d, height: %d\n", width, height);
2123+ printf("scaledWidth: %d, scaledHeight: %d\n", scaledWidth, scaledHeight);
2124+#endif
2125+
2126+ /* compute the required padding */
2127+ /* Padding is used to preserve the aspect ratio.
2128+ We compute total_pad to make (height+total_pad)/scaledHeight as close to height/yScale as possible */
2129+ int head_pad = 0;
2130+ int tail_pad = 0;
2131+ int total_pad = splashRound(height*(scaledHeight/fabs(yScale)) - height);
2132+
2133+ /* compute the two pieces of padding */
2134+ if (total_pad > 0) {
2135+ //XXX: i'm not positive fabs() is correct
2136+ float tail_error = fabs(matrix.y0 - ty);
2137+ float head_error = fabs(ty2 - (matrix.y0 + yScale));
2138+ float tail_fraction = tail_error/(tail_error + head_error);
2139+ tail_pad = splashRound(total_pad*tail_fraction);
2140+ head_pad = total_pad - tail_pad;
2141+ } else {
2142+ tail_pad = 0;
2143+ head_pad = 0;
2144+ }
2145+ int origHeight = height;
2146+ height += tail_pad;
2147+ height += head_pad;
2148+#if 0
2149+ printf("head_pad: %d tail_pad: %d\n", head_pad, tail_pad);
2150+ printf("origHeight: %d height: %d\n", origHeight, height);
2151+ printf("ty: %d, ty2: %d\n", ty, ty2);
2152+#endif
2153+
2154+ /* TODO: Do we want to cache these? */
2155+ imgStr = new ImageStream(str, width, 1, 1);
2156+ imgStr->reset();
2157+
2158+ invert_bit = invert ? 1 : 0;
2159+
2160+ image = cairo_image_surface_create (CAIRO_FORMAT_A8, scaledWidth, scaledHeight);
2161+ if (cairo_surface_status (image)) {
2162+ imgStr->close();
2163+ delete imgStr;
2164+ return;
2165+ }
2166+
2167+ buffer = cairo_image_surface_get_data (image);
2168+ row_stride = cairo_image_surface_get_stride (image);
2169+
2170+ int yp = height / scaledHeight;
2171+ int yq = height % scaledHeight;
2172+ int xp = width / scaledWidth;
2173+ int xq = width % scaledWidth;
2174+ int yt = 0;
2175+ int origHeight_c = origHeight;
2176+ /* use MIN() because yp might be > origHeight because of padding */
2177+ unsigned char *pixBuf = (unsigned char *)malloc(MIN(yp+1, origHeight)*width);
2178+ int lastYStep = 1;
2179+ int total = 0;
2180+ for (int y = 0; y < scaledHeight; y++) {
2181+ // y scale Bresenham
2182+ int yStep = yp;
2183+ yt += yq;
2184+
2185+ if (yt >= scaledHeight) {
2186+ yt -= scaledHeight;
2187+ ++yStep;
2188+ }
2189+
2190+ // read row (s) from image ignoring the padding as appropriate
2191+ {
2192+ int n = (yp > 0) ? yStep : lastYStep;
2193+ total += n;
2194+ if (n > 0) {
2195+ unsigned char *p = pixBuf;
2196+ int head_pad_count = head_pad;
2197+ int origHeight_count = origHeight;
2198+ int tail_pad_count = tail_pad;
2199+ for (int i=0; i<n; i++) {
2200+ // get row
2201+ if (head_pad_count) {
2202+ head_pad_count--;
2203+ } else if (origHeight_count) {
2204+ pix = imgStr->getLine();
2205+ for (int j=0; j<width; j++) {
2206+ if (pix[j] ^ invert_bit)
2207+ p[j] = 0;
2208+ else
2209+ p[j] = 255;
2210+ }
2211+ origHeight_count--;
2212+ p += width;
2213+ } else if (tail_pad_count) {
2214+ tail_pad_count--;
2215+ } else {
2216+ printf("%d %d\n", n, total);
2217+ assert(0 && "over run\n");
2218+ }
2219+ }
2220+ }
2221+ }
2222+
2223+ lastYStep = yStep;
2224+ int k1 = y;
2225+
2226+ int xt = 0;
2227+ int xSrc = 0;
2228+ int x1 = k1;
2229+ int n = yStep > 0 ? yStep : 1;
2230+ int origN = n;
2231+
2232+ /* compute the size of padding and pixels that will be used for this row */
2233+ int head_pad_size = MIN(n, head_pad);
2234+ n -= head_pad_size;
2235+ head_pad -= MIN(head_pad_size, yStep);
2236+
2237+ int pix_size = MIN(n, origHeight);
2238+ n -= pix_size;
2239+ origHeight -= MIN(pix_size, yStep);
2240+
2241+ int tail_pad_size = MIN(n, tail_pad);
2242+ n -= tail_pad_size;
2243+ tail_pad -= MIN(tail_pad_size, yStep);
2244+ if (n != 0) {
2245+ printf("n = %d (%d %d %d)\n", n, head_pad_size, pix_size, tail_pad_size);
2246+ assert(n == 0);
2247+ }
2248+
2249+ for (int x = 0; x < scaledWidth; ++x) {
2250+ int xStep = xp;
2251+ xt += xq;
2252+ if (xt >= scaledWidth) {
2253+ xt -= scaledWidth;
2254+ ++xStep;
2255+ }
2256+ int m = xStep > 0 ? xStep : 1;
2257+ float pixAcc0 = 0;
2258+ /* could m * head_pad_size * tail_pad_size overflow? */
2259+ if (invert_bit) {
2260+ pixAcc0 += m * head_pad_size * tail_pad_size * 255;
2261+ } else {
2262+ pixAcc0 += m * head_pad_size * tail_pad_size * 0;
2263+ }
2264+ /* Accumulate all of the source pixels for the destination pixel */
2265+ for (int i = 0; i < pix_size; ++i) {
2266+ for (int j = 0; j< m; ++j) {
2267+ if (xSrc + i*width + j > MIN(yp + 1, origHeight_c)*width) {
2268+ printf("%d > %d (%d %d %d %d) (%d %d %d)\n", xSrc + i*width + j, MIN(yp + 1, origHeight_c)*width, xSrc, i , width, j, yp, origHeight_c, width);
2269+ printf("%d %d %d\n", head_pad_size, pix_size, tail_pad_size);
2270+ assert(0 && "bad access\n");
2271+ }
2272+ pixAcc0 += pixBuf[xSrc + i*width + j];
2273+ }
2274+ }
2275+ buffer[y * row_stride + x] = splashFloor(pixAcc0 / (origN*m));
2276+ xSrc += xStep;
2277+ x1 += 1;
2278+ }
2279+
2280+ }
2281+ free(pixBuf);
2282+
2283+ cairo_surface_mark_dirty (image);
2284+ pattern = cairo_pattern_create_for_surface (image);
2285+ cairo_surface_destroy (image);
2286+ if (cairo_pattern_status (pattern)) {
2287+ imgStr->close();
2288+ delete imgStr;
2289+ return;
2290+ }
2291+
2292+ /* we should actually be using CAIRO_FILTER_NEAREST here. However,
2293+ * cairo doesn't yet do minifaction filtering causing scaled down
2294+ * images with CAIRO_FILTER_NEAREST to look really bad */
2295+ cairo_pattern_set_filter (pattern,
2296+ interpolate ? CAIRO_FILTER_BEST : CAIRO_FILTER_FAST);
2297+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
2298+
2299+ if (state->getFillColorSpace()->getMode() == csPattern) {
2300+ cairo_matrix_init_translate (&matrix, 0, scaledHeight);
2301+ cairo_matrix_scale (&matrix, scaledWidth, -scaledHeight);
2302+ cairo_pattern_set_matrix (pattern, &matrix);
2303+ if (cairo_pattern_status (pattern)) {
2304+ cairo_pattern_destroy (pattern);
2305+ imgStr->close();
2306+ delete imgStr;
2307+ return;
2308+ }
2309+
2310+ mask = cairo_pattern_reference (pattern);
2311+ cairo_get_matrix (cairo, &mask_matrix);
2312+ } else {
2313+ cairo_save (cairo);
2314+
2315+ /* modify our current transformation so that the prescaled image
2316+ * goes where it is supposed to */
2317+ cairo_get_matrix(cairo, &matrix);
2318+ cairo_scale(cairo, 1.0/matrix.xx, 1.0/matrix.yy);
2319+ // get integer co-ords
2320+ cairo_translate (cairo, tx - matrix.x0, ty2 - matrix.y0);
2321+ if (yScale > 0)
2322+ cairo_scale(cairo, 1, -1);
2323+
2324+ cairo_rectangle (cairo, 0., 0., scaledWidth, scaledHeight);
2325+ cairo_clip (cairo);
2326+ cairo_mask (cairo, pattern);
2327+
2328+ //cairo_get_matrix(cairo, &matrix);
2329+ //printf("mask at: [%f %f], [%f %f], %f %f\n\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0);
2330+ cairo_restore(cairo);
2331+ }
2332+
2333+ if (cairo_shape) {
2334+ cairo_save (cairo_shape);
2335+
2336+ /* modify our current transformation so that the prescaled image
2337+ * goes where it is supposed to */
2338+ cairo_get_matrix(cairo_shape, &matrix);
2339+ cairo_scale(cairo_shape, 1.0/matrix.xx, 1.0/matrix.yy);
2340+ // get integer co-ords
2341+ cairo_translate (cairo_shape, tx - matrix.x0, ty2 - matrix.y0);
2342+ if (yScale > 0)
2343+ cairo_scale(cairo_shape, 1, -1);
2344+
2345+ cairo_rectangle (cairo_shape, 0., 0., scaledWidth, scaledHeight);
2346+ cairo_fill (cairo_shape);
2347+
2348+ cairo_restore(cairo_shape);
2349+ }
2350+
2351+ cairo_pattern_destroy (pattern);
2352+
2353+ imgStr->close();
2354+ delete imgStr;
2355+}
2356+
2357+void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
2358+ Stream *str, int width, int height,
2359+ GfxImageColorMap *colorMap,
2360+ GBool interpolate,
2361+ Stream *maskStr, int maskWidth,
2362+ int maskHeight, GBool maskInvert,
2363+ GBool maskInterpolate)
2364+{
2365+ ImageStream *maskImgStr, *imgStr;
2366+ int row_stride;
2367+ unsigned char *maskBuffer, *buffer;
2368+ unsigned char *maskDest;
2369+ unsigned int *dest;
2370+ cairo_surface_t *maskImage, *image;
2371+ cairo_pattern_t *maskPattern, *pattern;
2372+ cairo_matrix_t matrix;
2373+ cairo_matrix_t maskMatrix;
2374+ Guchar *pix;
2375+ int x, y;
2376+ int invert_bit;
2377+ cairo_filter_t filter;
2378+ cairo_filter_t maskFilter;
2379+
2380+ maskImgStr = new ImageStream(maskStr, maskWidth, 1, 1);
2381+ maskImgStr->reset();
2382+
2383+ maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight);
2384+ if (cairo_surface_status (maskImage)) {
2385+ maskImgStr->close();
2386+ delete maskImgStr;
2387+ return;
2388+ }
2389+
2390+ maskBuffer = cairo_image_surface_get_data (maskImage);
2391+ row_stride = cairo_image_surface_get_stride (maskImage);
2392+
2393+ invert_bit = maskInvert ? 1 : 0;
2394+
2395+ for (y = 0; y < maskHeight; y++) {
2396+ pix = maskImgStr->getLine();
2397+ maskDest = maskBuffer + y * row_stride;
2398+ for (x = 0; x < maskWidth; x++) {
2399+ if (pix[x] ^ invert_bit)
2400+ *maskDest++ = 0;
2401+ else
2402+ *maskDest++ = 255;
2403+ }
2404+ }
2405+
2406+ maskImgStr->close();
2407+ delete maskImgStr;
2408+
2409+ maskFilter = getFilterForSurface (maskImage, maskInterpolate);
2410+
2411+ cairo_surface_mark_dirty (maskImage);
2412+ maskPattern = cairo_pattern_create_for_surface (maskImage);
2413+ cairo_surface_destroy (maskImage);
2414+ if (cairo_pattern_status (maskPattern))
2415+ return;
2416+
2417+#if 0
2418+ /* ICCBased color space doesn't do any color correction
2419+ * so check its underlying color space as well */
2420+ int is_identity_transform;
2421+ is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
2422+ (colorMap->getColorSpace()->getMode() == csICCBased &&
2423+ ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
2424+#endif
2425+
2426+ /* TODO: Do we want to cache these? */
2427+ imgStr = new ImageStream(str, width,
2428+ colorMap->getNumPixelComps(),
2429+ colorMap->getBits());
2430+ imgStr->reset();
2431+
2432+ image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
2433+ if (cairo_surface_status (image))
2434+ goto cleanup;
2435+
2436+ buffer = cairo_image_surface_get_data (image);
2437+ row_stride = cairo_image_surface_get_stride (image);
2438+ for (y = 0; y < height; y++) {
2439+ dest = (unsigned int *) (buffer + y * row_stride);
2440+ pix = imgStr->getLine();
2441+ colorMap->getRGBLine (pix, dest, width);
2442+ }
2443+
2444+ filter = getFilterForSurface (image, interpolate);
2445+
2446+ cairo_surface_mark_dirty (image);
2447+ pattern = cairo_pattern_create_for_surface (image);
2448+ cairo_surface_destroy (image);
2449+ if (cairo_pattern_status (pattern))
2450+ goto cleanup;
2451+
2452+ LOG (printf ("drawMaskedImage %dx%d\n", width, height));
2453+
2454+ cairo_pattern_set_filter (pattern, filter);
2455+ cairo_pattern_set_filter (maskPattern, maskFilter);
2456+
2457+ if (!printing) {
2458+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
2459+ cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD);
2460+ }
2461+
2462+ cairo_matrix_init_translate (&matrix, 0, height);
2463+ cairo_matrix_scale (&matrix, width, -height);
2464+ cairo_pattern_set_matrix (pattern, &matrix);
2465+ if (cairo_pattern_status (pattern)) {
2466+ cairo_pattern_destroy (pattern);
2467+ cairo_pattern_destroy (maskPattern);
2468+ goto cleanup;
2469+ }
2470+
2471+ cairo_matrix_init_translate (&maskMatrix, 0, maskHeight);
2472+ cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight);
2473+ cairo_pattern_set_matrix (maskPattern, &maskMatrix);
2474+ if (cairo_pattern_status (maskPattern)) {
2475+ cairo_pattern_destroy (maskPattern);
2476+ cairo_pattern_destroy (pattern);
2477+ goto cleanup;
2478+ }
2479+
2480+ if (!printing) {
2481+ cairo_save (cairo);
2482+ cairo_set_source (cairo, pattern);
2483+ cairo_rectangle (cairo, 0., 0., 1., 1.);
2484+ cairo_clip (cairo);
2485+ cairo_mask (cairo, maskPattern);
2486+ cairo_restore (cairo);
2487+ } else {
2488+ cairo_set_source (cairo, pattern);
2489+ cairo_mask (cairo, maskPattern);
2490+ }
2491+
2492+ if (cairo_shape) {
2493+ cairo_save (cairo_shape);
2494+ cairo_set_source (cairo_shape, pattern);
2495+ if (!printing) {
2496+ cairo_rectangle (cairo_shape, 0., 0., 1., 1.);
2497+ cairo_fill (cairo_shape);
2498+ } else {
2499+ cairo_mask (cairo_shape, pattern);
2500+ }
2501+ cairo_restore (cairo_shape);
2502+ }
2503+
2504+ cairo_pattern_destroy (maskPattern);
2505+ cairo_pattern_destroy (pattern);
2506+
2507+cleanup:
2508+ imgStr->close();
2509+ delete imgStr;
2510+}
2511+
2512+
2513+//XXX: is this affect by AIS(alpha is shape)?
2514+void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
2515+ int width, int height,
2516+ GfxImageColorMap *colorMap,
2517+ GBool interpolate,
2518+ Stream *maskStr,
2519+ int maskWidth, int maskHeight,
2520+ GfxImageColorMap *maskColorMap,
2521+ GBool maskInterpolate)
2522+{
2523+ ImageStream *maskImgStr, *imgStr;
2524+ int row_stride;
2525+ unsigned char *maskBuffer, *buffer;
2526+ unsigned char *maskDest;
2527+ unsigned int *dest;
2528+ cairo_surface_t *maskImage, *image;
2529+ cairo_pattern_t *maskPattern, *pattern;
2530+ cairo_matrix_t maskMatrix, matrix;
2531+ Guchar *pix;
2532+ int y;
2533+ cairo_filter_t filter;
2534+ cairo_filter_t maskFilter;
2535+
2536+ maskImgStr = new ImageStream(maskStr, maskWidth,
2537+ maskColorMap->getNumPixelComps(),
2538+ maskColorMap->getBits());
2539+ maskImgStr->reset();
2540+
2541+ maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight);
2542+ if (cairo_surface_status (maskImage)) {
2543+ maskImgStr->close();
2544+ delete maskImgStr;
2545+ return;
2546+ }
2547+
2548+ maskBuffer = cairo_image_surface_get_data (maskImage);
2549+ row_stride = cairo_image_surface_get_stride (maskImage);
2550+ for (y = 0; y < maskHeight; y++) {
2551+ maskDest = (unsigned char *) (maskBuffer + y * row_stride);
2552+ pix = maskImgStr->getLine();
2553+ maskColorMap->getGrayLine (pix, maskDest, maskWidth);
2554+ }
2555+
2556+ maskImgStr->close();
2557+ delete maskImgStr;
2558+
2559+ maskFilter = getFilterForSurface (maskImage, maskInterpolate);
2560+
2561+ cairo_surface_mark_dirty (maskImage);
2562+ maskPattern = cairo_pattern_create_for_surface (maskImage);
2563+ cairo_surface_destroy (maskImage);
2564+ if (cairo_pattern_status (maskPattern))
2565+ return;
2566+
2567+#if 0
2568+ /* ICCBased color space doesn't do any color correction
2569+ * so check its underlying color space as well */
2570+ int is_identity_transform;
2571+ is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
2572+ (colorMap->getColorSpace()->getMode() == csICCBased &&
2573+ ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
2574+#endif
2575+
2576+ /* TODO: Do we want to cache these? */
2577+ imgStr = new ImageStream(str, width,
2578+ colorMap->getNumPixelComps(),
2579+ colorMap->getBits());
2580+ imgStr->reset();
2581+
2582+ image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
2583+ if (cairo_surface_status (image))
2584+ goto cleanup;
2585+
2586+ buffer = cairo_image_surface_get_data (image);
2587+ row_stride = cairo_image_surface_get_stride (image);
2588+ for (y = 0; y < height; y++) {
2589+ dest = (unsigned int *) (buffer + y * row_stride);
2590+ pix = imgStr->getLine();
2591+ colorMap->getRGBLine (pix, dest, width);
2592+ }
2593+
2594+ filter = getFilterForSurface (image, interpolate);
2595+
2596+ cairo_surface_mark_dirty (image);
2597+
2598+ setMimeData(str, ref, image);
2599+
2600+ pattern = cairo_pattern_create_for_surface (image);
2601+ cairo_surface_destroy (image);
2602+ if (cairo_pattern_status (pattern))
2603+ goto cleanup;
2604+
2605+ LOG (printf ("drawSoftMaskedImage %dx%d\n", width, height));
2606+
2607+ cairo_pattern_set_filter (pattern, filter);
2608+ cairo_pattern_set_filter (maskPattern, maskFilter);
2609+
2610+ if (!printing) {
2611+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
2612+ cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD);
2613+ }
2614+
2615+ cairo_matrix_init_translate (&matrix, 0, height);
2616+ cairo_matrix_scale (&matrix, width, -height);
2617+ cairo_pattern_set_matrix (pattern, &matrix);
2618+ if (cairo_pattern_status (pattern)) {
2619+ cairo_pattern_destroy (pattern);
2620+ cairo_pattern_destroy (maskPattern);
2621+ goto cleanup;
2622+ }
2623+
2624+ cairo_matrix_init_translate (&maskMatrix, 0, maskHeight);
2625+ cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight);
2626+ cairo_pattern_set_matrix (maskPattern, &maskMatrix);
2627+ if (cairo_pattern_status (maskPattern)) {
2628+ cairo_pattern_destroy (maskPattern);
2629+ cairo_pattern_destroy (pattern);
2630+ goto cleanup;
2631+ }
2632+
2633+ if (fill_opacity != 1.0)
2634+ cairo_push_group (cairo);
2635+ else
2636+ cairo_save (cairo);
2637+
2638+ cairo_set_source (cairo, pattern);
2639+ if (!printing) {
2640+ cairo_rectangle (cairo, 0., 0.,
2641+ MIN (width, maskWidth) / (double)width,
2642+ MIN (height, maskHeight) / (double)height);
2643+ cairo_clip (cairo);
2644+ }
2645+ cairo_mask (cairo, maskPattern);
2646+
2647+ if (fill_opacity != 1.0) {
2648+ cairo_pop_group_to_source (cairo);
2649+ cairo_save (cairo);
2650+ if (!printing) {
2651+ cairo_rectangle (cairo, 0., 0.,
2652+ MIN (width, maskWidth) / (double)width,
2653+ MIN (height, maskHeight) / (double)height);
2654+ cairo_clip (cairo);
2655+ }
2656+ cairo_paint_with_alpha (cairo, fill_opacity);
2657+ }
2658+ cairo_restore (cairo);
2659+
2660+ if (cairo_shape) {
2661+ cairo_save (cairo_shape);
2662+ cairo_set_source (cairo_shape, pattern);
2663+ if (!printing) {
2664+ cairo_rectangle (cairo_shape, 0., 0.,
2665+ MIN (width, maskWidth) / (double)width,
2666+ MIN (height, maskHeight) / (double)height);
2667+ cairo_fill (cairo_shape);
2668+ } else {
2669+ cairo_mask (cairo_shape, pattern);
2670+ }
2671+ cairo_restore (cairo_shape);
2672+ }
2673+
2674+ cairo_pattern_destroy (maskPattern);
2675+ cairo_pattern_destroy (pattern);
2676+
2677+cleanup:
2678+ imgStr->close();
2679+ delete imgStr;
2680+}
2681+
2682+GBool CairoOutputDev::getStreamData (Stream *str, char **buffer, int *length)
2683+{
2684+ int len, i;
2685+ char *strBuffer;
2686+
2687+ len = 0;
2688+ str->close();
2689+ str->reset();
2690+ while (str->getChar() != EOF) len++;
2691+ if (len == 0)
2692+ return gFalse;
2693+
2694+ strBuffer = (char *)gmalloc (len);
2695+
2696+ str->close();
2697+ str->reset();
2698+ for (i = 0; i < len; ++i)
2699+ strBuffer[i] = str->getChar();
2700+
2701+ *buffer = strBuffer;
2702+ *length = len;
2703+
2704+ return gTrue;
2705+}
2706+
2707+void CairoOutputDev::setMimeData(Stream *str, Object *ref, cairo_surface_t *image)
2708+{
2709+ char *strBuffer;
2710+ int len;
2711+ Object obj;
2712+
2713+ if (!printing || !(str->getKind() == strDCT || str->getKind() == strJPX))
2714+ return;
2715+
2716+ // colorspace in stream dict may be different from colorspace in jpx
2717+ // data
2718+ if (str->getKind() == strJPX) {
2719+ GBool hasColorSpace = !str->getDict()->lookup("ColorSpace", &obj)->isNull();
2720+ obj.free();
2721+ if (hasColorSpace)
2722+ return;
2723+ }
2724+
2725+ if (getStreamData (str->getNextStream(), &strBuffer, &len)) {
2726+ cairo_status_t st;
2727+
2728+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2)
2729+ if (ref && ref->isRef()) {
2730+ Ref imgRef = ref->getRef();
2731+ GooString *surfaceId = new GooString("poppler-surface-");
2732+ surfaceId->appendf("{0:d}-{1:d}", imgRef.gen, imgRef.num);
2733+ char *idBuffer = copyString(surfaceId->getCString());
2734+ st = cairo_surface_set_mime_data (image, CAIRO_MIME_TYPE_UNIQUE_ID,
2735+ (const unsigned char *)idBuffer,
2736+ surfaceId->getLength(),
2737+ gfree, idBuffer);
2738+ if (st)
2739+ gfree(idBuffer);
2740+ delete surfaceId;
2741+ }
2742+#endif
2743+
2744+ st = cairo_surface_set_mime_data (image,
2745+ str->getKind() == strDCT ?
2746+ CAIRO_MIME_TYPE_JPEG : CAIRO_MIME_TYPE_JP2,
2747+ (const unsigned char *)strBuffer, len,
2748+ gfree, strBuffer);
2749+ if (st)
2750+ gfree (strBuffer);
2751+ }
2752+}
2753+
2754+void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
2755+ int width, int height,
2756+ GfxImageColorMap *colorMap,
2757+ GBool interpolate,
2758+ int *maskColors, GBool inlineImg)
2759+{
2760+ cairo_surface_t *image;
2761+ cairo_pattern_t *pattern, *maskPattern;
2762+ ImageStream *imgStr;
2763+ cairo_matrix_t matrix;
2764+ unsigned char *buffer;
2765+ int stride, i;
2766+ GfxRGB *lookup = NULL;
2767+ cairo_filter_t filter = CAIRO_FILTER_BILINEAR;
2768+
2769+ /* TODO: Do we want to cache these? */
2770+ imgStr = new ImageStream(str, width,
2771+ colorMap->getNumPixelComps(),
2772+ colorMap->getBits());
2773+ imgStr->reset();
2774+
2775+#if 0
2776+ /* ICCBased color space doesn't do any color correction
2777+ * so check its underlying color space as well */
2778+ int is_identity_transform;
2779+ is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
2780+ (colorMap->getColorSpace()->getMode() == csICCBased &&
2781+ ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
2782+#endif
2783+
2784+ image = cairo_image_surface_create (maskColors ?
2785+ CAIRO_FORMAT_ARGB32 :
2786+ CAIRO_FORMAT_RGB24,
2787+ width, height);
2788+ if (cairo_surface_status (image))
2789+ goto cleanup;
2790+
2791+ // special case for one-channel (monochrome/gray/separation) images:
2792+ // build a lookup table here
2793+ if (colorMap->getNumPixelComps() == 1) {
2794+ int n;
2795+ Guchar pix;
2796+
2797+ n = 1 << colorMap->getBits();
2798+ lookup = (GfxRGB *)gmallocn(n, sizeof(GfxRGB));
2799+ for (i = 0; i < n; ++i) {
2800+ pix = (Guchar)i;
2801+
2802+ colorMap->getRGB(&pix, &lookup[i]);
2803+ }
2804+ }
2805+
2806+ buffer = cairo_image_surface_get_data (image);
2807+ stride = cairo_image_surface_get_stride (image);
2808+ for (int y = 0; y < height; y++) {
2809+ uint32_t *dest = (uint32_t *) (buffer + y * stride);
2810+ Guchar *pix = imgStr->getLine();
2811+
2812+ if (lookup) {
2813+ Guchar *p = pix;
2814+ GfxRGB rgb;
2815+
2816+ for (i = 0; i < width; i++) {
2817+ rgb = lookup[*p];
2818+ dest[i] =
2819+ ((int) colToByte(rgb.r) << 16) |
2820+ ((int) colToByte(rgb.g) << 8) |
2821+ ((int) colToByte(rgb.b) << 0);
2822+ p++;
2823+ }
2824+ } else {
2825+ colorMap->getRGBLine (pix, dest, width);
2826+ }
2827+
2828+ if (maskColors) {
2829+ for (int x = 0; x < width; x++) {
2830+ bool is_opaque = false;
2831+ for (int i = 0; i < colorMap->getNumPixelComps(); ++i) {
2832+ if (pix[i] < maskColors[2*i] ||
2833+ pix[i] > maskColors[2*i+1]) {
2834+ is_opaque = true;
2835+ break;
2836+ }
2837+ }
2838+ if (is_opaque)
2839+ *dest |= 0xff000000;
2840+ else
2841+ *dest = 0;
2842+ dest++;
2843+ pix += colorMap->getNumPixelComps();
2844+ }
2845+ }
2846+ }
2847+ gfree(lookup);
2848+
2849+ LOG (printf ("drawImage %dx%d\n", width, height));
2850+
2851+ cairo_surface_t *scaled_surface;
2852+
2853+ scaled_surface = downscaleSurface (image);
2854+ if (scaled_surface) {
2855+ if (cairo_surface_status (scaled_surface))
2856+ goto cleanup;
2857+ cairo_surface_destroy (image);
2858+ image = scaled_surface;
2859+ width = cairo_image_surface_get_width (image);
2860+ height = cairo_image_surface_get_height (image);
2861+ } else {
2862+ filter = getFilterForSurface (image, interpolate);
2863+ }
2864+
2865+ cairo_surface_mark_dirty (image);
2866+
2867+ if (!inlineImg) /* don't read stream twice if it is an inline image */
2868+ setMimeData(str, ref, image);
2869+
2870+ pattern = cairo_pattern_create_for_surface (image);
2871+ cairo_surface_destroy (image);
2872+ if (cairo_pattern_status (pattern))
2873+ goto cleanup;
2874+
2875+ cairo_pattern_set_filter (pattern, filter);
2876+
2877+ if (!printing)
2878+ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
2879+
2880+ cairo_matrix_init_translate (&matrix, 0, height);
2881+ cairo_matrix_scale (&matrix, width, -height);
2882+ cairo_pattern_set_matrix (pattern, &matrix);
2883+ if (cairo_pattern_status (pattern)) {
2884+ cairo_pattern_destroy (pattern);
2885+ goto cleanup;
2886+ }
2887+
2888+ if (!mask && fill_opacity != 1.0) {
2889+ maskPattern = cairo_pattern_create_rgba (1., 1., 1., fill_opacity);
2890+ } else if (mask) {
2891+ maskPattern = cairo_pattern_reference (mask);
2892+ } else {
2893+ maskPattern = NULL;
2894+ }
2895+
2896+ cairo_save (cairo);
2897+ cairo_set_source (cairo, pattern);
2898+ if (!printing)
2899+ cairo_rectangle (cairo, 0., 0., 1., 1.);
2900+ if (maskPattern) {
2901+ if (!printing)
2902+ cairo_clip (cairo);
2903+ cairo_set_matrix (cairo, &mask_matrix);
2904+ cairo_mask (cairo, maskPattern);
2905+ } else {
2906+ if (printing)
2907+ cairo_paint (cairo);
2908+ else
2909+ cairo_fill (cairo);
2910+ }
2911+ cairo_restore (cairo);
2912+
2913+ cairo_pattern_destroy (maskPattern);
2914+
2915+ if (cairo_shape) {
2916+ cairo_save (cairo_shape);
2917+ cairo_set_source (cairo_shape, pattern);
2918+ if (printing) {
2919+ cairo_paint (cairo_shape);
2920+ } else {
2921+ cairo_rectangle (cairo_shape, 0., 0., 1., 1.);
2922+ cairo_fill (cairo_shape);
2923+ }
2924+ cairo_restore (cairo_shape);
2925+ }
2926+
2927+ cairo_pattern_destroy (pattern);
2928+
2929+cleanup:
2930+ imgStr->close();
2931+ delete imgStr;
2932+}
2933+
2934+
2935+//------------------------------------------------------------------------
2936+// ImageOutputDev
2937+//------------------------------------------------------------------------
2938+
2939+CairoImageOutputDev::CairoImageOutputDev()
2940+{
2941+ images = NULL;
2942+ numImages = 0;
2943+ size = 0;
2944+ imgDrawCbk = NULL;
2945+ imgDrawCbkData = NULL;
2946+}
2947+
2948+CairoImageOutputDev::~CairoImageOutputDev()
2949+{
2950+ int i;
2951+
2952+ for (i = 0; i < numImages; i++)
2953+ delete images[i];
2954+ gfree (images);
2955+}
2956+
2957+void CairoImageOutputDev::saveImage(CairoImage *image)
2958+{
2959+ if (numImages >= size) {
2960+ size += 16;
2961+ images = (CairoImage **) greallocn (images, size, sizeof (CairoImage *));
2962+ }
2963+ images[numImages++] = image;
2964+}
2965+
2966+void CairoImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
2967+ int width, int height, GBool invert,
2968+ GBool interpolate, GBool inlineImg)
2969+{
2970+ cairo_t *cr;
2971+ cairo_surface_t *surface;
2972+ double x1, y1, x2, y2;
2973+ double *ctm;
2974+ double mat[6];
2975+ CairoImage *image;
2976+
2977+ ctm = state->getCTM();
2978+
2979+ mat[0] = ctm[0];
2980+ mat[1] = ctm[1];
2981+ mat[2] = -ctm[2];
2982+ mat[3] = -ctm[3];
2983+ mat[4] = ctm[2] + ctm[4];
2984+ mat[5] = ctm[3] + ctm[5];
2985+ x1 = mat[4];
2986+ y1 = mat[5];
2987+ x2 = x1 + width;
2988+ y2 = y1 + height;
2989+
2990+ image = new CairoImage (x1, y1, x2, y2);
2991+ saveImage (image);
2992+
2993+ if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
2994+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
2995+ cr = cairo_create (surface);
2996+ setCairo (cr);
2997+ cairo_translate (cr, 0, height);
2998+ cairo_scale (cr, width, -height);
2999+
3000+ CairoOutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg);
3001+ image->setImage (surface);
3002+
3003+ setCairo (NULL);
3004+ cairo_surface_destroy (surface);
3005+ cairo_destroy (cr);
3006+ }
3007+}
3008+
3009+void CairoImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
3010+ int width, int height, GfxImageColorMap *colorMap,
3011+ GBool interpolate, int *maskColors, GBool inlineImg)
3012+{
3013+ cairo_t *cr;
3014+ cairo_surface_t *surface;
3015+ double x1, y1, x2, y2;
3016+ double *ctm;
3017+ double mat[6];
3018+ CairoImage *image;
3019+
3020+ ctm = state->getCTM();
3021+
3022+ mat[0] = ctm[0];
3023+ mat[1] = ctm[1];
3024+ mat[2] = -ctm[2];
3025+ mat[3] = -ctm[3];
3026+ mat[4] = ctm[2] + ctm[4];
3027+ mat[5] = ctm[3] + ctm[5];
3028+ x1 = mat[4];
3029+ y1 = mat[5];
3030+ x2 = x1 + width;
3031+ y2 = y1 + height;
3032+
3033+ image = new CairoImage (x1, y1, x2, y2);
3034+ saveImage (image);
3035+
3036+ if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
3037+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
3038+ cr = cairo_create (surface);
3039+ setCairo (cr);
3040+ cairo_translate (cr, 0, height);
3041+ cairo_scale (cr, width, -height);
3042+
3043+ CairoOutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate, maskColors, inlineImg);
3044+ image->setImage (surface);
3045+
3046+ setCairo (NULL);
3047+ cairo_surface_destroy (surface);
3048+ cairo_destroy (cr);
3049+ }
3050+}
3051+
3052+void CairoImageOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
3053+ int width, int height,
3054+ GfxImageColorMap *colorMap,
3055+ GBool interpolate,
3056+ Stream *maskStr,
3057+ int maskWidth, int maskHeight,
3058+ GfxImageColorMap *maskColorMap,
3059+ GBool maskInterpolate)
3060+{
3061+ cairo_t *cr;
3062+ cairo_surface_t *surface;
3063+ double x1, y1, x2, y2;
3064+ double *ctm;
3065+ double mat[6];
3066+ CairoImage *image;
3067+
3068+ ctm = state->getCTM();
3069+
3070+ mat[0] = ctm[0];
3071+ mat[1] = ctm[1];
3072+ mat[2] = -ctm[2];
3073+ mat[3] = -ctm[3];
3074+ mat[4] = ctm[2] + ctm[4];
3075+ mat[5] = ctm[3] + ctm[5];
3076+ x1 = mat[4];
3077+ y1 = mat[5];
3078+ x2 = x1 + width;
3079+ y2 = y1 + height;
3080+
3081+ image = new CairoImage (x1, y1, x2, y2);
3082+ saveImage (image);
3083+
3084+ if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
3085+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
3086+ cr = cairo_create (surface);
3087+ setCairo (cr);
3088+ cairo_translate (cr, 0, height);
3089+ cairo_scale (cr, width, -height);
3090+
3091+ CairoOutputDev::drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate,
3092+ maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate);
3093+ image->setImage (surface);
3094+
3095+ setCairo (NULL);
3096+ cairo_surface_destroy (surface);
3097+ cairo_destroy (cr);
3098+ }
3099+}
3100+
3101+void CairoImageOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,
3102+ int width, int height,
3103+ GfxImageColorMap *colorMap,
3104+ GBool interpolate,
3105+ Stream *maskStr,
3106+ int maskWidth, int maskHeight,
3107+ GBool maskInvert, GBool maskInterpolate)
3108+{
3109+ cairo_t *cr;
3110+ cairo_surface_t *surface;
3111+ double x1, y1, x2, y2;
3112+ double *ctm;
3113+ double mat[6];
3114+ CairoImage *image;
3115+
3116+ ctm = state->getCTM();
3117+
3118+ mat[0] = ctm[0];
3119+ mat[1] = ctm[1];
3120+ mat[2] = -ctm[2];
3121+ mat[3] = -ctm[3];
3122+ mat[4] = ctm[2] + ctm[4];
3123+ mat[5] = ctm[3] + ctm[5];
3124+ x1 = mat[4];
3125+ y1 = mat[5];
3126+ x2 = x1 + width;
3127+ y2 = y1 + height;
3128+
3129+ image = new CairoImage (x1, y1, x2, y2);
3130+ saveImage (image);
3131+
3132+ if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
3133+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
3134+ cr = cairo_create (surface);
3135+ setCairo (cr);
3136+ cairo_translate (cr, 0, height);
3137+ cairo_scale (cr, width, -height);
3138+
3139+ CairoOutputDev::drawMaskedImage(state, ref, str, width, height, colorMap, interpolate,
3140+ maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate);
3141+ image->setImage (surface);
3142+
3143+ setCairo (NULL);
3144+ cairo_surface_destroy (surface);
3145+ cairo_destroy (cr);
3146+ }
3147+}
3148
3149=== modified file '.pc/ltmain-as-needed.diff/ltmain.sh'
3150--- .pc/ltmain-as-needed.diff/ltmain.sh 2012-02-12 22:49:35 +0000
3151+++ .pc/ltmain-as-needed.diff/ltmain.sh 2012-11-16 16:39:27 +0000
3152@@ -70,7 +70,7 @@
3153 # compiler: $LTCC
3154 # compiler flags: $LTCFLAGS
3155 # linker: $LD (gnu? $with_gnu_ld)
3156-# $progname: (GNU libtool) 2.4.2
3157+# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1
3158 # automake: $automake_version
3159 # autoconf: $autoconf_version
3160 #
3161@@ -80,7 +80,7 @@
3162
3163 PROGRAM=libtool
3164 PACKAGE=libtool
3165-VERSION=2.4.2
3166+VERSION="2.4.2 Debian-2.4.2-1ubuntu1"
3167 TIMESTAMP=""
3168 package_revision=1.3337
3169
3170@@ -6124,7 +6124,10 @@
3171 case $pass in
3172 dlopen) libs="$dlfiles" ;;
3173 dlpreopen) libs="$dlprefiles" ;;
3174- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
3175+ link)
3176+ libs="$deplibs %DEPLIBS%"
3177+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
3178+ ;;
3179 esac
3180 fi
3181 if test "$linkmode,$pass" = "lib,dlpreopen"; then
3182@@ -6444,19 +6447,19 @@
3183 # It is a libtool convenience library, so add in its objects.
3184 func_append convenience " $ladir/$objdir/$old_library"
3185 func_append old_convenience " $ladir/$objdir/$old_library"
3186+ tmp_libs=
3187+ for deplib in $dependency_libs; do
3188+ deplibs="$deplib $deplibs"
3189+ if $opt_preserve_dup_deps ; then
3190+ case "$tmp_libs " in
3191+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
3192+ esac
3193+ fi
3194+ func_append tmp_libs " $deplib"
3195+ done
3196 elif test "$linkmode" != prog && test "$linkmode" != lib; then
3197 func_fatal_error "\`$lib' is not a convenience library"
3198 fi
3199- tmp_libs=
3200- for deplib in $dependency_libs; do
3201- deplibs="$deplib $deplibs"
3202- if $opt_preserve_dup_deps ; then
3203- case "$tmp_libs " in
3204- *" $deplib "*) func_append specialdeplibs " $deplib" ;;
3205- esac
3206- fi
3207- func_append tmp_libs " $deplib"
3208- done
3209 continue
3210 fi # $pass = conv
3211
3212@@ -7349,6 +7352,9 @@
3213 revision="$number_minor"
3214 lt_irix_increment=no
3215 ;;
3216+ *)
3217+ func_fatal_configuration "$modename: unknown library version type \`$version_type'"
3218+ ;;
3219 esac
3220 ;;
3221 no)
3222
3223=== added directory '.pc/qt4-visibility.diff'
3224=== added directory '.pc/qt4-visibility.diff/qt4'
3225=== added directory '.pc/qt4-visibility.diff/qt4/src'
3226=== added file '.pc/qt4-visibility.diff/qt4/src/Makefile.am'
3227--- .pc/qt4-visibility.diff/qt4/src/Makefile.am 1970-01-01 00:00:00 +0000
3228+++ .pc/qt4-visibility.diff/qt4/src/Makefile.am 2012-11-16 16:39:27 +0000
3229@@ -0,0 +1,74 @@
3230+INCLUDES = \
3231+ -I$(top_srcdir) \
3232+ -I$(top_srcdir)/poppler \
3233+ $(FONTCONFIG_CFLAGS) \
3234+ $(POPPLER_QT4_CFLAGS)
3235+
3236+SUFFIXES: .moc
3237+
3238+poppler_includedir = $(includedir)/poppler/qt4
3239+
3240+poppler_include_HEADERS = \
3241+ poppler-qt4.h \
3242+ poppler-link.h \
3243+ poppler-annotation.h \
3244+ poppler-form.h \
3245+ poppler-optcontent.h \
3246+ poppler-export.h \
3247+ poppler-media.h \
3248+ poppler-page-transition.h
3249+
3250+lib_LTLIBRARIES = libpoppler-qt4.la
3251+
3252+libpoppler_qt4_la_SOURCES = \
3253+ poppler-document.cc \
3254+ poppler-page.cc \
3255+ poppler-fontinfo.cc \
3256+ poppler-embeddedfile.cc \
3257+ poppler-textbox.cc \
3258+ poppler-link.cc \
3259+ poppler-annotation.cc \
3260+ poppler-link-extractor.cc \
3261+ poppler-optcontent.cc \
3262+ poppler-optcontent.h \
3263+ poppler-page-transition.cc \
3264+ poppler-sound.cc \
3265+ poppler-form.cc \
3266+ poppler-base-converter.cc \
3267+ poppler-ps-converter.cc \
3268+ poppler-pdf-converter.cc \
3269+ poppler-qiodeviceoutstream.cc \
3270+ poppler-private.cc \
3271+ poppler-movie.cc \
3272+ poppler-media.cc \
3273+ poppler-annotation-helper.h \
3274+ poppler-page-private.h \
3275+ poppler-link-extractor-private.h \
3276+ poppler-annotation-private.h \
3277+ poppler-converter-private.h \
3278+ poppler-qiodeviceoutstream-private.h \
3279+ poppler-optcontent-private.h \
3280+ poppler-export.h \
3281+ poppler-private.h \
3282+ poppler-page-transition-private.h \
3283+ poppler-embeddedfile-private.h
3284+
3285+libpoppler_qt4_la_CXXFLAGS = \
3286+ -Dpoppler_qt4_EXPORTS
3287+
3288+libpoppler_qt4_la_LIBADD = \
3289+ $(top_builddir)/poppler/libpoppler.la \
3290+ $(top_builddir)/poppler/libpoppler-arthur.la \
3291+ $(FONTCONFIG_LIBS) \
3292+ $(POPPLER_QT4_LIBS)
3293+
3294+libpoppler_qt4_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@
3295+
3296+# This rule lets GNU make create any *.moc from the equivalent *.h
3297+.h.moc:
3298+ $(AM_V_GEN) $(MOCQT4) -i $< -o $@
3299+
3300+BUILT_SOURCES = poppler-optcontent.moc
3301+
3302+clean-generic:
3303+ rm -f *.moc
3304
3305=== added file '.pc/qt4-visibility.diff/qt4/src/Makefile.in'
3306--- .pc/qt4-visibility.diff/qt4/src/Makefile.in 1970-01-01 00:00:00 +0000
3307+++ .pc/qt4-visibility.diff/qt4/src/Makefile.in 2012-11-16 16:39:27 +0000
3308@@ -0,0 +1,948 @@
3309+# Makefile.in generated by automake 1.11.5 from Makefile.am.
3310+# @configure_input@
3311+
3312+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
3313+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
3314+# Foundation, Inc.
3315+# This Makefile.in is free software; the Free Software Foundation
3316+# gives unlimited permission to copy and/or distribute it,
3317+# with or without modifications, as long as this notice is preserved.
3318+
3319+# This program is distributed in the hope that it will be useful,
3320+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
3321+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
3322+# PARTICULAR PURPOSE.
3323+
3324+@SET_MAKE@
3325+
3326+
3327+VPATH = @srcdir@
3328+am__make_dryrun = \
3329+ { \
3330+ am__dry=no; \
3331+ case $$MAKEFLAGS in \
3332+ *\\[\ \ ]*) \
3333+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
3334+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
3335+ *) \
3336+ for am__flg in $$MAKEFLAGS; do \
3337+ case $$am__flg in \
3338+ *=*|--*) ;; \
3339+ *n*) am__dry=yes; break;; \
3340+ esac; \
3341+ done;; \
3342+ esac; \
3343+ test $$am__dry = yes; \
3344+ }
3345+pkgdatadir = $(datadir)/@PACKAGE@
3346+pkgincludedir = $(includedir)/@PACKAGE@
3347+pkglibdir = $(libdir)/@PACKAGE@
3348+pkglibexecdir = $(libexecdir)/@PACKAGE@
3349+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
3350+install_sh_DATA = $(install_sh) -c -m 644
3351+install_sh_PROGRAM = $(install_sh) -c
3352+install_sh_SCRIPT = $(install_sh) -c
3353+INSTALL_HEADER = $(INSTALL_DATA)
3354+transform = $(program_transform_name)
3355+NORMAL_INSTALL = :
3356+PRE_INSTALL = :
3357+POST_INSTALL = :
3358+NORMAL_UNINSTALL = :
3359+PRE_UNINSTALL = :
3360+POST_UNINSTALL = :
3361+build_triplet = @build@
3362+host_triplet = @host@
3363+subdir = qt4/src
3364+DIST_COMMON = $(poppler_include_HEADERS) $(srcdir)/Makefile.am \
3365+ $(srcdir)/Makefile.in
3366+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
3367+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
3368+ $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
3369+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/introspection.m4 \
3370+ $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libtool.m4 \
3371+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
3372+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
3373+ $(top_srcdir)/configure.ac
3374+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
3375+ $(ACLOCAL_M4)
3376+mkinstalldirs = $(install_sh) -d
3377+CONFIG_HEADER = $(top_builddir)/config.h \
3378+ $(top_builddir)/poppler/poppler-config.h
3379+CONFIG_CLEAN_FILES =
3380+CONFIG_CLEAN_VPATH_FILES =
3381+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
3382+am__vpath_adj = case $$p in \
3383+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
3384+ *) f=$$p;; \
3385+ esac;
3386+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
3387+am__install_max = 40
3388+am__nobase_strip_setup = \
3389+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
3390+am__nobase_strip = \
3391+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
3392+am__nobase_list = $(am__nobase_strip_setup); \
3393+ for p in $$list; do echo "$$p $$p"; done | \
3394+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
3395+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
3396+ if (++n[$$2] == $(am__install_max)) \
3397+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
3398+ END { for (dir in files) print dir, files[dir] }'
3399+am__base_list = \
3400+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
3401+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
3402+am__uninstall_files_from_dir = { \
3403+ test -z "$$files" \
3404+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
3405+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
3406+ $(am__cd) "$$dir" && rm -f $$files; }; \
3407+ }
3408+am__installdirs = "$(DESTDIR)$(libdir)" \
3409+ "$(DESTDIR)$(poppler_includedir)"
3410+LTLIBRARIES = $(lib_LTLIBRARIES)
3411+am__DEPENDENCIES_1 =
3412+libpoppler_qt4_la_DEPENDENCIES = \
3413+ $(top_builddir)/poppler/libpoppler.la \
3414+ $(top_builddir)/poppler/libpoppler-arthur.la \
3415+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
3416+am_libpoppler_qt4_la_OBJECTS = libpoppler_qt4_la-poppler-document.lo \
3417+ libpoppler_qt4_la-poppler-page.lo \
3418+ libpoppler_qt4_la-poppler-fontinfo.lo \
3419+ libpoppler_qt4_la-poppler-embeddedfile.lo \
3420+ libpoppler_qt4_la-poppler-textbox.lo \
3421+ libpoppler_qt4_la-poppler-link.lo \
3422+ libpoppler_qt4_la-poppler-annotation.lo \
3423+ libpoppler_qt4_la-poppler-link-extractor.lo \
3424+ libpoppler_qt4_la-poppler-optcontent.lo \
3425+ libpoppler_qt4_la-poppler-page-transition.lo \
3426+ libpoppler_qt4_la-poppler-sound.lo \
3427+ libpoppler_qt4_la-poppler-form.lo \
3428+ libpoppler_qt4_la-poppler-base-converter.lo \
3429+ libpoppler_qt4_la-poppler-ps-converter.lo \
3430+ libpoppler_qt4_la-poppler-pdf-converter.lo \
3431+ libpoppler_qt4_la-poppler-qiodeviceoutstream.lo \
3432+ libpoppler_qt4_la-poppler-private.lo \
3433+ libpoppler_qt4_la-poppler-movie.lo \
3434+ libpoppler_qt4_la-poppler-media.lo
3435+libpoppler_qt4_la_OBJECTS = $(am_libpoppler_qt4_la_OBJECTS)
3436+AM_V_lt = $(am__v_lt_@AM_V@)
3437+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
3438+am__v_lt_0 = --silent
3439+libpoppler_qt4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
3440+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
3441+ $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) \
3442+ $(libpoppler_qt4_la_LDFLAGS) $(LDFLAGS) -o $@
3443+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
3444+depcomp = $(SHELL) $(top_srcdir)/depcomp
3445+am__depfiles_maybe = depfiles
3446+am__mv = mv -f
3447+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
3448+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
3449+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
3450+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
3451+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
3452+ $(AM_CXXFLAGS) $(CXXFLAGS)
3453+AM_V_CXX = $(am__v_CXX_@AM_V@)
3454+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
3455+am__v_CXX_0 = @echo " CXX " $@;
3456+AM_V_at = $(am__v_at_@AM_V@)
3457+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
3458+am__v_at_0 = @
3459+CXXLD = $(CXX)
3460+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
3461+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
3462+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
3463+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
3464+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
3465+am__v_CXXLD_0 = @echo " CXXLD " $@;
3466+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
3467+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
3468+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
3469+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
3470+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
3471+ $(AM_CFLAGS) $(CFLAGS)
3472+AM_V_CC = $(am__v_CC_@AM_V@)
3473+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
3474+am__v_CC_0 = @echo " CC " $@;
3475+CCLD = $(CC)
3476+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
3477+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
3478+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
3479+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
3480+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
3481+am__v_CCLD_0 = @echo " CCLD " $@;
3482+AM_V_GEN = $(am__v_GEN_@AM_V@)
3483+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
3484+am__v_GEN_0 = @echo " GEN " $@;
3485+SOURCES = $(libpoppler_qt4_la_SOURCES)
3486+DIST_SOURCES = $(libpoppler_qt4_la_SOURCES)
3487+am__can_run_installinfo = \
3488+ case $$AM_UPDATE_INFO_DIR in \
3489+ n|no|NO) false;; \
3490+ *) (install-info --version) >/dev/null 2>&1;; \
3491+ esac
3492+HEADERS = $(poppler_include_HEADERS)
3493+ETAGS = etags
3494+CTAGS = ctags
3495+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
3496+ACLOCAL = @ACLOCAL@
3497+AMTAR = @AMTAR@
3498+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
3499+AR = @AR@
3500+AS = @AS@
3501+AUTOCONF = @AUTOCONF@
3502+AUTOHEADER = @AUTOHEADER@
3503+AUTOMAKE = @AUTOMAKE@
3504+AWK = @AWK@
3505+CAIRO_CFLAGS = @CAIRO_CFLAGS@
3506+CAIRO_FEATURE = @CAIRO_FEATURE@
3507+CAIRO_LIBS = @CAIRO_LIBS@
3508+CAIRO_REQ = @CAIRO_REQ@
3509+CAIRO_VERSION = @CAIRO_VERSION@
3510+CC = @CC@
3511+CCDEPMODE = @CCDEPMODE@
3512+CFLAGS = @CFLAGS@
3513+CPP = @CPP@
3514+CPPFLAGS = @CPPFLAGS@
3515+CXX = @CXX@
3516+CXXCPP = @CXXCPP@
3517+CXXDEPMODE = @CXXDEPMODE@
3518+CXXFLAGS = @CXXFLAGS@
3519+CYGPATH_W = @CYGPATH_W@
3520+DEFS = @DEFS@
3521+DEPDIR = @DEPDIR@
3522+DLLTOOL = @DLLTOOL@
3523+DSYMUTIL = @DSYMUTIL@
3524+DUMPBIN = @DUMPBIN@
3525+ECHO_C = @ECHO_C@
3526+ECHO_N = @ECHO_N@
3527+ECHO_T = @ECHO_T@
3528+EGREP = @EGREP@
3529+EXEEXT = @EXEEXT@
3530+FGREP = @FGREP@
3531+FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
3532+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
3533+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
3534+FREETYPE_CONFIG = @FREETYPE_CONFIG@
3535+FREETYPE_LIBS = @FREETYPE_LIBS@
3536+GLIB_MKENUMS = @GLIB_MKENUMS@
3537+GLIB_REQ = @GLIB_REQ@
3538+GLIB_REQUIRED = @GLIB_REQUIRED@
3539+GREP = @GREP@
3540+GTKDOC_CHECK = @GTKDOC_CHECK@
3541+GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
3542+GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
3543+GTKDOC_MKPDF = @GTKDOC_MKPDF@
3544+GTKDOC_REBASE = @GTKDOC_REBASE@
3545+GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
3546+GTK_TEST_LIBS = @GTK_TEST_LIBS@
3547+HTML_DIR = @HTML_DIR@
3548+INSTALL = @INSTALL@
3549+INSTALL_DATA = @INSTALL_DATA@
3550+INSTALL_PROGRAM = @INSTALL_PROGRAM@
3551+INSTALL_SCRIPT = @INSTALL_SCRIPT@
3552+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
3553+INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
3554+INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
3555+INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
3556+INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
3557+INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
3558+INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
3559+INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
3560+INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
3561+LCMS_CFLAGS = @LCMS_CFLAGS@
3562+LCMS_LIBS = @LCMS_LIBS@
3563+LD = @LD@
3564+LDFLAGS = @LDFLAGS@
3565+LIBCURL_CFLAGS = @LIBCURL_CFLAGS@
3566+LIBCURL_LIBS = @LIBCURL_LIBS@
3567+LIBICONV = @LIBICONV@
3568+LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@
3569+LIBJPEG_LIBS = @LIBJPEG_LIBS@
3570+LIBOBJS = @LIBOBJS@
3571+LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@
3572+LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
3573+LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
3574+LIBPNG_LIBS = @LIBPNG_LIBS@
3575+LIBS = @LIBS@
3576+LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@
3577+LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@
3578+LIBTIFF_LIBS = @LIBTIFF_LIBS@
3579+LIBTOOL = @LIBTOOL@
3580+LIPO = @LIPO@
3581+LN_S = @LN_S@
3582+LTLIBICONV = @LTLIBICONV@
3583+LTLIBOBJS = @LTLIBOBJS@
3584+MAKEINFO = @MAKEINFO@
3585+MANIFEST_TOOL = @MANIFEST_TOOL@
3586+MKDIR_P = @MKDIR_P@
3587+MOCQT4 = @MOCQT4@
3588+NM = @NM@
3589+NMEDIT = @NMEDIT@
3590+OBJDUMP = @OBJDUMP@
3591+OBJEXT = @OBJEXT@
3592+OTOOL = @OTOOL@
3593+OTOOL64 = @OTOOL64@
3594+PACKAGE = @PACKAGE@
3595+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
3596+PACKAGE_NAME = @PACKAGE_NAME@
3597+PACKAGE_STRING = @PACKAGE_STRING@
3598+PACKAGE_TARNAME = @PACKAGE_TARNAME@
3599+PACKAGE_URL = @PACKAGE_URL@
3600+PACKAGE_VERSION = @PACKAGE_VERSION@
3601+PATH_SEPARATOR = @PATH_SEPARATOR@
3602+PC_REQUIRES = @PC_REQUIRES@
3603+PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
3604+PDFTOCAIRO_CFLAGS = @PDFTOCAIRO_CFLAGS@
3605+PDFTOCAIRO_LIBS = @PDFTOCAIRO_LIBS@
3606+PKG_CONFIG = @PKG_CONFIG@
3607+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
3608+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
3609+POPPLER_DATADIR = @POPPLER_DATADIR@
3610+POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
3611+POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
3612+POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
3613+POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
3614+POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
3615+POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
3616+POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
3617+POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
3618+POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
3619+POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
3620+POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
3621+POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
3622+POPPLER_VERSION = @POPPLER_VERSION@
3623+PTHREAD_CC = @PTHREAD_CC@
3624+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
3625+PTHREAD_LIBS = @PTHREAD_LIBS@
3626+RANLIB = @RANLIB@
3627+SED = @SED@
3628+SET_MAKE = @SET_MAKE@
3629+SHELL = @SHELL@
3630+STRIP = @STRIP@
3631+TESTDATADIR = @TESTDATADIR@
3632+VERSION = @VERSION@
3633+XMKMF = @XMKMF@
3634+X_CFLAGS = @X_CFLAGS@
3635+X_EXTRA_LIBS = @X_EXTRA_LIBS@
3636+X_LIBS = @X_LIBS@
3637+X_PRE_LIBS = @X_PRE_LIBS@
3638+ZLIB_LIBS = @ZLIB_LIBS@
3639+abs_builddir = @abs_builddir@
3640+abs_srcdir = @abs_srcdir@
3641+abs_top_builddir = @abs_top_builddir@
3642+abs_top_srcdir = @abs_top_srcdir@
3643+ac_ct_AR = @ac_ct_AR@
3644+ac_ct_CC = @ac_ct_CC@
3645+ac_ct_CXX = @ac_ct_CXX@
3646+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
3647+acx_pthread_config = @acx_pthread_config@
3648+am__include = @am__include@
3649+am__leading_dot = @am__leading_dot@
3650+am__quote = @am__quote@
3651+am__tar = @am__tar@
3652+am__untar = @am__untar@
3653+auto_import_flags = @auto_import_flags@
3654+bindir = @bindir@
3655+build = @build@
3656+build_alias = @build_alias@
3657+build_cpu = @build_cpu@
3658+build_os = @build_os@
3659+build_vendor = @build_vendor@
3660+builddir = @builddir@
3661+create_shared_lib = @create_shared_lib@
3662+datadir = @datadir@
3663+datarootdir = @datarootdir@
3664+docdir = @docdir@
3665+dvidir = @dvidir@
3666+exec_prefix = @exec_prefix@
3667+host = @host@
3668+host_alias = @host_alias@
3669+host_cpu = @host_cpu@
3670+host_os = @host_os@
3671+host_vendor = @host_vendor@
3672+htmldir = @htmldir@
3673+includedir = @includedir@
3674+infodir = @infodir@
3675+install_sh = @install_sh@
3676+libdir = @libdir@
3677+libexecdir = @libexecdir@
3678+localedir = @localedir@
3679+localstatedir = @localstatedir@
3680+mandir = @mandir@
3681+mkdir_p = @mkdir_p@
3682+oldincludedir = @oldincludedir@
3683+pdfdir = @pdfdir@
3684+prefix = @prefix@
3685+program_transform_name = @program_transform_name@
3686+psdir = @psdir@
3687+sbindir = @sbindir@
3688+sharedstatedir = @sharedstatedir@
3689+srcdir = @srcdir@
3690+sysconfdir = @sysconfdir@
3691+target_alias = @target_alias@
3692+top_build_prefix = @top_build_prefix@
3693+top_builddir = @top_builddir@
3694+top_srcdir = @top_srcdir@
3695+win32_libs = @win32_libs@
3696+INCLUDES = \
3697+ -I$(top_srcdir) \
3698+ -I$(top_srcdir)/poppler \
3699+ $(FONTCONFIG_CFLAGS) \
3700+ $(POPPLER_QT4_CFLAGS)
3701+
3702+poppler_includedir = $(includedir)/poppler/qt4
3703+poppler_include_HEADERS = \
3704+ poppler-qt4.h \
3705+ poppler-link.h \
3706+ poppler-annotation.h \
3707+ poppler-form.h \
3708+ poppler-optcontent.h \
3709+ poppler-export.h \
3710+ poppler-media.h \
3711+ poppler-page-transition.h
3712+
3713+lib_LTLIBRARIES = libpoppler-qt4.la
3714+libpoppler_qt4_la_SOURCES = \
3715+ poppler-document.cc \
3716+ poppler-page.cc \
3717+ poppler-fontinfo.cc \
3718+ poppler-embeddedfile.cc \
3719+ poppler-textbox.cc \
3720+ poppler-link.cc \
3721+ poppler-annotation.cc \
3722+ poppler-link-extractor.cc \
3723+ poppler-optcontent.cc \
3724+ poppler-optcontent.h \
3725+ poppler-page-transition.cc \
3726+ poppler-sound.cc \
3727+ poppler-form.cc \
3728+ poppler-base-converter.cc \
3729+ poppler-ps-converter.cc \
3730+ poppler-pdf-converter.cc \
3731+ poppler-qiodeviceoutstream.cc \
3732+ poppler-private.cc \
3733+ poppler-movie.cc \
3734+ poppler-media.cc \
3735+ poppler-annotation-helper.h \
3736+ poppler-page-private.h \
3737+ poppler-link-extractor-private.h \
3738+ poppler-annotation-private.h \
3739+ poppler-converter-private.h \
3740+ poppler-qiodeviceoutstream-private.h \
3741+ poppler-optcontent-private.h \
3742+ poppler-export.h \
3743+ poppler-private.h \
3744+ poppler-page-transition-private.h \
3745+ poppler-embeddedfile-private.h
3746+
3747+libpoppler_qt4_la_CXXFLAGS = \
3748+ -Dpoppler_qt4_EXPORTS
3749+
3750+libpoppler_qt4_la_LIBADD = \
3751+ $(top_builddir)/poppler/libpoppler.la \
3752+ $(top_builddir)/poppler/libpoppler-arthur.la \
3753+ $(FONTCONFIG_LIBS) \
3754+ $(POPPLER_QT4_LIBS)
3755+
3756+libpoppler_qt4_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@
3757+BUILT_SOURCES = poppler-optcontent.moc
3758+all: $(BUILT_SOURCES)
3759+ $(MAKE) $(AM_MAKEFLAGS) all-am
3760+
3761+.SUFFIXES:
3762+.SUFFIXES: .cc .h .lo .moc .o .obj
3763+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
3764+ @for dep in $?; do \
3765+ case '$(am__configure_deps)' in \
3766+ *$$dep*) \
3767+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
3768+ && { if test -f $@; then exit 0; else break; fi; }; \
3769+ exit 1;; \
3770+ esac; \
3771+ done; \
3772+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign qt4/src/Makefile'; \
3773+ $(am__cd) $(top_srcdir) && \
3774+ $(AUTOMAKE) --foreign qt4/src/Makefile
3775+.PRECIOUS: Makefile
3776+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
3777+ @case '$?' in \
3778+ *config.status*) \
3779+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
3780+ *) \
3781+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
3782+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
3783+ esac;
3784+
3785+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
3786+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
3787+
3788+$(top_srcdir)/configure: $(am__configure_deps)
3789+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
3790+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
3791+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
3792+$(am__aclocal_m4_deps):
3793+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
3794+ @$(NORMAL_INSTALL)
3795+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
3796+ list2=; for p in $$list; do \
3797+ if test -f $$p; then \
3798+ list2="$$list2 $$p"; \
3799+ else :; fi; \
3800+ done; \
3801+ test -z "$$list2" || { \
3802+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
3803+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
3804+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
3805+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
3806+ }
3807+
3808+uninstall-libLTLIBRARIES:
3809+ @$(NORMAL_UNINSTALL)
3810+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
3811+ for p in $$list; do \
3812+ $(am__strip_dir) \
3813+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
3814+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
3815+ done
3816+
3817+clean-libLTLIBRARIES:
3818+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
3819+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
3820+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
3821+ test "$$dir" != "$$p" || dir=.; \
3822+ echo "rm -f \"$${dir}/so_locations\""; \
3823+ rm -f "$${dir}/so_locations"; \
3824+ done
3825+libpoppler-qt4.la: $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_DEPENDENCIES) $(EXTRA_libpoppler_qt4_la_DEPENDENCIES)
3826+ $(AM_V_CXXLD)$(libpoppler_qt4_la_LINK) -rpath $(libdir) $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_LIBADD) $(LIBS)
3827+
3828+mostlyclean-compile:
3829+ -rm -f *.$(OBJEXT)
3830+
3831+distclean-compile:
3832+ -rm -f *.tab.c
3833+
3834+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Plo@am__quote@
3835+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Plo@am__quote@
3836+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-document.Plo@am__quote@
3837+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Plo@am__quote@
3838+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Plo@am__quote@
3839+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-form.Plo@am__quote@
3840+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Plo@am__quote@
3841+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-link.Plo@am__quote@
3842+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-media.Plo@am__quote@
3843+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-movie.Plo@am__quote@
3844+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Plo@am__quote@
3845+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Plo@am__quote@
3846+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-page.Plo@am__quote@
3847+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Plo@am__quote@
3848+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-private.Plo@am__quote@
3849+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Plo@am__quote@
3850+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Plo@am__quote@
3851+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-sound.Plo@am__quote@
3852+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Plo@am__quote@
3853+
3854+.cc.o:
3855+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
3856+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
3857+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
3858+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3859+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
3860+
3861+.cc.obj:
3862+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
3863+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
3864+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
3865+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3866+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
3867+
3868+.cc.lo:
3869+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
3870+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
3871+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
3872+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3873+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
3874+
3875+libpoppler_qt4_la-poppler-document.lo: poppler-document.cc
3876+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-document.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-document.Tpo -c -o libpoppler_qt4_la-poppler-document.lo `test -f 'poppler-document.cc' || echo '$(srcdir)/'`poppler-document.cc
3877+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-document.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-document.Plo
3878+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-document.cc' object='libpoppler_qt4_la-poppler-document.lo' libtool=yes @AMDEPBACKSLASH@
3879+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3880+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-document.lo `test -f 'poppler-document.cc' || echo '$(srcdir)/'`poppler-document.cc
3881+
3882+libpoppler_qt4_la-poppler-page.lo: poppler-page.cc
3883+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-page.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-page.Tpo -c -o libpoppler_qt4_la-poppler-page.lo `test -f 'poppler-page.cc' || echo '$(srcdir)/'`poppler-page.cc
3884+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-page.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-page.Plo
3885+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page.cc' object='libpoppler_qt4_la-poppler-page.lo' libtool=yes @AMDEPBACKSLASH@
3886+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3887+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-page.lo `test -f 'poppler-page.cc' || echo '$(srcdir)/'`poppler-page.cc
3888+
3889+libpoppler_qt4_la-poppler-fontinfo.lo: poppler-fontinfo.cc
3890+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-fontinfo.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Tpo -c -o libpoppler_qt4_la-poppler-fontinfo.lo `test -f 'poppler-fontinfo.cc' || echo '$(srcdir)/'`poppler-fontinfo.cc
3891+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Plo
3892+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-fontinfo.cc' object='libpoppler_qt4_la-poppler-fontinfo.lo' libtool=yes @AMDEPBACKSLASH@
3893+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3894+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-fontinfo.lo `test -f 'poppler-fontinfo.cc' || echo '$(srcdir)/'`poppler-fontinfo.cc
3895+
3896+libpoppler_qt4_la-poppler-embeddedfile.lo: poppler-embeddedfile.cc
3897+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-embeddedfile.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Tpo -c -o libpoppler_qt4_la-poppler-embeddedfile.lo `test -f 'poppler-embeddedfile.cc' || echo '$(srcdir)/'`poppler-embeddedfile.cc
3898+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Plo
3899+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-embeddedfile.cc' object='libpoppler_qt4_la-poppler-embeddedfile.lo' libtool=yes @AMDEPBACKSLASH@
3900+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3901+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-embeddedfile.lo `test -f 'poppler-embeddedfile.cc' || echo '$(srcdir)/'`poppler-embeddedfile.cc
3902+
3903+libpoppler_qt4_la-poppler-textbox.lo: poppler-textbox.cc
3904+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-textbox.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Tpo -c -o libpoppler_qt4_la-poppler-textbox.lo `test -f 'poppler-textbox.cc' || echo '$(srcdir)/'`poppler-textbox.cc
3905+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Plo
3906+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-textbox.cc' object='libpoppler_qt4_la-poppler-textbox.lo' libtool=yes @AMDEPBACKSLASH@
3907+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3908+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-textbox.lo `test -f 'poppler-textbox.cc' || echo '$(srcdir)/'`poppler-textbox.cc
3909+
3910+libpoppler_qt4_la-poppler-link.lo: poppler-link.cc
3911+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-link.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-link.Tpo -c -o libpoppler_qt4_la-poppler-link.lo `test -f 'poppler-link.cc' || echo '$(srcdir)/'`poppler-link.cc
3912+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-link.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-link.Plo
3913+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-link.cc' object='libpoppler_qt4_la-poppler-link.lo' libtool=yes @AMDEPBACKSLASH@
3914+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3915+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-link.lo `test -f 'poppler-link.cc' || echo '$(srcdir)/'`poppler-link.cc
3916+
3917+libpoppler_qt4_la-poppler-annotation.lo: poppler-annotation.cc
3918+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-annotation.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Tpo -c -o libpoppler_qt4_la-poppler-annotation.lo `test -f 'poppler-annotation.cc' || echo '$(srcdir)/'`poppler-annotation.cc
3919+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Plo
3920+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-annotation.cc' object='libpoppler_qt4_la-poppler-annotation.lo' libtool=yes @AMDEPBACKSLASH@
3921+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3922+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-annotation.lo `test -f 'poppler-annotation.cc' || echo '$(srcdir)/'`poppler-annotation.cc
3923+
3924+libpoppler_qt4_la-poppler-link-extractor.lo: poppler-link-extractor.cc
3925+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-link-extractor.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Tpo -c -o libpoppler_qt4_la-poppler-link-extractor.lo `test -f 'poppler-link-extractor.cc' || echo '$(srcdir)/'`poppler-link-extractor.cc
3926+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Plo
3927+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-link-extractor.cc' object='libpoppler_qt4_la-poppler-link-extractor.lo' libtool=yes @AMDEPBACKSLASH@
3928+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3929+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-link-extractor.lo `test -f 'poppler-link-extractor.cc' || echo '$(srcdir)/'`poppler-link-extractor.cc
3930+
3931+libpoppler_qt4_la-poppler-optcontent.lo: poppler-optcontent.cc
3932+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-optcontent.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Tpo -c -o libpoppler_qt4_la-poppler-optcontent.lo `test -f 'poppler-optcontent.cc' || echo '$(srcdir)/'`poppler-optcontent.cc
3933+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Plo
3934+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-optcontent.cc' object='libpoppler_qt4_la-poppler-optcontent.lo' libtool=yes @AMDEPBACKSLASH@
3935+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3936+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-optcontent.lo `test -f 'poppler-optcontent.cc' || echo '$(srcdir)/'`poppler-optcontent.cc
3937+
3938+libpoppler_qt4_la-poppler-page-transition.lo: poppler-page-transition.cc
3939+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-page-transition.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Tpo -c -o libpoppler_qt4_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cc' || echo '$(srcdir)/'`poppler-page-transition.cc
3940+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Plo
3941+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page-transition.cc' object='libpoppler_qt4_la-poppler-page-transition.lo' libtool=yes @AMDEPBACKSLASH@
3942+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3943+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cc' || echo '$(srcdir)/'`poppler-page-transition.cc
3944+
3945+libpoppler_qt4_la-poppler-sound.lo: poppler-sound.cc
3946+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-sound.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Tpo -c -o libpoppler_qt4_la-poppler-sound.lo `test -f 'poppler-sound.cc' || echo '$(srcdir)/'`poppler-sound.cc
3947+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Plo
3948+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-sound.cc' object='libpoppler_qt4_la-poppler-sound.lo' libtool=yes @AMDEPBACKSLASH@
3949+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3950+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-sound.lo `test -f 'poppler-sound.cc' || echo '$(srcdir)/'`poppler-sound.cc
3951+
3952+libpoppler_qt4_la-poppler-form.lo: poppler-form.cc
3953+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-form.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-form.Tpo -c -o libpoppler_qt4_la-poppler-form.lo `test -f 'poppler-form.cc' || echo '$(srcdir)/'`poppler-form.cc
3954+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-form.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-form.Plo
3955+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-form.cc' object='libpoppler_qt4_la-poppler-form.lo' libtool=yes @AMDEPBACKSLASH@
3956+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3957+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-form.lo `test -f 'poppler-form.cc' || echo '$(srcdir)/'`poppler-form.cc
3958+
3959+libpoppler_qt4_la-poppler-base-converter.lo: poppler-base-converter.cc
3960+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-base-converter.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Tpo -c -o libpoppler_qt4_la-poppler-base-converter.lo `test -f 'poppler-base-converter.cc' || echo '$(srcdir)/'`poppler-base-converter.cc
3961+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Plo
3962+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-base-converter.cc' object='libpoppler_qt4_la-poppler-base-converter.lo' libtool=yes @AMDEPBACKSLASH@
3963+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3964+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-base-converter.lo `test -f 'poppler-base-converter.cc' || echo '$(srcdir)/'`poppler-base-converter.cc
3965+
3966+libpoppler_qt4_la-poppler-ps-converter.lo: poppler-ps-converter.cc
3967+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-ps-converter.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Tpo -c -o libpoppler_qt4_la-poppler-ps-converter.lo `test -f 'poppler-ps-converter.cc' || echo '$(srcdir)/'`poppler-ps-converter.cc
3968+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Plo
3969+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-ps-converter.cc' object='libpoppler_qt4_la-poppler-ps-converter.lo' libtool=yes @AMDEPBACKSLASH@
3970+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3971+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-ps-converter.lo `test -f 'poppler-ps-converter.cc' || echo '$(srcdir)/'`poppler-ps-converter.cc
3972+
3973+libpoppler_qt4_la-poppler-pdf-converter.lo: poppler-pdf-converter.cc
3974+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-pdf-converter.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Tpo -c -o libpoppler_qt4_la-poppler-pdf-converter.lo `test -f 'poppler-pdf-converter.cc' || echo '$(srcdir)/'`poppler-pdf-converter.cc
3975+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Plo
3976+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-pdf-converter.cc' object='libpoppler_qt4_la-poppler-pdf-converter.lo' libtool=yes @AMDEPBACKSLASH@
3977+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3978+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-pdf-converter.lo `test -f 'poppler-pdf-converter.cc' || echo '$(srcdir)/'`poppler-pdf-converter.cc
3979+
3980+libpoppler_qt4_la-poppler-qiodeviceoutstream.lo: poppler-qiodeviceoutstream.cc
3981+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-qiodeviceoutstream.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Tpo -c -o libpoppler_qt4_la-poppler-qiodeviceoutstream.lo `test -f 'poppler-qiodeviceoutstream.cc' || echo '$(srcdir)/'`poppler-qiodeviceoutstream.cc
3982+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Plo
3983+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-qiodeviceoutstream.cc' object='libpoppler_qt4_la-poppler-qiodeviceoutstream.lo' libtool=yes @AMDEPBACKSLASH@
3984+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3985+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-qiodeviceoutstream.lo `test -f 'poppler-qiodeviceoutstream.cc' || echo '$(srcdir)/'`poppler-qiodeviceoutstream.cc
3986+
3987+libpoppler_qt4_la-poppler-private.lo: poppler-private.cc
3988+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-private.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-private.Tpo -c -o libpoppler_qt4_la-poppler-private.lo `test -f 'poppler-private.cc' || echo '$(srcdir)/'`poppler-private.cc
3989+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-private.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-private.Plo
3990+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-private.cc' object='libpoppler_qt4_la-poppler-private.lo' libtool=yes @AMDEPBACKSLASH@
3991+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3992+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-private.lo `test -f 'poppler-private.cc' || echo '$(srcdir)/'`poppler-private.cc
3993+
3994+libpoppler_qt4_la-poppler-movie.lo: poppler-movie.cc
3995+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-movie.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Tpo -c -o libpoppler_qt4_la-poppler-movie.lo `test -f 'poppler-movie.cc' || echo '$(srcdir)/'`poppler-movie.cc
3996+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Plo
3997+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-movie.cc' object='libpoppler_qt4_la-poppler-movie.lo' libtool=yes @AMDEPBACKSLASH@
3998+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
3999+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-movie.lo `test -f 'poppler-movie.cc' || echo '$(srcdir)/'`poppler-movie.cc
4000+
4001+libpoppler_qt4_la-poppler-media.lo: poppler-media.cc
4002+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-media.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-media.Tpo -c -o libpoppler_qt4_la-poppler-media.lo `test -f 'poppler-media.cc' || echo '$(srcdir)/'`poppler-media.cc
4003+@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-media.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-media.Plo
4004+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-media.cc' object='libpoppler_qt4_la-poppler-media.lo' libtool=yes @AMDEPBACKSLASH@
4005+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
4006+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-media.lo `test -f 'poppler-media.cc' || echo '$(srcdir)/'`poppler-media.cc
4007+
4008+mostlyclean-libtool:
4009+ -rm -f *.lo
4010+
4011+clean-libtool:
4012+ -rm -rf .libs _libs
4013+install-poppler_includeHEADERS: $(poppler_include_HEADERS)
4014+ @$(NORMAL_INSTALL)
4015+ @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
4016+ if test -n "$$list"; then \
4017+ echo " $(MKDIR_P) '$(DESTDIR)$(poppler_includedir)'"; \
4018+ $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" || exit 1; \
4019+ fi; \
4020+ for p in $$list; do \
4021+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
4022+ echo "$$d$$p"; \
4023+ done | $(am__base_list) | \
4024+ while read files; do \
4025+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_includedir)'"; \
4026+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_includedir)" || exit $$?; \
4027+ done
4028+
4029+uninstall-poppler_includeHEADERS:
4030+ @$(NORMAL_UNINSTALL)
4031+ @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
4032+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
4033+ dir='$(DESTDIR)$(poppler_includedir)'; $(am__uninstall_files_from_dir)
4034+
4035+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
4036+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
4037+ unique=`for i in $$list; do \
4038+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
4039+ done | \
4040+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
4041+ END { if (nonempty) { for (i in files) print i; }; }'`; \
4042+ mkid -fID $$unique
4043+tags: TAGS
4044+
4045+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
4046+ $(TAGS_FILES) $(LISP)
4047+ set x; \
4048+ here=`pwd`; \
4049+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
4050+ unique=`for i in $$list; do \
4051+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
4052+ done | \
4053+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
4054+ END { if (nonempty) { for (i in files) print i; }; }'`; \
4055+ shift; \
4056+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
4057+ test -n "$$unique" || unique=$$empty_fix; \
4058+ if test $$# -gt 0; then \
4059+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
4060+ "$$@" $$unique; \
4061+ else \
4062+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
4063+ $$unique; \
4064+ fi; \
4065+ fi
4066+ctags: CTAGS
4067+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
4068+ $(TAGS_FILES) $(LISP)
4069+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
4070+ unique=`for i in $$list; do \
4071+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
4072+ done | \
4073+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
4074+ END { if (nonempty) { for (i in files) print i; }; }'`; \
4075+ test -z "$(CTAGS_ARGS)$$unique" \
4076+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
4077+ $$unique
4078+
4079+GTAGS:
4080+ here=`$(am__cd) $(top_builddir) && pwd` \
4081+ && $(am__cd) $(top_srcdir) \
4082+ && gtags -i $(GTAGS_ARGS) "$$here"
4083+
4084+distclean-tags:
4085+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
4086+
4087+distdir: $(DISTFILES)
4088+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
4089+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
4090+ list='$(DISTFILES)'; \
4091+ dist_files=`for file in $$list; do echo $$file; done | \
4092+ sed -e "s|^$$srcdirstrip/||;t" \
4093+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
4094+ case $$dist_files in \
4095+ */*) $(MKDIR_P) `echo "$$dist_files" | \
4096+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
4097+ sort -u` ;; \
4098+ esac; \
4099+ for file in $$dist_files; do \
4100+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
4101+ if test -d $$d/$$file; then \
4102+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
4103+ if test -d "$(distdir)/$$file"; then \
4104+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
4105+ fi; \
4106+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
4107+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
4108+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
4109+ fi; \
4110+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
4111+ else \
4112+ test -f "$(distdir)/$$file" \
4113+ || cp -p $$d/$$file "$(distdir)/$$file" \
4114+ || exit 1; \
4115+ fi; \
4116+ done
4117+check-am: all-am
4118+check: $(BUILT_SOURCES)
4119+ $(MAKE) $(AM_MAKEFLAGS) check-am
4120+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
4121+installdirs:
4122+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(poppler_includedir)"; do \
4123+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
4124+ done
4125+install: $(BUILT_SOURCES)
4126+ $(MAKE) $(AM_MAKEFLAGS) install-am
4127+install-exec: install-exec-am
4128+install-data: install-data-am
4129+uninstall: uninstall-am
4130+
4131+install-am: all-am
4132+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
4133+
4134+installcheck: installcheck-am
4135+install-strip:
4136+ if test -z '$(STRIP)'; then \
4137+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
4138+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
4139+ install; \
4140+ else \
4141+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
4142+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
4143+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
4144+ fi
4145+mostlyclean-generic:
4146+
4147+distclean-generic:
4148+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
4149+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
4150+
4151+maintainer-clean-generic:
4152+ @echo "This command is intended for maintainers to use"
4153+ @echo "it deletes files that may require special tools to rebuild."
4154+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
4155+clean: clean-am
4156+
4157+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
4158+ mostlyclean-am
4159+
4160+distclean: distclean-am
4161+ -rm -rf ./$(DEPDIR)
4162+ -rm -f Makefile
4163+distclean-am: clean-am distclean-compile distclean-generic \
4164+ distclean-tags
4165+
4166+dvi: dvi-am
4167+
4168+dvi-am:
4169+
4170+html: html-am
4171+
4172+html-am:
4173+
4174+info: info-am
4175+
4176+info-am:
4177+
4178+install-data-am: install-poppler_includeHEADERS
4179+
4180+install-dvi: install-dvi-am
4181+
4182+install-dvi-am:
4183+
4184+install-exec-am: install-libLTLIBRARIES
4185+
4186+install-html: install-html-am
4187+
4188+install-html-am:
4189+
4190+install-info: install-info-am
4191+
4192+install-info-am:
4193+
4194+install-man:
4195+
4196+install-pdf: install-pdf-am
4197+
4198+install-pdf-am:
4199+
4200+install-ps: install-ps-am
4201+
4202+install-ps-am:
4203+
4204+installcheck-am:
4205+
4206+maintainer-clean: maintainer-clean-am
4207+ -rm -rf ./$(DEPDIR)
4208+ -rm -f Makefile
4209+maintainer-clean-am: distclean-am maintainer-clean-generic
4210+
4211+mostlyclean: mostlyclean-am
4212+
4213+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
4214+ mostlyclean-libtool
4215+
4216+pdf: pdf-am
4217+
4218+pdf-am:
4219+
4220+ps: ps-am
4221+
4222+ps-am:
4223+
4224+uninstall-am: uninstall-libLTLIBRARIES \
4225+ uninstall-poppler_includeHEADERS
4226+
4227+.MAKE: all check install install-am install-strip
4228+
4229+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
4230+ clean-libLTLIBRARIES clean-libtool ctags distclean \
4231+ distclean-compile distclean-generic distclean-libtool \
4232+ distclean-tags distdir dvi dvi-am html html-am info info-am \
4233+ install install-am install-data install-data-am install-dvi \
4234+ install-dvi-am install-exec install-exec-am install-html \
4235+ install-html-am install-info install-info-am \
4236+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
4237+ install-poppler_includeHEADERS install-ps install-ps-am \
4238+ install-strip installcheck installcheck-am installdirs \
4239+ maintainer-clean maintainer-clean-generic mostlyclean \
4240+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
4241+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
4242+ uninstall-libLTLIBRARIES uninstall-poppler_includeHEADERS
4243+
4244+
4245+SUFFIXES: .moc
4246+
4247+# This rule lets GNU make create any *.moc from the equivalent *.h
4248+.h.moc:
4249+ $(AM_V_GEN) $(MOCQT4) -i $< -o $@
4250+
4251+clean-generic:
4252+ rm -f *.moc
4253+
4254+# Tell versions [3.59,3.63) of GNU make to not export all variables.
4255+# Otherwise a system limit (for SysV at least) may be exceeded.
4256+.NOEXPORT:
4257
4258=== added file '.pc/qt4-visibility.diff/qt4/src/poppler-export.h'
4259--- .pc/qt4-visibility.diff/qt4/src/poppler-export.h 1970-01-01 00:00:00 +0000
4260+++ .pc/qt4-visibility.diff/qt4/src/poppler-export.h 2012-11-16 16:39:27 +0000
4261@@ -0,0 +1,17 @@
4262+/*
4263+* This file is used to set the poppler_qt4_EXPORT macros right.
4264+* This is needed for setting the visibility on windows, it will have no effect on other platforms.
4265+*/
4266+#if defined(_WIN32)
4267+# define LIB_EXPORT __declspec(dllexport)
4268+# define LIB_IMPORT __declspec(dllimport)
4269+#else
4270+# define LIB_EXPORT
4271+# define LIB_IMPORT
4272+#endif
4273+
4274+#ifdef poppler_qt4_EXPORTS
4275+# define POPPLER_QT4_EXPORT LIB_EXPORT
4276+#else
4277+# define POPPLER_QT4_EXPORT LIB_IMPORT
4278+#endif
4279
4280=== modified file 'CMakeLists.txt'
4281--- CMakeLists.txt 2012-06-07 17:13:58 +0000
4282+++ CMakeLists.txt 2012-11-16 16:39:27 +0000
4283@@ -16,7 +16,7 @@
4284
4285 set(POPPLER_MAJOR_VERSION "0")
4286 set(POPPLER_MINOR_VERSION "20")
4287-set(POPPLER_MICRO_VERSION "0")
4288+set(POPPLER_MICRO_VERSION "4")
4289 set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
4290
4291 # command line switches
4292@@ -386,7 +386,7 @@
4293 else(MSVC)
4294 add_library(poppler SHARED ${poppler_SRCS})
4295 endif(MSVC)
4296-set_target_properties(poppler PROPERTIES VERSION 25.0.0 SOVERSION 25)
4297+set_target_properties(poppler PROPERTIES VERSION 28.0.0 SOVERSION 28)
4298 target_link_libraries(poppler ${poppler_LIBS})
4299 target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "")
4300 install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
4301
4302=== modified file 'ChangeLog'
4303--- ChangeLog 2012-06-07 17:13:58 +0000
4304+++ ChangeLog 2012-11-16 16:39:27 +0000
4305@@ -1,3 +1,687 @@
4306+commit 5fd691dc58aac817bca81c87c4820afcf53989d1
4307+Author: Albert Astals Cid <aacid@kde.org>
4308+Date: Mon Sep 10 19:29:01 2012 +0200
4309+
4310+ 0.20.40.20.40.20.40.20.4
4311+
4312+ CMakeLists.txt | 4 ++--
4313+ NEWS | 13 +++++++++++++
4314+ configure.ac | 2 +-
4315+ cpp/Doxyfile | 2 +-
4316+ poppler/Makefile.am | 2 +-
4317+ qt4/src/Doxyfile | 2 +-
4318+ 6 files changed, 19 insertions(+), 6 deletions(-)
4319+
4320+commit b3e86dbdba82956f125e37f69176072e2d0127f2
4321+Author: Thomas Freitag <Thomas.Freitag@kabelmail.de>
4322+Date: Sun Sep 9 23:35:45 2012 +0200
4323+
4324+ Try to find another rootNum if actual rootNum doesn't point to a dict
4325+
4326+ Bug #14303
4327+
4328+ poppler/XRef.cc | 14 ++++++++++++--
4329+ poppler/XRef.h | 4 ++--
4330+ 2 files changed, 14 insertions(+), 4 deletions(-)
4331+
4332+commit 558a7d9b046bbbe185dea263b48a3cb2664378fc
4333+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4334+Date: Sun Sep 9 23:25:47 2012 +0200
4335+
4336+ Fix invalid memory access in solves 1066.pdf.asan.38.75
4337+
4338+ splash/SplashClip.cc | 23 +++++++++++++++++++++++
4339+ splash/SplashXPathScanner.cc | 3 +++
4340+ 2 files changed, 26 insertions(+)
4341+
4342+commit d0df8e54512f584ca2b3edbae1c19e167948e5c3
4343+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4344+Date: Sun Sep 9 23:21:38 2012 +0200
4345+
4346+ Fix invalid memory access in 1106.pdf.asan.30.120.patch
4347+
4348+ poppler/Function.cc | 5 +++++
4349+ 1 file changed, 5 insertions(+)
4350+
4351+commit 86b89864396a1dcf027e5793e6ac75411977bcf9
4352+Author: Thomas Freitag <Thomas.Freitag@kabelmail.de>
4353+Date: Sun Sep 9 23:08:49 2012 +0200
4354+
4355+ Fix crash in 1255.pdf.SIGSEGV.56f.285
4356+
4357+ poppler/XRef.cc | 6 ++++++
4358+ 1 file changed, 6 insertions(+)
4359+
4360+commit 96931732f343d2bbda9af9488b485da031866c3b
4361+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4362+Date: Sun Sep 9 22:47:57 2012 +0200
4363+
4364+ Fix invalid memory access in 61.pdf.asan.13.95
4365+
4366+ fofi/FoFiType1C.cc | 25 +++++++++++++++++--------
4367+ fofi/FoFiType1C.h | 2 ++
4368+ 2 files changed, 19 insertions(+), 8 deletions(-)
4369+
4370+commit 26917d69c4da6a110db02b120133c36579fbb17c
4371+Author: Albert Astals Cid <aacid@kde.org>
4372+Date: Sun Sep 9 22:23:36 2012 +0200
4373+
4374+ Add unlikely
4375+
4376+ poppler/Gfx.cc | 2 +-
4377+ 1 file changed, 1 insertion(+), 1 deletion(-)
4378+
4379+commit e6a3c797c01aa343f640f2e6f45de5bf379aa8ad
4380+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4381+Date: Sun Sep 9 22:22:59 2012 +0200
4382+
4383+ Fix wrong memory access in 68.pdf.asan.7.1030
4384+
4385+ poppler/Gfx.cc | 4 ++++
4386+ 1 file changed, 4 insertions(+)
4387+
4388+commit 48fe18cf277cd2a4e665c74b3a594482f762f4b6
4389+Author: Albert Astals Cid <aacid@kde.org>
4390+Date: Sun Sep 9 22:09:44 2012 +0200
4391+
4392+ Fix memory leak
4393+
4394+ poppler/Gfx.cc | 1 +
4395+ 1 file changed, 1 insertion(+)
4396+
4397+commit b87aafc0cdb36c3555053f2684c45f1a9d7b2f94
4398+Author: Albert Astals Cid <aacid@kde.org>
4399+Date: Sun Sep 9 21:42:48 2012 +0200
4400+
4401+ Add unlikelys to the ifs
4402+
4403+ poppler/DCTStream.cc | 4 ++--
4404+ poppler/JBIG2Stream.cc | 2 +-
4405+ 2 files changed, 3 insertions(+), 3 deletions(-)
4406+
4407+commit a019eef2f8ca53addd7ccab7f9c47657f4e52286
4408+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4409+Date: Sun Sep 9 21:41:09 2012 +0200
4410+
4411+ Fix crash in 1162.pdf.SIGSEGV.28e.182
4412+
4413+ poppler/DCTStream.cc | 4 ++++
4414+ 1 file changed, 4 insertions(+)
4415+
4416+commit ad7c6ac88f2315c9ce003308d1b4988592d4434b
4417+Author: William Bader <williambader@hotmail.com>
4418+Date: Sun Sep 9 21:31:58 2012 +0200
4419+
4420+ Fix crash in 1028.pdf.SIGSEGV.ae6.33
4421+
4422+ poppler/JBIG2Stream.cc | 8 ++++++++
4423+ 1 file changed, 8 insertions(+)
4424+
4425+commit b861af714daee4125e54b250dddf82106f5a8ce8
4426+Author: Albert Astals Cid <aacid@kde.org>
4427+Date: Sun Sep 9 21:15:06 2012 +0200
4428+
4429+ Fix memory leak
4430+
4431+ poppler/Form.cc | 2 +-
4432+ 1 file changed, 1 insertion(+), 1 deletion(-)
4433+
4434+commit a4f59113574a8d7460c6ce5000cb09d20fe52b74
4435+Author: Albert Astals Cid <aacid@kde.org>
4436+Date: Sun Sep 9 12:49:43 2012 +0200
4437+
4438+ Fix memory leak
4439+
4440+ poppler/Annot.cc | 3 ++-
4441+ 1 file changed, 2 insertions(+), 1 deletion(-)
4442+
4443+commit 28240046f8fe37ca96f9a80cb1ea3a59af9c66f3
4444+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4445+Date: Sun Sep 9 12:48:26 2012 +0200
4446+
4447+ Fix crash in 589.pdf.SIGSEGV.8b1.929
4448+
4449+ poppler/Annot.cc | 8 ++++++++
4450+ 1 file changed, 8 insertions(+)
4451+
4452+commit ccd3db5a7723ddb692f6dc85ed9d0f5e3dde189f
4453+Author: Albert Astals Cid <aacid@kde.org>
4454+Date: Sat Sep 8 18:10:14 2012 +0200
4455+
4456+ Only complain when the malloc really failed
4457+
4458+ poppler/JBIG2Stream.cc | 2 +-
4459+ 1 file changed, 1 insertion(+), 1 deletion(-)
4460+
4461+commit 6356c0bbae47db291a3585d31c7727bc3f8d97a4
4462+Author: Albert Astals Cid <aacid@kde.org>
4463+Date: Thu Aug 30 00:57:51 2012 +0200
4464+
4465+ qt4: unbreak spacing
4466+
4467+ qt4/src/poppler-embeddedfile.cc | 6 +++---
4468+ 1 file changed, 3 insertions(+), 3 deletions(-)
4469+
4470+commit 46948868dee6d4e68b658c68d7df482590e34da3
4471+Author: Albert Astals Cid <aacid@kde.org>
4472+Date: Thu Aug 30 00:43:45 2012 +0200
4473+
4474+ Accept FileSpec as Dict too and not only as Ref
4475+
4476+ File to try in KDE bug #306008
4477+
4478+ poppler/Catalog.cc | 4 +++-
4479+ 1 file changed, 3 insertions(+), 1 deletion(-)
4480+
4481+commit debc8fb497bc22c0f9f34d785852981a87475c30
4482+Author: Albert Astals Cid <aacid@kde.org>
4483+Date: Thu Aug 30 00:35:40 2012 +0200
4484+
4485+ Take into account the embFile returned by the core may be NULL
4486+
4487+ qt4/src/poppler-embeddedfile-private.h | 4 +++-
4488+ qt4/src/poppler-embeddedfile.cc | 19 ++++++++++++-------
4489+ 2 files changed, 15 insertions(+), 8 deletions(-)
4490+
4491+commit 3ca67a59fc15782abb1e479eb2b8916de5b1b6ed
4492+Author: Albert Astals Cid <aacid@kde.org>
4493+Date: Thu Aug 30 00:34:06 2012 +0200
4494+
4495+ Return NULL EmbFile if the FileSpec is not ok
4496+
4497+ Otherwise we might end up asserting
4498+
4499+ poppler/FileSpec.cc | 4 ++++
4500+ 1 file changed, 4 insertions(+)
4501+
4502+commit 686ec0cc92e25f74eaa9e09a328724cbdf939bca
4503+Author: Albert Astals Cid <aacid@kde.org>
4504+Date: Wed Aug 15 20:02:05 2012 +0200
4505+
4506+ Remove declared but not implemented function
4507+
4508+ poppler/XRef.h | 1 -
4509+ 1 file changed, 1 deletion(-)
4510+
4511+commit e83568065f77ba722b147b3b10faed1ff66f22dc
4512+Author: Pino Toscano <pino@kde.org>
4513+Date: Sat Aug 11 01:38:08 2012 +0200
4514+
4515+ remove extra execution permissions
4516+
4517+ (cherry picked from commit 9a5a19ee2f9cd536c3527b30c0256ca9dce3638c)
4518+
4519+ 0 files changed
4520+
4521+commit 1b2903c104012fdd3c982d57898910945dff9a15
4522+Author: Albert Astals Cid <aacid@kde.org>
4523+Date: Sat Aug 11 00:05:10 2012 +0200
4524+
4525+ 0.20.3
4526+
4527+ CMakeLists.txt | 4 ++--
4528+ NEWS | 16 ++++++++++++++++
4529+ configure.ac | 2 +-
4530+ cpp/Doxyfile | 2 +-
4531+ poppler/Makefile.am | 2 +-
4532+ qt4/src/Doxyfile | 2 +-
4533+ 6 files changed, 22 insertions(+), 6 deletions(-)
4534+
4535+commit 40e7b744d32152ab4c6201b8bda7fb7caf6bfd4e
4536+Author: Albert Astals Cid <aacid@kde.org>
4537+Date: Sun Aug 5 15:07:16 2012 +0200
4538+
4539+ If NULL, NULL fails as password try EMPTY, EMPTY before failing
4540+
4541+ Reviewed by Jose Aliste
4542+ Bug #3498
4543+
4544+ poppler/SecurityHandler.cc | 7 ++++++-
4545+ 1 file changed, 6 insertions(+), 1 deletion(-)
4546+
4547+commit 3ca2bc0d3abdf92741b7921ea402c9de09e531f6
4548+Author: Markus Trippelsdorf <markus@trippelsdorf.de>
4549+Date: Fri Aug 3 00:48:12 2012 +0200
4550+
4551+ Fix segfault when scaleImage returns NULL
4552+
4553+ Bug 52488
4554+
4555+ splash/Splash.cc | 7 +++++++
4556+ 1 file changed, 7 insertions(+)
4557+
4558+commit 768cf5877f48f8cee80fe96e2ee52f42f230dfdf
4559+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4560+Date: Thu Aug 2 00:22:19 2012 +0200
4561+
4562+ PSOutputDev: Fix Bitmaps in level2sep or level3sep
4563+
4564+ Bug #52384
4565+
4566+ poppler/PSOutputDev.cc | 4 ++--
4567+ 1 file changed, 2 insertions(+), 2 deletions(-)
4568+
4569+commit 315447843a368556a8536bc30e579c9bf338682e
4570+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4571+Date: Wed Aug 1 22:56:49 2012 +0200
4572+
4573+ Splash: Blend mode enhancements for CMYK
4574+
4575+ poppler/SplashOutputDev.cc | 76
4576+ +++++++++++++++++++++++++++++++-------------
4577+ splash/Splash.cc | 22 -------------
4578+ 2 files changed, 54 insertions(+), 44 deletions(-)
4579+
4580+commit c0c88b3707fc7337e814ae4252d80002641a19ee
4581+Author: Albert Astals Cid <aacid@kde.org>
4582+Date: Tue Jul 31 23:32:19 2012 +0200
4583+
4584+ Replace c++ style includes with c style ones
4585+
4586+ Fixes build in Solaris 10
4587+ Bug #52426
4588+
4589+ goo/gstrtod.cc | 10 +++++-----
4590+ 1 file changed, 5 insertions(+), 5 deletions(-)
4591+
4592+commit dcbc923bd3592a81876f84005fbaddcea18641cc
4593+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4594+Date: Sun Jul 22 18:40:46 2012 +0200
4595+
4596+ Make sure xScale and yScale are always initialized
4597+
4598+ Bug #52215
4599+
4600+ poppler/PSOutputDev.cc | 5 +----
4601+ 1 file changed, 1 insertion(+), 4 deletions(-)
4602+
4603+commit ef7c2418e12d3e6a79f1d89a0051b005fadbc344
4604+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4605+Date: Sat Jul 21 00:01:49 2012 +0200
4606+
4607+ Fix conversion to ps when having multiple strips
4608+
4609+ Bug 51982
4610+
4611+ poppler/PSOutputDev.cc | 4 +++-
4612+ 1 file changed, 3 insertions(+), 1 deletion(-)
4613+
4614+commit 349b21acc249c130fb053bc4a0c75019f75bd35b
4615+Author: Torsten Kasch <tk@CeBiTec.Uni-Bielefeld.DE>
4616+Date: Thu Jul 19 00:18:14 2012 +0200
4617+
4618+ Unify poppler-config.h includes in core "installed" headers
4619+
4620+ Bug 52193
4621+
4622+ goo/FixedPoint.h | 2 +-
4623+ goo/GooTimer.h | 2 +-
4624+ goo/JpegWriter.h | 2 +-
4625+ goo/PNGWriter.h | 2 +-
4626+ goo/TiffWriter.h | 2 +-
4627+ goo/gfile.h | 2 +-
4628+ goo/gmem.h | 2 +-
4629+ splash/SplashFTFont.h | 2 +-
4630+ splash/SplashMath.h | 2 +-
4631+ 9 files changed, 9 insertions(+), 9 deletions(-)
4632+
4633+commit 15c6ae699f083ea6c9716c1098ae9833a56eeb3e
4634+Author: Torsten Kasch <tk@CeBiTec.Uni-Bielefeld.DE>
4635+Date: Thu Jul 19 00:06:45 2012 +0200
4636+
4637+ autoconf: Do not assume the shell is bash compatible
4638+
4639+ Bug 52197
4640+
4641+ configure.ac | 2 +-
4642+ 1 file changed, 1 insertion(+), 1 deletion(-)
4643+
4644+commit f5311da76ec7cd7c1e6cdfc4e18df6dd56e8398b
4645+Author: Albert Astals Cid <aacid@kde.org>
4646+Date: Thu Jul 19 00:01:49 2012 +0200
4647+
4648+ pdfseparate: Return 0 on success
4649+
4650+ utils/pdfseparate.cc | 6 +++++-
4651+ 1 file changed, 5 insertions(+), 1 deletion(-)
4652+
4653+commit 51f22ca0badfc41c19cba66cabd63184244f81c7
4654+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4655+Date: Mon Jul 16 23:32:23 2012 +0200
4656+
4657+ PSOutputDev: Fix DeviceN images with alternate Lab colorspace in
4658+ level 3 PostScript
4659+
4660+ Bug #51822
4661+
4662+ poppler/PSOutputDev.cc | 54
4663+ +++++++++++++++++++++++++++++++++++++++++-------
4664+ poppler/PSOutputDev.h | 2 +-
4665+ 2 files changed, 48 insertions(+), 8 deletions(-)
4666+
4667+commit 950d5f3dec4bff5d3c523d55689d7b70215dc110
4668+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4669+Date: Fri Jul 13 00:56:48 2012 +0200
4670+
4671+ Fix Splash::arbitraryTransformImage causes bogus memory allocation
4672+ size
4673+
4674+ Bug #49523
4675+
4676+ poppler/SplashOutputDev.cc | 2 +-
4677+ splash/Splash.cc | 79
4678+ +++++++++++++++++++++++++-------------------
4679+ splash/Splash.h | 4 +--
4680+ 3 files changed, 48 insertions(+), 37 deletions(-)
4681+
4682+commit e09be3bc6ba1290fd31bde0c3d19c4ffcbadbf00
4683+Author: Albert Astals Cid <aacid@kde.org>
4684+Date: Tue Jul 10 23:06:53 2012 +0200
4685+
4686+ 0.20.2
4687+
4688+ CMakeLists.txt | 2 +-
4689+ NEWS | 11 +++++++++++
4690+ configure.ac | 2 +-
4691+ cpp/Doxyfile | 2 +-
4692+ qt4/src/Doxyfile | 2 +-
4693+ 5 files changed, 15 insertions(+), 4 deletions(-)
4694+
4695+commit e15fe0e1e6accf779caeb1179a8d62161c0aa650
4696+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4697+Date: Thu Jul 5 17:44:02 2012 +0200
4698+
4699+ Fix handling of DeviceN images in level 3 PostScript
4700+
4701+ bug #51548
4702+
4703+ poppler/PSOutputDev.cc | 14 --------------
4704+ 1 file changed, 14 deletions(-)
4705+
4706+commit 02c4e6bf4cc0f5535946fe31815081a40b1de986
4707+Author: Albert Astals Cid <aacid@kde.org>
4708+Date: Fri Jun 29 01:56:55 2012 +0200
4709+
4710+ PSOutputDev: Correct %%DocumentCustomColors
4711+
4712+ Bug 51479
4713+
4714+ poppler/PSOutputDev.cc | 20 ++++++++++++++++++++
4715+ 1 file changed, 20 insertions(+)
4716+
4717+commit f7990386d268a444c297958e9c50ed27a0825a00
4718+Author: Albert Astals Cid <aacid@kde.org>
4719+Date: Thu Jun 28 00:18:07 2012 +0200
4720+
4721+ Add some security checks to JPXStream decoding
4722+
4723+ Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk
4724+ and Gynvael Coldwind
4725+
4726+ poppler/JPXStream.cc | 14 ++++++++++++--
4727+ 1 file changed, 12 insertions(+), 2 deletions(-)
4728+
4729+commit c5c6eed1623506e1206e89cee0b7c887d815ba62
4730+Author: Albert Astals Cid <aacid@kde.org>
4731+Date: Sun Jun 24 23:43:03 2012 +0200
4732+
4733+ Change SplashBitmap gmallocn to gmallocn_checkoverflow
4734+
4735+ Fixes abort in KDE bug #302372
4736+
4737+ splash/Splash.cc | 37 +++++++++++++++++++++++--------------
4738+ splash/SplashBitmap.cc | 18 +++++++++++-------
4739+ 2 files changed, 34 insertions(+), 21 deletions(-)
4740+
4741+commit c87738ee234aafc6eda5a263ad789205037020e1
4742+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4743+Date: Sun Jun 24 20:20:38 2012 +0200
4744+
4745+ copy resources content defined in the pages dict
4746+
4747+ Fixes bug #51369
4748+
4749+ poppler/PDFDoc.cc | 16 ++++++++++++++--
4750+ 1 file changed, 14 insertions(+), 2 deletions(-)
4751+
4752+commit 6cdf879e389f05abba30b3fad8083b7fff23056e
4753+Author: Fabio D'Urso <fabiodurso@hotmail.it>
4754+Date: Sun Jun 24 11:48:04 2012 +0200
4755+
4756+ qt4: Do not hang on malformed /Annots objects
4757+
4758+ Don't recurse infinitely if the /Annots object contains annotation
4759+ dictionaries (according to specs, /Annots must contain *references*
4760+ to annotation dictionaries).
4761+
4762+ Fixes bug #51361
4763+
4764+ qt4/src/poppler-annotation.cc | 5 +++++
4765+ 1 file changed, 5 insertions(+)
4766+
4767+commit 3575becd60585324bcefc0631b1bac47c1db3c5c
4768+Author: Mark Brand <mabrand@mabrand.nl>
4769+Date: Thu Jun 14 20:31:26 2012 +0200
4770+
4771+ fix typo to compile in Windows
4772+
4773+ poppler/GlobalParamsWin.cc | 3 ++-
4774+ 1 file changed, 2 insertions(+), 1 deletion(-)
4775+
4776+commit 06618065c8a97a5bec125560546b98edfc1210f3
4777+Author: Albert Astals Cid <aacid@kde.org>
4778+Date: Mon Jun 11 15:17:59 2012 +0200
4779+
4780+ Add some security checks to JBIG2Stream decoding
4781+
4782+ Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk
4783+ and Gynvael Coldwind
4784+
4785+ poppler/JBIG2Stream.cc | 58
4786+ ++++++++++++++++++++++++++++++++++++------------
4787+ 1 file changed, 44 insertions(+), 14 deletions(-)
4788+
4789+commit e3fe88df3646a80945210ba426eb4681a98b55e9
4790+Author: Hib Eris <hib@hiberis.nl>
4791+Date: Sun Jun 10 19:44:18 2012 +0200
4792+
4793+ Check value of first page in linearization table
4794+
4795+ Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk
4796+ and Gynvael Coldwind
4797+
4798+ poppler/Linearization.cc | 4 ++--
4799+ 1 file changed, 2 insertions(+), 2 deletions(-)
4800+
4801+commit 1240eee8c0d0d01113443e0fda87721775a76da9
4802+Author: Albert Astals Cid <aacid@kde.org>
4803+Date: Sun Jun 10 20:42:55 2012 +0200
4804+
4805+ 0.20.1
4806+
4807+ CMakeLists.txt | 4 ++--
4808+ NEWS | 25 +++++++++++++++++++++++++
4809+ configure.ac | 2 +-
4810+ cpp/Doxyfile | 2 +-
4811+ poppler/Makefile.am | 2 +-
4812+ qt4/src/Doxyfile | 2 +-
4813+ 6 files changed, 31 insertions(+), 6 deletions(-)
4814+
4815+commit c783037619e2b4c101e8ecd7e61c94ee077b4be2
4816+Author: Albert Astals Cid <aacid@kde.org>
4817+Date: Sun Jun 10 20:15:01 2012 +0200
4818+
4819+ Update copyrights
4820+
4821+ poppler/GlobalParamsWin.cc | 1 +
4822+ 1 file changed, 1 insertion(+)
4823+
4824+commit f3f9d8f28a97338da92c842d5668b0ef3495ef13
4825+Author: Albert Astals Cid <aacid@kde.org>
4826+Date: Sun Jun 10 19:09:17 2012 +0200
4827+
4828+ Do use NULL function
4829+
4830+ Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk
4831+ and Gynvael Coldwind
4832+
4833+ poppler/Gfx.cc | 5 +++--
4834+ 1 file changed, 3 insertions(+), 2 deletions(-)
4835+
4836+commit 92ef16e3699da949c80716c3fd4b438fe79c134d
4837+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4838+Date: Sun Jun 10 16:58:54 2012 +0200
4839+
4840+ use setoverprintmode only if rip knows it
4841+
4842+ poppler/PSOutputDev.cc | 6 +++---
4843+ 1 file changed, 3 insertions(+), 3 deletions(-)
4844+
4845+commit 99aa734ae2d3ba51f840d4c8ef450488fb702a31
4846+Author: Fabio D'Urso <fabiodurso@hotmail.it>
4847+Date: Thu May 24 23:17:27 2012 +0200
4848+
4849+ qt4: Keep page rotation into account when normalizing annotation
4850+ coords
4851+
4852+ If the page is rotated by 90 or 270 degrees, width and height need
4853+ to be swapped
4854+
4855+ qt4/src/poppler-annotation.cc | 16 ++++++++++++++--
4856+ 1 file changed, 14 insertions(+), 2 deletions(-)
4857+
4858+commit bde31ce7b223abc86d25e06f3d73668b792c70df
4859+Author: Fabio D'Urso <fabiodurso@hotmail.it>
4860+Date: Sat Jun 9 01:31:29 2012 +0200
4861+
4862+ Fix saving to xml
4863+
4864+ The default icon is Note not comment
4865+
4866+ qt4/src/poppler-annotation.cc | 2 +-
4867+ 1 file changed, 1 insertion(+), 1 deletion(-)
4868+
4869+commit 9904b8f10abf068a7816bd90976ccbb320387645
4870+Author: Adrian Johnson <ajohnson@redneon.com>
4871+Date: Thu May 24 18:24:48 2012 +0930
4872+
4873+ glib docs: fix typo
4874+
4875+ glib/poppler-document.cc | 4 ++--
4876+ 1 file changed, 2 insertions(+), 2 deletions(-)
4877+
4878+commit 028f580056f99719cfb8af7bbe8184ceac02cb16
4879+Author: Adrian Johnson <ajohnson@redneon.com>
4880+Date: Sun May 13 21:36:36 2012 +0930
4881+
4882+ add sustitute font name to GlobalParamsWin32 to fix compilation
4883+
4884+ poppler/GlobalParamsWin.cc | 5 ++++-
4885+ 1 file changed, 4 insertions(+), 1 deletion(-)
4886+
4887+commit 1916d000a86336213ffd6e9bd44ce873e8955895
4888+Author: Adrian Johnson <ajohnson@redneon.com>
4889+Date: Sat May 12 16:31:38 2012 +0930
4890+
4891+ Include substitute font name in system font cache
4892+
4893+ Bug 49826
4894+
4895+ poppler/FontInfo.cc | 1 +
4896+ poppler/GlobalParams.cc | 58
4897+ ++++++++++++++++++++++++++---------------------
4898+ 2 files changed, 33 insertions(+), 26 deletions(-)
4899+
4900+commit 1c6e84555572a6bf3a2e3fbe9a54b40f11c122ad
4901+Author: Fabio D'Urso <fabiodurso@hotmail.it>
4902+Date: Fri May 18 16:22:46 2012 +0200
4903+
4904+ qt4: Make TextAnnotation ctor public
4905+
4906+ qt4/src/poppler-annotation.h | 2 +-
4907+ 1 file changed, 1 insertion(+), 1 deletion(-)
4908+
4909+commit 8e504bf2543621973fdaddbd29055ce435540146
4910+Author: Ville Skyttä <ville.skytta@iki.fi>
4911+Date: Wed May 16 23:49:01 2012 +0300
4912+
4913+ pdfseparate.1: Syntax fixes.
4914+
4915+ utils/pdfseparate.1 | 6 +++---
4916+ 1 file changed, 3 insertions(+), 3 deletions(-)
4917+
4918+commit 9f7d919e68a26bb7dd809986d8394fe20b750bd0
4919+Author: Anthony Wesley <awesley@smartnetworks.com.au>
4920+Date: Thu May 17 19:54:47 2012 +0200
4921+
4922+ Fix logic on SplashBitmap::writeImgFile
4923+
4924+ splash/SplashBitmap.cc | 3 ++-
4925+ 1 file changed, 2 insertions(+), 1 deletion(-)
4926+
4927+commit 7e7997e12faccf4c0513811b324a2fd0fa960a96
4928+Author: Igor Slepchin <igor.slepchin@gmail.com>
4929+Date: Tue May 15 23:16:27 2012 +0200
4930+
4931+ Determine if font is bold or italic based on FontDescriptor.
4932+
4933+ Bug #49758
4934+
4935+ utils/HtmlFonts.cc | 24 ++++++++++++++++++------
4936+ utils/HtmlFonts.h | 3 ++-
4937+ utils/HtmlOutputDev.cc | 4 +---
4938+ 3 files changed, 21 insertions(+), 10 deletions(-)
4939+
4940+commit 329bb1e2b4f4b58832847bcf805d19ac0fd5ef02
4941+Author: Carlos Garcia Campos <carlosgc@gnome.org>
4942+Date: Sun May 13 19:45:55 2012 +0200
4943+
4944+ glib: Make sure password is always converted to latin1
4945+
4946+ Remove the utf8 validation since glib API is supposed to always
4947+ receive
4948+ utf8 strings.
4949+
4950+ glib/poppler-document.cc | 38 +++++++++++++++++++-------------------
4951+ 1 file changed, 19 insertions(+), 19 deletions(-)
4952+
4953+commit 7714b4e319c48ee915061a172208245ae7c4141b
4954+Author: Carlos Garcia Campos <carlosgc@gnome.org>
4955+Date: Sun May 13 19:30:17 2012 +0200
4956+
4957+ glib: Fix memory leak when document fails to load
4958+
4959+ glib/poppler-document.cc | 3 +--
4960+ 1 file changed, 1 insertion(+), 2 deletions(-)
4961+
4962+commit 13d2aa303eb1fd900f1045efec14af8002477b02
4963+Author: Thomas Freitag <Thomas.Freitag@alfa.de>
4964+Date: Sun May 13 17:25:15 2012 +0200
4965+
4966+ remove unnecesary transparency group handling in splash
4967+
4968+ Bug #13487
4969+
4970+ poppler/Gfx.cc | 64
4971+ +++++++++++++++++++++++++++++++++++++++++++-
4972+ poppler/Gfx.h | 4 ++-
4973+ poppler/GfxState.cc | 4 ++-
4974+ poppler/OutputDev.h | 1 +
4975+ poppler/SplashOutputDev.cc | 11 ++++++++
4976+ poppler/SplashOutputDev.h | 1 +
4977+ 6 files changed, 82 insertions(+), 3 deletions(-)
4978+
4979+commit a76867003a7bff5ab03016156c75b4c928788d50
4980+Author: Albert Astals Cid <aacid@kde.org>
4981+Date: Sun May 13 13:10:40 2012 +0200
4982+
4983+ Distribute cmake/modules/FindLCMS2.cmake
4984+
4985+ Bug #49818
4986+
4987+ Makefile.am | 1 +
4988+ 1 file changed, 1 insertion(+)
4989+
4990 commit 4114c928fa2560937e02319f57937f1c267a9817
4991 Author: Albert Astals Cid <aacid@kde.org>
4992 Date: Thu May 10 21:09:14 2012 +0200
4993
4994=== modified file 'Makefile.am'
4995--- Makefile.am 2012-06-07 17:13:58 +0000
4996+++ Makefile.am 2012-11-16 16:39:27 +0000
4997@@ -76,6 +76,7 @@
4998 cmake/modules/FindGTK.cmake \
4999 cmake/modules/FindIconv.cmake \
5000 cmake/modules/FindLCMS.cmake \
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches