Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inkscape: backport patches for poppler 0.65 compatibility
- Loading branch information
Showing
3 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
graphics/inkscape/files/10e8ae0ff522d3a9caeed9a7f137cdfd795ba0a3.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git src/extension/internal/pdfinput/pdf-parser.cpp src/extension/internal/pdfinput/pdf-parser.cpp | ||
index 721524e10afcb9979fbbab5292ac9f973f316412..a3aa3213a1c39df80f3e41e0932f4c7bfc683af7 100644 | ||
--- src/extension/internal/pdfinput/pdf-parser.cpp | ||
+++ src/extension/internal/pdfinput/pdf-parser.cpp | ||
@@ -37,8 +37,7 @@ extern "C" { | ||
#include "util/units.h" | ||
|
||
#include "goo/gmem.h" | ||
-#include "goo/GooTimer.h" | ||
-#include "goo/GooHash.h" | ||
+#include "goo/GooString.h" | ||
#include "GlobalParams.h" | ||
#include "CharTypes.h" | ||
#include "Object.h" |
105 changes: 105 additions & 0 deletions
105
graphics/inkscape/files/f0697de012598ea84edafea9a326e5e101eccd2a.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
diff --git src/extension/internal/pdfinput/pdf-parser.cpp src/extension/internal/pdfinput/pdf-parser.cpp | ||
index 604b7f80795ff10cce26b2581ba961f4dd4a0750..721524e10afcb9979fbbab5292ac9f973f316412 100644 | ||
--- src/extension/internal/pdfinput/pdf-parser.cpp | ||
+++ src/extension/internal/pdfinput/pdf-parser.cpp | ||
@@ -2582,7 +2582,7 @@ void PdfParser::opShowSpaceText(Object args[], int /*numArgs*/) | ||
} | ||
} | ||
|
||
-void PdfParser::doShowText(GooString *s) { | ||
+void PdfParser::doShowText(const GooString *s) { | ||
GfxFont *font; | ||
int wMode; | ||
double riseX, riseY; | ||
@@ -2601,7 +2601,7 @@ void PdfParser::doShowText(GooString *s) { | ||
font = state->getFont(); | ||
wMode = font->getWMode(); | ||
|
||
- builder->beginString(state, s); | ||
+ builder->beginString(state); | ||
|
||
// handle a Type 3 char | ||
if (font->getType() == fontType3 && 0) {//out->interpretType3Chars()) { | ||
@@ -2631,7 +2631,7 @@ void PdfParser::doShowText(GooString *s) { | ||
double lineX = state->getLineX(); | ||
double lineY = state->getLineY(); | ||
oldParser = parser; | ||
- p = s->getCString(); | ||
+ p = g_strdup(s->getCString()); | ||
len = s->getLength(); | ||
while (len > 0) { | ||
n = font->getNextChar(p, len, &code, | ||
@@ -2686,7 +2686,7 @@ void PdfParser::doShowText(GooString *s) { | ||
|
||
} else { | ||
state->textTransformDelta(0, state->getRise(), &riseX, &riseY); | ||
- p = s->getCString(); | ||
+ p = g_strdup(s->getCString()); | ||
len = s->getLength(); | ||
while (len > 0) { | ||
n = font->getNextChar(p, len, &code, | ||
@@ -2732,7 +2732,7 @@ void PdfParser::opXObject(Object args[], int /*numArgs*/) | ||
{ | ||
Object obj1, obj2, obj3, refObj; | ||
|
||
- char *name = args[0].getName(); | ||
+ char *name = g_strdup(args[0].getName()); | ||
#if defined(POPPLER_NEW_OBJECT_API) | ||
if ((obj1 = res->lookupXObject(name)).isNull()) { | ||
#else | ||
diff --git src/extension/internal/pdfinput/pdf-parser.h src/extension/internal/pdfinput/pdf-parser.h | ||
index e28fecc2e155af155d3e84205bb28d269cdda6be..f985b15cad7aa4354d0108127ecedaebb95ea540 100644 | ||
--- src/extension/internal/pdfinput/pdf-parser.h | ||
+++ src/extension/internal/pdfinput/pdf-parser.h | ||
@@ -287,7 +287,7 @@ private: | ||
void opMoveShowText(Object args[], int numArgs); | ||
void opMoveSetShowText(Object args[], int numArgs); | ||
void opShowSpaceText(Object args[], int numArgs); | ||
- void doShowText(GooString *s); | ||
+ void doShowText(const GooString *s); | ||
|
||
// XObject operators | ||
void opXObject(Object args[], int numArgs); | ||
diff --git src/extension/internal/pdfinput/svg-builder.cpp src/extension/internal/pdfinput/svg-builder.cpp | ||
index a448be639761b81a62aa5b95482f11e6c54045fd..617861928d964a66e88a43666905bab5c9e7ef10 100644 | ||
--- src/extension/internal/pdfinput/svg-builder.cpp | ||
+++ src/extension/internal/pdfinput/svg-builder.cpp | ||
@@ -1020,7 +1020,7 @@ void SvgBuilder::updateFont(GfxState *state) { | ||
GfxFont *font = state->getFont(); | ||
// Store original name | ||
if (font->getName()) { | ||
- _font_specification = font->getName()->getCString(); | ||
+ _font_specification = g_strdup(font->getName()->getCString()); | ||
} else { | ||
_font_specification = (char*) "Arial"; | ||
} | ||
@@ -1361,7 +1361,7 @@ void SvgBuilder::_flushText() { | ||
_glyphs.clear(); | ||
} | ||
|
||
-void SvgBuilder::beginString(GfxState *state, GooString * /*s*/) { | ||
+void SvgBuilder::beginString(GfxState *state) { | ||
if (_need_font_update) { | ||
updateFont(state); | ||
} | ||
diff --git src/extension/internal/pdfinput/svg-builder.h src/extension/internal/pdfinput/svg-builder.h | ||
index ad15c9c06fecba95ada6b7beb4184be2456a95a8..ed2a4d48e07b3ee4cd8a4b88c0ea4a685c2ff5b5 100644 | ||
--- src/extension/internal/pdfinput/svg-builder.h | ||
+++ src/extension/internal/pdfinput/svg-builder.h | ||
@@ -29,7 +29,6 @@ namespace Inkscape { | ||
#include <glibmm/ustring.h> | ||
|
||
#include "CharTypes.h" | ||
-class GooString; | ||
class Function; | ||
class GfxState; | ||
struct GfxColor; | ||
@@ -136,7 +135,7 @@ public: | ||
void clearSoftMask(GfxState *state); | ||
|
||
// Text handling | ||
- void beginString(GfxState *state, GooString *s); | ||
+ void beginString(GfxState *state); | ||
void endString(GfxState *state); | ||
void addChar(GfxState *state, double x, double y, | ||
double dx, double dy, |