View | Details | Raw Unified | Return to bug 243433
Collapse All | Expand All

(-)b/converters/pdf2djvu/files/patch-pdf-backend.cc (+26 lines)
Added Link Here
1
--- pdf-backend.cc.orig	2019-06-10 17:06:44 UTC
2
+++ pdf-backend.cc
3
@@ -103,7 +103,7 @@ static void poppler_error_handler(void *data, ErrorCat
4
 
5
 pdf::Environment::Environment()
6
 {
7
-  globalParams = new GlobalParams();
8
+  globalParams = std::unique_ptr<GlobalParams>(new GlobalParams);
9
   setErrorCallback(poppler_error_handler, nullptr);
10
 }
11
 
12
@@ -499,12 +499,11 @@ bool pdf::get_glyph(splash::Splash *splash, splash::Fo
13
 void pdf::Renderer::convert_path(pdf::gfx::State *state, splash::Path &splash_path)
14
 {
15
   /* Source was copied from <poppler/SplashOutputDev.c>. */
16
-  pdf::gfx::Subpath *subpath;
17
-  pdf::gfx::Path *path = state->getPath();
18
+  auto path = state->getPath();
19
   int n_subpaths = path->getNumSubpaths();
20
   for (int i = 0; i < n_subpaths; i++)
21
   {
22
-    subpath = path->getSubpath(i);
23
+    auto subpath = path->getSubpath(i);
24
     if (subpath->getNumPoints() > 0)
25
     {
26
       double x1, y1, x2, y2, x3, y3;
(-)b/editors/calligra/files/patch-kde_pr-414795 (+69 lines)
Added Link Here
1
Source: Timo Gurr <timo.gurr@gmail.com>
2
Upstream: Reported, https://bugs.kde.org/show_bug.cgi?id=414795
3
Reason: Fix build with poppler 0.83.0
4
5
diff -Naur calligra-3.1.0/filters/karbon/pdf/PdfImport.cpp calligra-3.1.0.new/filters/karbon/pdf/PdfImport.cpp
6
--- filters/karbon/pdf/PdfImport.cpp	2019-12-04 12:41:13.000000000 +0100
7
+++ filters/karbon/pdf/PdfImport.cpp	2019-12-04 12:39:03.000000000 +0100
8
@@ -60,19 +60,17 @@
9
     }
10
 
11
     // read config file
12
-    globalParams = new GlobalParams();
13
+    globalParams.reset(new GlobalParams());
14
     if (! globalParams)
15
         return KoFilter::NotImplemented;
16
 
17
     GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data());
18
     PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0);
19
     if (! pdfDoc) {
20
-        delete globalParams;
21
         return KoFilter::StupidError;
22
     }
23
 
24
     if (! pdfDoc->isOk()) {
25
-        delete globalParams;
26
         delete pdfDoc;
27
         return KoFilter::StupidError;
28
     }
29
@@ -99,7 +97,6 @@
30
 
31
     delete dev;
32
     delete pdfDoc;
33
-    delete globalParams;
34
     globalParams = 0;
35
 
36
     return KoFilter::OK;
37
diff -Naur calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.cpp calligra-3.1.0.new/filters/karbon/pdf/SvgOutputDev.cpp
38
--- filters/karbon/pdf/SvgOutputDev.cpp	2019-12-04 12:41:14.000000000 +0100
39
+++ filters/karbon/pdf/SvgOutputDev.cpp	2019-12-04 12:35:30.000000000 +0100
40
@@ -172,7 +172,7 @@
41
     *d->body << "/>" << endl;
42
 }
43
 
44
-QString SvgOutputDev::convertPath(GfxPath *path)
45
+QString SvgOutputDev::convertPath(const GfxPath *path)
46
 {
47
     if (! path)
48
         return QString();
49
@@ -180,7 +180,7 @@
50
     QString output;
51
 
52
     for (int i = 0; i < path->getNumSubpaths(); ++i) {
53
-        GfxSubpath * subpath = path->getSubpath(i);
54
+        const GfxSubpath * subpath = path->getSubpath(i);
55
         if (subpath->getNumPoints() > 0) {
56
             output += QString("M%1 %2").arg(subpath->getX(0)).arg(subpath->getY(0));
57
             int j = 1;
58
diff -Naur calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.h calligra-3.1.0.new/filters/karbon/pdf/SvgOutputDev.h
59
--- filters/karbon/pdf/SvgOutputDev.h	2019-12-04 12:41:14.000000000 +0100
60
+++ filters/karbon/pdf/SvgOutputDev.h	2019-12-04 12:30:41.000000000 +0100
61
@@ -83,7 +83,7 @@
62
     /// Dumps content to svg file
63
     void dumpContent();
64
 private:
65
-    QString convertPath(GfxPath *path);
66
+    QString convertPath(const GfxPath *path);
67
     QString convertMatrix(const QMatrix &matrix);
68
     QString convertMatrix(const double * matrix);
69
     QString printFill();
(-)b/editors/libreoffice/files/patch-git_9065cd8d-poppler-0.83 (+70 lines)
Added Link Here
1
From 9065cd8d9a19864f6b618f2dc10daf577badd9ee Mon Sep 17 00:00:00 2001
2
From: Martin Milata <martin@martinmilata.cz>
3
Date: Wed, 4 Dec 2019 02:37:40 +0100
4
Subject: [PATCH] Fix build with poppler-0.83
5
6
Change-Id: I7a3684932b8f9c403a3368b42fa4d8039c67f1a9
7
Reviewed-on: https://gerrit.libreoffice.org/84384
8
Tested-by: Jenkins
9
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
10
---
11
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 7 +++++++
12
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++
13
 sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx    | 4 ++++
14
 3 files changed, 15 insertions(+)
15
16
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
17
index 26048177e87d..e9c2a407c279 100644
18
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
19
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
20
@@ -491,11 +491,18 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
21
     gfree(pBuf);
22
 }
23
 
24
+#if POPPLER_CHECK_VERSION(0, 83, 0)
25
+void PDFOutDev::printPath( const GfxPath* pPath )
26
+#else
27
 void PDFOutDev::printPath( GfxPath* pPath )
28
+#endif
29
 {
30
     int nSubPaths = pPath ? pPath->getNumSubpaths() : 0;
31
     for( int i=0; i<nSubPaths; i++ )
32
     {
33
+#if POPPLER_CHECK_VERSION(0, 83, 0)
34
+        const
35
+#endif
36
         GfxSubpath* pSub  = pPath->getSubpath( i );
37
         const int nPoints = pSub->getNumPoints();
38
 
39
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
40
index 02f6b59f6f15..2e7d2186f9a1 100644
41
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
42
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
43
@@ -149,7 +149,11 @@ namespace pdfi
44
 
45
         int  parseFont( long long nNewId, GfxFont* pFont, GfxState* state ) const;
46
         void writeFontFile( GfxFont* gfxFont ) const;
47
+#if POPPLER_CHECK_VERSION(0, 83, 0)
48
+        static void printPath( const GfxPath* pPath );
49
+#else
50
         static void printPath( GfxPath* pPath );
51
+#endif
52
 
53
     public:
54
         explicit PDFOutDev( PDFDoc* pDoc );
55
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
56
index 42178b650cdd..b1a54bd09c5f 100644
57
--- sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
58
+++ sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
59
@@ -68,7 +68,11 @@ int main(int argc, char **argv)
60
     }
61
 
62
     // read config file
63
+#if POPPLER_CHECK_VERSION(0, 83, 0)
64
+    globalParams = std::make_unique<GlobalParams>();
65
+#else
66
     globalParams = new GlobalParams();
67
+#endif
68
     globalParams->setErrQuiet(true);
69
 #if defined(_MSC_VER)
70
     globalParams->setupBaseFonts(nullptr);
(-)b/graphics/inkscape/Makefile (+6 lines)
Lines 94-98 post-patch: Link Here
94
	# Fix with poppler 0.73
94
	# Fix with poppler 0.73
95
	@${REINPLACE_CMD} -E '/#include "goo\/gtypes.h"/d' \
95
	@${REINPLACE_CMD} -E '/#include "goo\/gtypes.h"/d' \
96
		${WRKSRC}/src/extension/internal/pdfinput/pdf-parser.h
96
		${WRKSRC}/src/extension/internal/pdfinput/pdf-parser.h
97
	# Fix build with poppler 0.83
98
	${REINPLACE_CMD} -e 's|(GfxPath|(const GfxPath|g' \
99
			  -e 's|GfxSubpath|const GfxSubpath|g' \
100
			  -e 's|new GlobalParams()|std::unique_ptr<GlobalParams>(new GlobalParams())|g' \
101
			  -e 's|new GlobalParams(poppler_datadir)|std::unique_ptr<GlobalParams>(new GlobalParams(poppler_datadir))|g' \
102
		${WRKSRC}/src/extension/internal/pdfinput/*.cpp
97
103
98
.include <bsd.port.mk>
104
.include <bsd.port.mk>
(-)b/graphics/openfx-arena/files/patch-Extra_ReadPDF.cpp (+13 lines)
Added Link Here
1
Fix build with poppler 0.83
2
3
--- Extra/ReadPDF.cpp.orig	2020-01-18 15:54:18 UTC
4
+++ Extra/ReadPDF.cpp
5
@@ -134,7 +134,7 @@ false
6
     if (!popplerData.empty()) {
7
         struct stat sb;
8
         if (stat(popplerData.c_str(), &sb) == 0 && S_ISDIR(sb.st_mode)) {
9
-            globalParams = new GlobalParams(popplerData.c_str());
10
+            globalParams = std::unique_ptr<GlobalParams>(new GlobalParams(popplerData.c_str()));
11
         }
12
     }
13
 }
(-)b/graphics/poppler-glib/Makefile (-1 / +1 lines)
Lines 1-7 Link Here
1
# Created by: Michael Johnson <ahze@FreeBSD.org>
1
# Created by: Michael Johnson <ahze@FreeBSD.org>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTREVISION=	2
4
PORTREVISION=	0
5
5
6
COMMENT=	GLib bindings to poppler
6
COMMENT=	GLib bindings to poppler
7
7
(-)b/graphics/poppler-qt5/Makefile (-1 / +1 lines)
Lines 1-6 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTREVISION=	2
3
PORTREVISION=	0
4
PKGNAMESUFFIX=	-qt5
4
PKGNAMESUFFIX=	-qt5
5
5
6
COMMENT=	Qt 5 bindings to poppler
6
COMMENT=	Qt 5 bindings to poppler
(-)b/graphics/poppler-utils/Makefile (-1 / +1 lines)
Lines 1-7 Link Here
1
# Created by: Michael Nottebrock <lofi@FreeBSD.org>
1
# Created by: Michael Nottebrock <lofi@FreeBSD.org>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTREVISION=	3
4
PORTREVISION=	0
5
5
6
COMMENT=	Poppler's xpdf-workalike command line utilities # '
6
COMMENT=	Poppler's xpdf-workalike command line utilities # '
7
7
(-)b/graphics/poppler/Makefile (-2 / +2 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	poppler
4
PORTNAME=	poppler
5
DISTVERSION=	0.82.0
5
DISTVERSION=	0.84.0
6
PORTREVISION?=	1
6
PORTREVISION?=	0
7
CATEGORIES=	graphics print
7
CATEGORIES=	graphics print
8
MASTER_SITES=	https://poppler.freedesktop.org/
8
MASTER_SITES=	https://poppler.freedesktop.org/
9
9
(-)b/graphics/poppler/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1572047126
1
TIMESTAMP = 1577727452
2
SHA256 (poppler-0.82.0.tar.xz) = 234f8e573ea57fb6a008e7c1e56bfae1af5d1adf0e65f47555e1ae103874e4df
2
SHA256 (poppler-0.84.0.tar.xz) = c7a130da743b38a548f7a21fe5940506fb1949f4ebdd3209f0e5b302fa139731
3
SIZE (poppler-0.82.0.tar.xz) = 1553336
3
SIZE (poppler-0.84.0.tar.xz) = 1561236
(-)a/graphics/poppler/files/patch-CMakeLists.txt (-10 lines)
Removed Link Here
1
--- CMakeLists.txt.orig	2018-10-07 08:06:59 UTC
2
+++ CMakeLists.txt
3
@@ -263,6 +263,7 @@ endif()
4
 
5
 if (NSS3_FOUND)
6
   add_definitions(${NSS3_CFLAGS})
7
+  link_directories(${NSS3_LIBRARY_DIRS})
8
   set(ENABLE_NSS3 ON)
9
 endif()
10
 if(JPEG_FOUND)
(-)b/graphics/poppler/pkg-plist (-2 / +2 lines)
Lines 135-142 lib/libpoppler-cpp.so Link Here
135
lib/libpoppler-cpp.so.0
135
lib/libpoppler-cpp.so.0
136
lib/libpoppler-cpp.so.0.7.0
136
lib/libpoppler-cpp.so.0.7.0
137
lib/libpoppler.so
137
lib/libpoppler.so
138
lib/libpoppler.so.92
138
lib/libpoppler.so.94
139
lib/libpoppler.so.92.0.0
139
lib/libpoppler.so.94.0.0
140
libdata/pkgconfig/poppler-cairo.pc
140
libdata/pkgconfig/poppler-cairo.pc
141
libdata/pkgconfig/poppler-cpp.pc
141
libdata/pkgconfig/poppler-cpp.pc
142
libdata/pkgconfig/poppler-splash.pc
142
libdata/pkgconfig/poppler-splash.pc
(-)b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_importpdf.cpp (+65 lines)
Added Link Here
1
--- scribus/plugins/import/pdf/importpdf.cpp.orig	2020-01-18 17:59:00 UTC
2
+++ scribus/plugins/import/pdf/importpdf.cpp
3
@@ -75,7 +75,7 @@ PdfPlug::PdfPlug(ScribusDoc* doc, int flags)
4
 QImage PdfPlug::readThumbnail(const QString& fName)
5
 {
6
 	QString pdfFile = QDir::toNativeSeparators(fName);
7
-	globalParams = new GlobalParams();
8
+	globalParams.reset(new GlobalParams());
9
 	if (globalParams)
10
 	{
11
 #if defined(Q_OS_WIN32) && POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 62, 0)
12
@@ -90,7 +90,6 @@ QImage PdfPlug::readThumbnail(const QString& fName)
13
 			if (pdfDoc->getErrorCode() == errEncrypted)
14
 			{
15
 				delete pdfDoc;
16
-				delete globalParams;
17
 				return QImage();
18
 			}
19
 			if (pdfDoc->isOk())
20
@@ -134,11 +133,9 @@ QImage PdfPlug::readThumbnail(const QString& fName)
21
 				image.setText("YSize", QString("%1").arg(h));
22
 				delete dev;
23
 				delete pdfDoc;
24
-				delete globalParams;
25
 				return image;
26
 			}
27
 			delete pdfDoc;
28
-			delete globalParams;
29
 		}
30
 	}
31
 	return QImage();
32
@@ -387,7 +384,7 @@ bool PdfPlug::convert(const QString& fn)
33
 		qApp->processEvents();
34
 	}
35
 
36
-	globalParams = new GlobalParams();
37
+	globalParams.reset(new GlobalParams());
38
 	GooString *userPW = nullptr;
39
 	if (globalParams)
40
 	{
41
@@ -429,7 +426,6 @@ bool PdfPlug::convert(const QString& fn)
42
 					if (progressDialog)
43
 						progressDialog->close();
44
 					delete pdfDoc;
45
-					delete globalParams;
46
 					return false;
47
 				}
48
 				if (progressDialog)
49
@@ -474,7 +470,6 @@ bool PdfPlug::convert(const QString& fn)
50
 							progressDialog->close();
51
 						delete optImp;
52
 						delete pdfDoc;
53
-						delete globalParams;
54
 						return false;
55
 					}
56
 					pageString = optImp->getPagesString();
57
@@ -908,7 +903,7 @@ bool PdfPlug::convert(const QString& fn)
58
 		}
59
 		delete pdfDoc;
60
 	}
61
-	delete globalParams;
62
+	globalParams.release();
63
 	globalParams = nullptr;
64
 
65
 //	qDebug() << "converting finished";
(-)b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.cpp (-4 / +40 lines)
Lines 1-6 Link Here
1
--- scribus/plugins/import/pdf/slaoutput.cpp.orig	2019-10-27 16:14:24 UTC
1
--- scribus/plugins/import/pdf/slaoutput.cpp.orig	2020-01-18 17:22:17 UTC
2
+++ scribus/plugins/import/pdf/slaoutput.cpp
2
+++ scribus/plugins/import/pdf/slaoutput.cpp
3
@@ -2784,7 +2784,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob
3
@@ -1224,16 +1224,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, 
4
 	catalog = catA;
5
 	pdfDoc = doc;
6
 	updateGUICounter = 0;
7
-	m_fontEngine = new SplashFontEngine(
8
-#if HAVE_T1LIB_H
9
-	globalParams->getEnableT1lib(),
10
-#endif
11
-#if HAVE_FREETYPE_H
12
-	globalParams->getEnableFreeType(),
13
-	true,
14
-	true,
15
-#endif
16
-	true);
17
+	m_fontEngine = new SplashFontEngine(true, true, true, true);
18
 }
19
 
20
 void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *)
21
@@ -2784,7 +2775,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Ob
4
 	delete[] mbuffer;
22
 	delete[] mbuffer;
5
 }
23
 }
6
 
24
 
Lines 9-15 Link Here
9
 {
27
 {
10
 	ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
28
 	ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
11
 //	qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors;
29
 //	qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors;
12
@@ -3365,7 +3365,7 @@ err1:
30
@@ -3365,7 +3356,7 @@ err1:
13
 		fontsrc->unref();
31
 		fontsrc->unref();
14
 }
32
 }
15
 
33
 
Lines 18-24 Link Here
18
 {
36
 {
19
 	double x1, y1, x2, y2;
37
 	double x1, y1, x2, y2;
20
 	int render;
38
 	int render;
21
@@ -3452,7 +3452,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x,
39
@@ -3452,7 +3443,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x,
22
 	}
40
 	}
23
 }
41
 }
24
 
42
 
Lines 27-29 Link Here
27
 {
45
 {
28
 //	qDebug() << "beginType3Char";
46
 //	qDebug() << "beginType3Char";
29
 	GfxFont *gfxFont;
47
 	GfxFont *gfxFont;
48
@@ -3705,7 +3696,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotCo
49
 	return fNam;
50
 }
51
 
52
-QString SlaOutputDev::convertPath(GfxPath *path)
53
+QString SlaOutputDev::convertPath(const GfxPath *path)
54
 {
55
 	if (! path)
56
 		return QString();
57
@@ -3715,7 +3706,7 @@ QString SlaOutputDev::convertPath(GfxPath *path)
58
 
59
 	for (int i = 0; i < path->getNumSubpaths(); ++i)
60
 	{
61
-		GfxSubpath * subpath = path->getSubpath(i);
62
+		const GfxSubpath * subpath = path->getSubpath(i);
63
 		if (subpath->getNumPoints() > 0)
64
 		{
65
 			output += QString("M %1 %2").arg(subpath->getX(0)).arg(subpath->getY(0));
(-)b/print/scribus-devel/files/patch-scribus_plugins_import_pdf_slaoutput.h (-1 / +10 lines)
Lines 1-4 Link Here
1
--- scribus/plugins/import/pdf/slaoutput.h.orig	2019-10-27 16:12:47 UTC
1
--- scribus/plugins/import/pdf/slaoutput.h.orig	2020-01-18 17:22:17 UTC
2
+++ scribus/plugins/import/pdf/slaoutput.h
2
+++ scribus/plugins/import/pdf/slaoutput.h
3
@@ -229,7 +229,7 @@ class SlaOutputDev : public OutputDev (public)
3
@@ -229,7 +229,7 @@ class SlaOutputDev : public OutputDev (public)
4
 
4
 
Lines 20-22 Link Here
20
 	void  endType3Char(GfxState * /*state*/) override;
20
 	void  endType3Char(GfxState * /*state*/) override;
21
 	void  type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override;
21
 	void  type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override;
22
 	void  type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override;
22
 	void  type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override;
23
@@ -282,7 +282,7 @@ class SlaOutputDev : public OutputDev (public)
24
 	void getPenState(GfxState *state);
25
 	QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor *color, int *shade);
26
 	QString getAnnotationColor(const AnnotColor *color);
27
-	QString convertPath(GfxPath *path);
28
+	QString convertPath(const GfxPath *path);
29
 	int getBlendMode(GfxState *state);
30
 	void applyMask(PageItem *ite);
31
 	void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);

Return to bug 243433