]> git.pld-linux.org Git - packages/inkscape.git/blob - inkscape-poppler.patch
d48380cf7b714e03c27732013d472234518e5fb6
[packages/inkscape.git] / inkscape-poppler.patch
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
5
6 (cherry picked from commit a600c6438fef2f4c06f9a4a7d933d99fb054a973)
7
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*/)
13    }
14  }
15  
16 -void PdfParser::doShowText(GooString *s) {
17 +void PdfParser::doShowText(const GooString *s) {
18    GfxFont *font;
19    int wMode;
20    double riseX, riseY;
21 @@ -2601,7 +2601,7 @@ void PdfParser::doShowText(GooString *s) {
22    font = state->getFont();
23    wMode = font->getWMode();
24  
25 -  builder->beginString(state, s);
26 +  builder->beginString(state);
27  
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();
33      oldParser = parser;
34 -    p = s->getCString();
35 +    p = g_strdup(s->getCString());
36      len = s->getLength();
37      while (len > 0) {
38        n = font->getNextChar(p, len, &code,
39 @@ -2686,7 +2686,7 @@ void PdfParser::doShowText(GooString *s) {
40  
41    } else {
42      state->textTransformDelta(0, state->getRise(), &riseX, &riseY);
43 -    p = s->getCString();
44 +    p = g_strdup(s->getCString());
45      len = s->getLength();
46      while (len > 0) {
47        n = font->getNextChar(p, len, &code,
48 @@ -2732,7 +2732,7 @@ void PdfParser::opXObject(Object args[], int /*numArgs*/)
49  {
50    Object obj1, obj2, obj3, refObj;
51  
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()) {
56  #else
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);
67  
68    // XObject operators
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());
80      } else {
81          _font_specification = (char*) "Arial";
82      }
83 @@ -1361,7 +1361,7 @@ void SvgBuilder::_flushText() {
84      _glyphs.clear();
85  }
86  
87 -void SvgBuilder::beginString(GfxState *state, GooString * /*s*/) {
88 +void SvgBuilder::beginString(GfxState *state) {
89      if (_need_font_update) {
90          updateFont(state);
91      }
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>
98  
99  #include "CharTypes.h"
100 -class GooString;
101  class Function;
102  class GfxState;
103  struct GfxColor;
104 @@ -136,7 +135,7 @@ public:
105      void clearSoftMask(GfxState *state);
106  
107      // Text handling
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,
113 -- 
114 cgit v0.10.2
115
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
120
121 replace unused includes with one that is actually used
122
123 Signed-off-by: Jan Palus <atler@pld-linux.org>
124 ---
125  src/extension/internal/pdfinput/pdf-parser.cpp | 3 +--
126  1 file changed, 1 insertion(+), 2 deletions(-)
127
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"
134  
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"
141  #include "Object.h"
142 -- 
143 2.17.0
144
This page took 0.036499 seconds and 2 git commands to generate.