Commit a600c643 authored by Patrick Storz's avatar Patrick Storz 🦄

Fix compilation with poppler 0.64

parent e254e5c6
Pipeline #21027829 (#) passed with stages
in 96 minutes and 49 seconds
......@@ -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
......
......@@ -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);
......
......@@ -1021,7 +1021,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";
}
......@@ -1362,7 +1362,7 @@ void SvgBuilder::_flushText() {
_glyphs.clear();
}
void SvgBuilder::beginString(GfxState *state, GooString * /*s*/) {
void SvgBuilder::beginString(GfxState *state) {
if (_need_font_update) {
updateFont(state);
}
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment