b2a89be85a
- Update to version 1.1.2: + Dependencies updated, fixing bitmap exports + Graphic tablet pens erasors switch to the correct tool + Fix lost styling of text converted to path + Fix relative position of clones pasted to a new document + Fix various crashes - Drop ebc4de4bfe34d6c5f2e27da47f5d62e4de0394fd.patch: Fixed upstream. - Add Fix_build_poppler_22030.patch: Fix build with poppler 22.03.0 OBS-URL: https://build.opensuse.org/request/show/959288 OBS-URL: https://build.opensuse.org/package/show/graphics/inkscape?expand=0&rev=85
36 lines
1.8 KiB
Diff
36 lines
1.8 KiB
Diff
From 15ab83e02b07018c3ffd4952a2623393187659e0 Mon Sep 17 00:00:00 2001
|
|
From: Evangelos Foutras <evangelos@foutrelis.com>
|
|
Date: Wed, 2 Mar 2022 19:50:02 +0200
|
|
Subject: [PATCH] Fix build with poppler 22.03.0
|
|
|
|
PDFDoc's constructor now takes an std::unique_ptr as the filename and
|
|
the rest of the parameters are std::optional and can be left out.
|
|
|
|
Also, remove an obsolete comment regarding special handling on win32;
|
|
the "ifndef _WIN32" it was referring to has been removed by commit
|
|
ad8effaa6ec3 ("Fix PDF import with non-ASCII filename on Windows").
|
|
---
|
|
src/extension/internal/pdfinput/pdf-input.cpp | 8 +++++---
|
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
Index: inkscape-1.1.2_2022-02-04_0a00cf5339/src/extension/internal/pdfinput/pdf-input.cpp
|
|
===================================================================
|
|
--- inkscape-1.1.2_2022-02-04_0a00cf5339.orig/src/extension/internal/pdfinput/pdf-input.cpp
|
|
+++ inkscape-1.1.2_2022-02-04_0a00cf5339/src/extension/internal/pdfinput/pdf-input.cpp
|
|
@@ -666,10 +666,12 @@ PdfInput::open(::Inkscape::Extension::In
|
|
// PDFDoc is from poppler. PDFDoc is used for preview and for native import.
|
|
std::shared_ptr<PDFDoc> pdf_doc;
|
|
|
|
- // poppler does not use glib g_open. So on win32 we must use unicode call. code was copied from
|
|
- // glib gstdio.c
|
|
+#if POPPLER_CHECK_VERSION(22, 3, 0)
|
|
+ pdf_doc = std::make_shared<PDFDoc>(std::make_unique<GooString>(uri)); // TODO: Could ask for password
|
|
+#else
|
|
GooString *filename_goo = new GooString(uri);
|
|
- pdf_doc = std::make_shared<PDFDoc>(filename_goo, nullptr, nullptr, nullptr); // TODO: Could ask for password
|
|
+ pdf_doc = std::make_shared<PDFDoc>(filename_goo, nullptr, nullptr, nullptr); // TODO: Could ask for password
|
|
+#endif
|
|
|
|
if (!pdf_doc->isOk()) {
|
|
int error = pdf_doc->getErrorCode();
|