From a4431c7b74a26a1b526eb872963ad45ed16e2a5aed9ef96e8b47ca57e1aa7134 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Mon, 21 Sep 2020 11:36:50 +0000 Subject: [PATCH] Accepting request 835570 from home:badshah400:branches:X11:Utilities - Add xournalpp-fix-exporting-pdf-with-references.patch: Fix PDF export when references exist in the document [gh#xournalpp/xournalpp#2236]. OBS-URL: https://build.opensuse.org/request/show/835570 OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/xournalpp?expand=0&rev=21 --- ...pp-fix-exporting-pdf-with-references.patch | 23 +++++++++++++++++++ xournalpp.changes | 7 ++++++ xournalpp.spec | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 xournalpp-fix-exporting-pdf-with-references.patch diff --git a/xournalpp-fix-exporting-pdf-with-references.patch b/xournalpp-fix-exporting-pdf-with-references.patch new file mode 100644 index 0000000..b7d8d8d --- /dev/null +++ b/xournalpp-fix-exporting-pdf-with-references.patch @@ -0,0 +1,23 @@ +From 053c74842a0292223e36fe4e132a6b7e5908d98d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabian=20Ke=C3=9Fler?= +Date: Sun, 13 Sep 2020 23:00:50 +0200 +Subject: [PATCH] Fixes 1.0.18 PDF export bug, when references exist in the + document. - Regression - fixes #2236 + +--- + src/pdf/popplerapi/PopplerGlibAction.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pdf/popplerapi/PopplerGlibAction.cpp b/src/pdf/popplerapi/PopplerGlibAction.cpp +index b1c83c5ec5..31b0df3e60 100644 +--- a/src/pdf/popplerapi/PopplerGlibAction.cpp ++++ b/src/pdf/popplerapi/PopplerGlibAction.cpp +@@ -60,7 +60,7 @@ void PopplerGlibAction::linkFromDest(LinkDestination* link, PopplerDest* pDest) + break; + case POPPLER_DEST_XYZ: + { +- PopplerPage* page = poppler_document_get_page(document, pDest->page_num); ++ PopplerPage* page = poppler_document_get_page(document, pDest->page_num - 1); + if (page == NULL) + { + return; diff --git a/xournalpp.changes b/xournalpp.changes index 5ca5724..918eeb1 100644 --- a/xournalpp.changes +++ b/xournalpp.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Sep 19 14:27:53 UTC 2020 - Atri Bhattacharya + +- Add xournalpp-fix-exporting-pdf-with-references.patch: Fix PDF + export when references exist in the document + [gh#xournalpp/xournalpp#2236]. + ------------------------------------------------------------------- Thu Jul 16 13:22:38 UTC 2020 - Atri Bhattacharya diff --git a/xournalpp.spec b/xournalpp.spec index d0cd589..2b30e8e 100644 --- a/xournalpp.spec +++ b/xournalpp.spec @@ -26,6 +26,8 @@ URL: https://github.com/xournalpp/xournalpp Source0: https://github.com/xournalpp/xournalpp/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # PATCH-FIX-UPSTREAM xournalpp-fix-desktop-categories.patch badshah400@gmail.com -- Fix desktop categories with additional keywords to prevent "No sufficient Category definition" error from brp-desktop. Patch0: xournalpp-fix-desktop-categories.patch +# PATCH-FIX-UPSTREAM xournalpp-fix-exporting-pdf-with-references.patch gh#xournalpp/xournalpp#2236 badshah400@gmail.com -- Fix PDF export when references exist in the document. +Patch1: xournalpp-fix-exporting-pdf-with-references.patch BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ @@ -52,6 +54,7 @@ It supports pen input, e.g. Wacom tablets. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %cmake