1 From f0697de012598ea84edafea9a326e5e101eccd2a Mon Sep 17 00:00:00 2001
2 From: Eduard Braun <eduard.braun2@gmx.de>
3 Date: Tue, 24 Apr 2018 19:18:26 +0200
4 Subject: Fix compilation with poppler 0.64
6 (cherry picked from commit a600c6438fef2f4c06f9a4a7d933d99fb054a973)
8 diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
9 index 604b7f8..721524e 100644
10 --- a/src/extension/internal/pdfinput/pdf-parser.cpp
11 +++ b/src/extension/internal/pdfinput/pdf-parser.cpp
12 @@ -2582,7 +2582,7 @@ void PdfParser::opShowSpaceText(Object args[], int /*numArgs*/)
16 -void PdfParser::doShowText(GooString *s) {
17 +void PdfParser::doShowText(const GooString *s) {
21 @@ -2601,7 +2601,7 @@ void PdfParser::doShowText(GooString *s) {
22 font = state->getFont();
23 wMode = font->getWMode();
25 - builder->beginString(state, s);
26 + builder->beginString(state);
28 // handle a Type 3 char
29 if (font->getType() == fontType3 && 0) {//out->interpretType3Chars()) {
30 @@ -2631,7 +2631,7 @@ void PdfParser::doShowText(GooString *s) {
31 double lineX = state->getLineX();
32 double lineY = state->getLineY();
34 - p = s->getCString();
35 + p = g_strdup(s->getCString());
38 n = font->getNextChar(p, len, &code,
39 @@ -2686,7 +2686,7 @@ void PdfParser::doShowText(GooString *s) {
42 state->textTransformDelta(0, state->getRise(), &riseX, &riseY);
43 - p = s->getCString();
44 + p = g_strdup(s->getCString());
47 n = font->getNextChar(p, len, &code,
48 @@ -2732,7 +2732,7 @@ void PdfParser::opXObject(Object args[], int /*numArgs*/)
50 Object obj1, obj2, obj3, refObj;
52 - char *name = args[0].getName();
53 + char *name = g_strdup(args[0].getName());
54 #if defined(POPPLER_NEW_OBJECT_API)
55 if ((obj1 = res->lookupXObject(name)).isNull()) {
57 diff --git a/src/extension/internal/pdfinput/pdf-parser.h b/src/extension/internal/pdfinput/pdf-parser.h
58 index e28fecc..f985b15 100644
59 --- a/src/extension/internal/pdfinput/pdf-parser.h
60 +++ b/src/extension/internal/pdfinput/pdf-parser.h
61 @@ -287,7 +287,7 @@ private:
62 void opMoveShowText(Object args[], int numArgs);
63 void opMoveSetShowText(Object args[], int numArgs);
64 void opShowSpaceText(Object args[], int numArgs);
65 - void doShowText(GooString *s);
66 + void doShowText(const GooString *s);
69 void opXObject(Object args[], int numArgs);
70 diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
71 index a448be6..6178619 100644
72 --- a/src/extension/internal/pdfinput/svg-builder.cpp
73 +++ b/src/extension/internal/pdfinput/svg-builder.cpp
74 @@ -1020,7 +1020,7 @@ void SvgBuilder::updateFont(GfxState *state) {
75 GfxFont *font = state->getFont();
76 // Store original name
77 if (font->getName()) {
78 - _font_specification = font->getName()->getCString();
79 + _font_specification = g_strdup(font->getName()->getCString());
81 _font_specification = (char*) "Arial";
83 @@ -1361,7 +1361,7 @@ void SvgBuilder::_flushText() {
87 -void SvgBuilder::beginString(GfxState *state, GooString * /*s*/) {
88 +void SvgBuilder::beginString(GfxState *state) {
89 if (_need_font_update) {
92 diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h
93 index ad15c9c..ed2a4d4 100644
94 --- a/src/extension/internal/pdfinput/svg-builder.h
95 +++ b/src/extension/internal/pdfinput/svg-builder.h
96 @@ -29,7 +29,6 @@ namespace Inkscape {
97 #include <glibmm/ustring.h>
99 #include "CharTypes.h"
104 @@ -136,7 +135,7 @@ public:
105 void clearSoftMask(GfxState *state);
108 - void beginString(GfxState *state, GooString *s);
109 + void beginString(GfxState *state);
110 void endString(GfxState *state);
111 void addChar(GfxState *state, double x, double y,
112 double dx, double dy,
116 From 332a80f4847715546be9a00756f693b4aa1316e2 Mon Sep 17 00:00:00 2001
117 From: Jan Palus <atler@pld-linux.org>
118 Date: Fri, 25 May 2018 00:30:17 +0200
119 Subject: [PATCH] Fix compilation with poppler 0.65.0
121 replace unused includes with one that is actually used
123 Signed-off-by: Jan Palus <atler@pld-linux.org>
125 src/extension/internal/pdfinput/pdf-parser.cpp | 3 +--
126 1 file changed, 1 insertion(+), 2 deletions(-)
128 diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
129 index 6c498f9..caaeca1 100644
130 --- a/src/extension/internal/pdfinput/pdf-parser.cpp
131 +++ b/src/extension/internal/pdfinput/pdf-parser.cpp
132 @@ -37,8 +37,7 @@ extern "C" {
133 #include "util/units.h"
135 #include "goo/gmem.h"
136 -#include "goo/GooTimer.h"
137 -#include "goo/GooHash.h"
138 +#include "goo/GooString.h"
139 #include "GlobalParams.h"
140 #include "CharTypes.h"