Debian Codegraph @

debian/patches/0006-qpdf-12.patch

raw symbols SCIP
1 Fromscip-debian debian cups-filters 1.28.17-7 cups-filters/patches/`0006-qpdf-12.patch`#From.: Sébastien Noel <[email protected]scip-debian . . . identity/`[email protected]`.>
2 Subjectscip-debian debian cups-filters 1.28.17-7 cups-filters/patches/`0006-qpdf-12.patch`#Subject.: fix build against qpdf 12
3 --- a/filter/pdf.cxxscip-debian debian cups-filters 1.28.17-7 cups-filters/upstream/`filter/pdf.cxx`:
4 +++ b/filter/pdf.cxxscip-debian debian cups-filters 1.28.17-7 cups-filters/upstream/`filter/pdf.cxx`:
5 @@ -21,6 +21,8 @@
6 #include <vector>
7 #include <string>
8 #include <cstring>
9 +#define POINTERHOLDER_TRANSITION 3
10 +#include <qpdf/PointerHolder.hh>
11 #include <qpdf/QPDF.hh>
12 #include <qpdf/QPDFObjectHandle.hh>
13 #include <qpdf/QPDFWriter.hh>
14 --- a/filter/pdftopdf/qpdf_xobject.ccscip-debian debian cups-filters 1.28.17-7 cups-filters/upstream/`filter/pdftopdf/qpdf_xobject.cc`:
15 +++ b/filter/pdftopdf/qpdf_xobject.ccscip-debian debian cups-filters 1.28.17-7 cups-filters/upstream/`filter/pdftopdf/qpdf_xobject.cc`:
16 @@ -1,5 +1,7 @@
17 #include "qpdf_xobject.h"
18 //#include <qpdf/Types.h>
19 +#define POINTERHOLDER_TRANSITION 3
20 +#include <qpdf/PointerHolder.hh>
21 #include <qpdf/QPDF.hh>
22 #include <qpdf/Pl_Discard.hh>
23 #include <qpdf/Pl_Count.hh>
24 --- a/filter/rastertopdf.cppscip-debian debian cups-filters 1.28.17-7 cups-filters/upstream/`filter/rastertopdf.cpp`:
25 +++ b/filter/rastertopdf.cppscip-debian debian cups-filters 1.28.17-7 cups-filters/upstream/`filter/rastertopdf.cpp`:
26 @@ -39,6 +39,8 @@
27 #include <arpa/inet.h> // ntohl
28
29 #include <vector>
30 +#define POINTERHOLDER_TRANSITION 3
31 +#include <qpdf/PointerHolder.hh>
32 #include <qpdf/QPDF.hh>
33 #include <qpdf/QPDFWriter.hh>
34 #include <qpdf/QUtil.hh>
35 @@ -481,7 +483,7 @@ QPDFObjectHandle embedIccProfile(QPDF &p
36 cmsSaveProfileToMem(colorProfile, buff, &profile_size);
37
38 // Write ICC profile buffer into PDF
39 - ph = new Buffer(buff, profile_size);
40 + ph = (PointerHolder<Buffer>) new Buffer(buff, profile_size);
41 iccstream = QPDFObjectHandle::newStream(&pdf, ph);
42 iccstream.replaceDict(QPDFObjectHandle::newDictionary(streamdict));
43
44 --- a/filter/pdftopdf/qpdf_pdftopdf_processor.ccscip-debian debian cups-filters 1.28.17-7 cups-filters/upstream/`filter/pdftopdf/qpdf_pdftopdf_processor.cc`:
45 +++ b/filter/pdftopdf/qpdf_pdftopdf_processor.ccscip-debian debian cups-filters 1.28.17-7 cups-filters/upstream/`filter/pdftopdf/qpdf_pdftopdf_processor.cc`:
46 @@ -83,10 +83,10 @@
47 page.getKey("/Resources").replaceKey("/XObject",QPDFObjectHandle::newDictionary(xobjs));
48 content.append("Q\n");
49 page.getKey("/Contents").replaceStreamData(content,QPDFObjectHandle::newNull(),QPDFObjectHandle::newNull());
50 - page.replaceOrRemoveKey("/Rotate",makeRotate(rotation));
51 + page.replaceKey("/Rotate",makeRotate(rotation));
52 } else {
53 Rotation rot=getRotate(page)+rotation;
54 - page.replaceOrRemoveKey("/Rotate",makeRotate(rot));
55 + page.replaceKey("/Rotate",makeRotate(rot));
56 }
57 page=QPDFObjectHandle(); // i.e. uninitialized
58 return ret;
59 @@ -181,9 +181,9 @@
60 page.assertInitialized();
61 Rotation save_rotate = getRotate(page);
62 if(orientation==ROT_0||orientation==ROT_180)
63 - page.replaceOrRemoveKey("/Rotate",makeRotate(ROT_90));
64 + page.replaceKey("/Rotate",makeRotate(ROT_90));
65 else
66 - page.replaceOrRemoveKey("/Rotate",makeRotate(ROT_0));
67 + page.replaceKey("/Rotate",makeRotate(ROT_0));
68
69 PageRect currpage= getBoxAsRect(getTrimBox(page));
70 double width = currpage.right-currpage.left;
71 @@ -242,7 +242,7 @@
72 //Cropping.
73 // TODO: Borders are covered by the image. buffer space?
74 page.replaceKey("/TrimBox",makeBox(currpage.left,currpage.bottom,currpage.right,currpage.top));
75 - page.replaceOrRemoveKey("/Rotate",makeRotate(save_rotate));
76 + page.replaceKey("/Rotate",makeRotate(save_rotate));
77 return getRotate(page);
78 }
79
80 @@ -251,14 +251,14 @@
81 page.assertInitialized();
82 Rotation save_rotate = getRotate(page);
83 if(orientation==ROT_0||orientation==ROT_180)
84 - page.replaceOrRemoveKey("/Rotate",makeRotate(ROT_90));
85 + page.replaceKey("/Rotate",makeRotate(ROT_90));
86 else
87 - page.replaceOrRemoveKey("/Rotate",makeRotate(ROT_0));
88 + page.replaceKey("/Rotate",makeRotate(ROT_0));
89
90 PageRect currpage= getBoxAsRect(getTrimBox(page));
91 double width = currpage.right-currpage.left;
92 double height = currpage.top-currpage.bottom;
93 - page.replaceOrRemoveKey("/Rotate",makeRotate(save_rotate));
94 + page.replaceKey("/Rotate",makeRotate(save_rotate));
95 if(width>height)
96 return true;
97 return false;
98 @@ -662,7 +662,7 @@
99 // TODO? other rotation direction, e.g. if (src_rot==ROT_0)&&(param.orientation==ROT_270) ... etc.
100 // rotation=ROT_270;
101
102 - page.replaceOrRemoveKey("/Rotate",makeRotate(src_rot+rotation));
103 + page.replaceKey("/Rotate",makeRotate(src_rot+rotation));
104 }
105 }
106 }