summaryrefslogtreecommitdiff
path: root/app-office/libreoffice/files/libreoffice-25.2.7.2-poppler-26.01.patch
blob: b914c90a309dd2f9110336a20b2263070de2ccb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
From b307d254a88a87fe59f9c041346657790c75ac16 Mon Sep 17 00:00:00 2001
From: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Wed, 7 Jan 2026 14:06:55 +0100
Subject: [PATCH] poppler: upgrade to 26.01.0

stripped of all the bundled update stuff ...

---
 .../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx  |  15 +-
 .../pdfimport/xpdfwrapper/pnghelper.cxx       |  25 +-
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index a3b34db15464d..6b9184809803d 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -231,7 +231,10 @@ static void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str )
 #else
     str = ((DCTStream *)str)->getRawStream();
 #endif
-#if POPPLER_CHECK_VERSION(25, 2, 0)
+#if POPPLER_CHECK_VERSION(26, 1, 0)
+    if (!str->rewind())
+        return;
+#elif POPPLER_CHECK_VERSION(25, 2, 0)
     if (!str->reset())
         return;
 #else
@@ -272,7 +275,10 @@ static void writePbm_(OutputBuffer& o_rOutputBuf, Stream* str, int width, int he
     o_rOutputBuf.resize(header_size);
 
     // initialize stream
-#if POPPLER_CHECK_VERSION(25, 2, 0)
+#if POPPLER_CHECK_VERSION(26, 1, 0)
+    if (!str->rewind())
+        return;
+#elif POPPLER_CHECK_VERSION(25, 2, 0)
     if (!str->reset())
         return;
 #else
@@ -334,7 +340,10 @@ static void writePpm_( OutputBuffer&     o_rOutputBuf,
                         width,
                         colorMap->getNumPixelComps(),
                         colorMap->getBits()));
-#if POPPLER_CHECK_VERSION(25, 2, 0)
+#if POPPLER_CHECK_VERSION(26, 1, 0)
+    if (!imgStr->rewind())
+        return;
+#elif POPPLER_CHECK_VERSION(25, 2, 0)
     if (!imgStr->reset())
         return;
 #else
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
index e21d9192f563e..6e9784d4aa6bb 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
@@ -214,7 +214,10 @@ void PngHelper::createPng( OutputBuffer&     o_rOutputBuf,
     int nLineSize = (width + 7)/8;
     aScanlines.reserve( nLineSize * height + height );
 
-#if POPPLER_CHECK_VERSION(25, 2, 0)
+#if POPPLER_CHECK_VERSION(26, 1, 0)
+    if (!str->rewind())
+        return;
+#elif POPPLER_CHECK_VERSION(25, 2, 0)
     if (!str->reset())
         return;
 #else
@@ -257,7 +260,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
                         width,
                         colorMap->getNumPixelComps(),
                         colorMap->getBits()));
-#if POPPLER_CHECK_VERSION(25, 2, 0)
+#if POPPLER_CHECK_VERSION(26, 1, 0)
+    if (!imgStr->rewind())
+        return;
+#elif POPPLER_CHECK_VERSION(25, 2, 0)
     if (!imgStr->reset())
         return;
 #else
@@ -299,7 +305,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
                         maskColorMap->getNumPixelComps(),
                         maskColorMap->getBits()));
 
-#if POPPLER_CHECK_VERSION(25, 2, 0)
+#if POPPLER_CHECK_VERSION(26, 1, 0)
+    if (!imgStrMask->rewind())
+        return;
+#elif POPPLER_CHECK_VERSION(25, 2, 0)
     if (!imgStrMask->reset())
         return;
 #else
@@ -353,7 +362,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
                         width,
                         colorMap->getNumPixelComps(),
                         colorMap->getBits()));
-#if POPPLER_CHECK_VERSION(25, 2, 0)
+#if POPPLER_CHECK_VERSION(26, 1, 0)
+    if (!imgStr->rewind())
+        return;
+#elif POPPLER_CHECK_VERSION(25, 2, 0)
     if (!imgStr->reset())
         return;
 #else
@@ -392,7 +404,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
     std::unique_ptr<ImageStream> imgStrMask(
         new ImageStream(maskStr, maskWidth, 1, 1));
 
-#if POPPLER_CHECK_VERSION(25, 2, 0)
+#if POPPLER_CHECK_VERSION(26, 1, 0)
+    if (!imgStrMask->rewind())
+        return;
+#elif POPPLER_CHECK_VERSION(25, 2, 0)
     if (!imgStrMask->reset())
         return;
 #else