91 lines
3.8 KiB
Diff
91 lines
3.8 KiB
Diff
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
|
|
Date: 2019-12-03
|
|
Initial Package Version: 0.92.4
|
|
Upstream Status: Applied, commit 51351358a62a
|
|
Origin: Jan Tojnar
|
|
Description: Fixes for poppler-0.83.0.
|
|
|
|
To fix earlier changes made for poppler 0.82.0 without pulling
|
|
in a load of other things, this also needs a sed found at Arch:
|
|
|
|
sed -e 's|Unicode \*u|Unicode const *u|g' -i src/extension/internal/pdfinput/*
|
|
|
|
diff -Naur a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
|
|
--- a/src/extension/internal/pdfinput/pdf-input.cpp 2019-01-15 04:29:27.000000000 +0000
|
|
+++ b/src/extension/internal/pdfinput/pdf-input.cpp 2019-12-03 13:24:09.800623725 +0000
|
|
@@ -689,12 +689,12 @@
|
|
//
|
|
gchar const *poppler_datadir = g_getenv("POPPLER_DATADIR");
|
|
if (poppler_datadir != NULL) {
|
|
- globalParams = new GlobalParams(poppler_datadir);
|
|
+ globalParams = _POPPLER_NEW_GLOBAL_PARAMS(poppler_datadir);
|
|
} else {
|
|
- globalParams = new GlobalParams();
|
|
+ globalParams = _POPPLER_NEW_GLOBAL_PARAMS();
|
|
}
|
|
#else
|
|
- globalParams = new GlobalParams();
|
|
+ globalParams = _POPPLER_NEW_GLOBAL_PARAMS();
|
|
#endif // ENABLE_OSX_APP_LOCATIONS
|
|
}
|
|
|
|
diff -Naur a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
|
|
--- a/src/extension/internal/pdfinput/pdf-parser.cpp 2019-01-15 04:29:27.000000000 +0000
|
|
+++ b/src/extension/internal/pdfinput/pdf-parser.cpp 2019-12-03 13:25:45.431129854 +0000
|
|
@@ -272,7 +272,7 @@
|
|
ClipHistoryEntry *save();
|
|
ClipHistoryEntry *restore();
|
|
GBool hasSaves() { return saved != NULL; }
|
|
- void setClip(GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
|
|
+ void setClip(_POPPLER_CONST_83 GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
|
|
GfxPath *getClipPath() { return clipPath; }
|
|
GfxClipType getClipType() { return clipType; }
|
|
|
|
@@ -3394,7 +3394,7 @@
|
|
}
|
|
}
|
|
|
|
-void ClipHistoryEntry::setClip(GfxPath *clipPathA, GfxClipType clipTypeA) {
|
|
+void ClipHistoryEntry::setClip(_POPPLER_CONST_83 GfxPath *clipPathA, GfxClipType clipTypeA) {
|
|
// Free previous clip path
|
|
if (clipPath) {
|
|
delete clipPath;
|
|
diff -Naur a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
|
|
--- a/src/extension/internal/pdfinput/poppler-transition-api.h 2019-01-15 04:29:27.000000000 +0000
|
|
+++ b/src/extension/internal/pdfinput/poppler-transition-api.h 2019-12-03 13:29:10.319199158 +0000
|
|
@@ -3,6 +3,18 @@
|
|
|
|
#include <glib/poppler-features.h>
|
|
|
|
+#if POPPLER_CHECK_VERSION(0, 83, 0)
|
|
+#define _POPPLER_CONST_83 const
|
|
+#else
|
|
+#define _POPPLER_CONST_83
|
|
+#endif
|
|
+
|
|
+#if POPPLER_CHECK_VERSION(0, 83, 0)
|
|
+#define _POPPLER_NEW_GLOBAL_PARAMS(args...) std::unique_ptr<GlobalParams>(new GlobalParams(args))
|
|
+#else
|
|
+#define _POPPLER_NEW_GLOBAL_PARAMS(args...) new GlobalParams(args)
|
|
+#endif
|
|
+
|
|
#if POPPLER_CHECK_VERSION(0, 72, 0)
|
|
#define getCString c_str
|
|
#endif
|
|
diff -Naur a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
|
|
--- a/src/extension/internal/pdfinput/svg-builder.cpp 2019-01-15 04:29:27.000000000 +0000
|
|
+++ b/src/extension/internal/pdfinput/svg-builder.cpp 2019-12-03 13:24:09.801623720 +0000
|
|
@@ -264,10 +264,10 @@
|
|
/**
|
|
* \brief Generates a SVG path string from poppler's data structure
|
|
*/
|
|
-static gchar *svgInterpretPath(GfxPath *path) {
|
|
+static gchar *svgInterpretPath(_POPPLER_CONST_83 GfxPath *path) {
|
|
Inkscape::SVG::PathString pathString;
|
|
for (int i = 0 ; i < path->getNumSubpaths() ; ++i ) {
|
|
- GfxSubpath *subpath = path->getSubpath(i);
|
|
+ _POPPLER_CONST_83 GfxSubpath *subpath = path->getSubpath(i);
|
|
if (subpath->getNumPoints() > 0) {
|
|
pathString.moveTo(subpath->getX(0), subpath->getY(0));
|
|
int j = 1;
|