From 324c7903d9fd62e74c042c31477299be3b980fd2 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Sat, 26 Oct 2019 14:39:31 +0200 Subject: [PATCH] fix poppler 0.82.0 build --- src/extension/internal/pdfinput/pdf-parser.cpp | 2 +- src/extension/internal/pdfinput/poppler-transition-api.h | 6 ++++++ src/extension/internal/pdfinput/svg-builder.cpp | 2 +- src/extension/internal/pdfinput/svg-builder.h | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp index 4f798e35bf..4eae275757 100644 --- a/src/extension/internal/pdfinput/pdf-parser.cpp +++ b/src/extension/internal/pdfinput/pdf-parser.cpp @@ -2405,7 +2405,7 @@ void PdfParser::doShowText(GooString *s) { int wMode; double riseX, riseY; CharCode code; - Unicode *u = nullptr; + Unicode _POPPLER_CONST_82 *u = nullptr; double x, y, dx, dy, tdx, tdy; double originX, originY, tOriginX, tOriginY; double oldCTM[6], newCTM[6]; diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h index 5e8bc4ae90..01834007e8 100644 --- a/src/extension/internal/pdfinput/poppler-transition-api.h +++ b/src/extension/internal/pdfinput/poppler-transition-api.h @@ -14,6 +14,12 @@ #include +#if POPPLER_CHECK_VERSION(0, 82, 0) +#define _POPPLER_CONST_82 const +#else +#define _POPPLER_CONST_82 +#endif + #if POPPLER_CHECK_VERSION(0, 76, 0) #define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse) #else diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index 14727eba5f..a7134684a0 100644 --- a/src/extension/internal/pdfinput/svg-builder.cpp +++ b/src/extension/internal/pdfinput/svg-builder.cpp @@ -1395,7 +1395,7 @@ void SvgBuilder::beginString(GfxState *state) { void SvgBuilder::addChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, - CharCode /*code*/, int /*nBytes*/, Unicode *u, int uLen) { + CharCode /*code*/, int /*nBytes*/, Unicode const *u, int uLen) { bool is_space = ( uLen == 1 && u[0] == 32 ); diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h index c42d694dec..050465d4bf 100644 --- a/src/extension/internal/pdfinput/svg-builder.h +++ b/src/extension/internal/pdfinput/svg-builder.h @@ -142,7 +142,7 @@ public: void addChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, - CharCode code, int nBytes, Unicode *u, int uLen); + CharCode code, int nBytes, Unicode const *u, int uLen); void beginTextObject(GfxState *state); void endTextObject(GfxState *state); -- 2.22.0