Merge lp:~marcelstimberg/ubuntu/natty/epdfview/fix-for-783109 into lp:ubuntu/natty/epdfview
- Natty (11.04)
- fix-for-783109
- Merge into natty
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Colin Watson | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~marcelstimberg/ubuntu/natty/epdfview/fix-for-783109 | ||||
Merge into: | lp:ubuntu/natty/epdfview | ||||
Diff against target: |
592 lines (+340/-33) 9 files modified
.pc/applied-patches (+1/-0) THANKS (+2/-0) configure.ac (+5/-0) debian/changelog (+8/-0) debian/patches/series (+1/-0) debian/patches/ubuntu_poppler-0.16.patch (+276/-0) src/IDocument.cxx (+35/-33) src/IDocument.h (+8/-0) src/PDFDocument.cxx (+4/-0) |
||||
To merge this branch: | bzr merge lp:~marcelstimberg/ubuntu/natty/epdfview/fix-for-783109 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stefano Rivera | Approve | ||
Chris Coulson (community) | Needs Fixing | ||
Ubuntu branches | Pending | ||
Review via email: mp+61794@code.launchpad.net |
Commit message
Description of the change
A branch with backported changes from rev 357 and rev 359, additional the "cosmetic" patch from rev 336 was also necessary in order for the other two patches to apply cleanly. This fixes crashes on many PDF documents, due to API changes in libpoppler.
Marcel Stimberg (marcelstimberg) wrote : | # |
Thanks for taking a look at the branch. I removed the unnecessary files and left all patches applied for consistency (although I was under the impression that bzr branches/source packages should not have patches applied...). The diff is now to a reasonable size :-) So please, take a look again.
Daniel Holbach (dholbach) wrote : | # |
This looks much better. Can you also submit a merge proposal for oneiric, so we can get it in there first (and follow https:/
Marcel Stimberg (marcelstimberg) wrote : | # |
> This looks much better. Can you also submit a merge proposal for oneiric, so we can get it in there first (and follow https:/
Thanks. Since I created this branch, Debian packaged a new upstream
version – I'll therefore submit a sync request for Oneiric instead. At
the first sight, there's no need for Ubuntu-specific patches for the
new version anymore, since these were all backported upstream changes.
But I'll check this more thoroughly later tonight.
Marcel Stimberg (marcelstimberg) wrote : | # |
epdfview 0.8.1 has been synced to Oneiric, so all that remains is the SRU for Natty.
Stefano Rivera (stefanor) wrote : | # |
Looks good, would you mind using the version number 0.1.7-5ubuntu1.1?
- 24. By Marcel Stimberg
-
change version number to ubuntu1.1 instead of ubuntu2
Marcel Stimberg (marcelstimberg) wrote : | # |
> Looks good, would you mind using the version number 0.1.7-5ubuntu1.1?
No problem, I updated the numbering.
Stefano Rivera (stefanor) wrote : | # |
Thanks, uploaded to natty-proposed, pending SRU team review
Preview Diff
1 | === modified file '.pc/applied-patches' | |||
2 | --- .pc/applied-patches 2011-02-18 02:59:14 +0000 | |||
3 | +++ .pc/applied-patches 2011-06-19 19:53:28 +0000 | |||
4 | @@ -4,3 +4,4 @@ | |||
5 | 4 | 04_fix-slash-search.patch | 4 | 04_fix-slash-search.patch |
6 | 5 | 05_fix-gtk-assertions.patch | 5 | 05_fix-gtk-assertions.patch |
7 | 6 | ubuntu_poppler-0.15.patch | 6 | ubuntu_poppler-0.15.patch |
8 | 7 | ubuntu_poppler-0.16.patch | ||
9 | 7 | 8 | ||
10 | === modified file 'THANKS' | |||
11 | --- THANKS 2010-08-01 12:23:11 +0000 | |||
12 | +++ THANKS 2011-06-19 19:53:28 +0000 | |||
13 | @@ -6,6 +6,7 @@ | |||
14 | 6 | - Alexander <lothalev@gmail.com>, for corrections in the Polish translation. | 6 | - Alexander <lothalev@gmail.com>, for corrections in the Polish translation. |
15 | 7 | - Enrico Tröger <enrico.troeger@uvena.de>, for his full screen patch and others. | 7 | - Enrico Tröger <enrico.troeger@uvena.de>, for his full screen patch and others. |
16 | 8 | - ewtoombs <ewtoombs@uwaterloo.ca>, for his patches. | 8 | - ewtoombs <ewtoombs@uwaterloo.ca>, for his patches. |
17 | 9 | - Dennis Sheil <dennis-poppler@vartmp.com>, for his patch. | ||
18 | 9 | - Daniel Nylander <po@danielnylander.se>, for his Swedish translation. | 10 | - Daniel Nylander <po@danielnylander.se>, for his Swedish translation. |
19 | 10 | - Daniel Pielmeie <daniel.pielmeie@googlemail.com>, for his patches. | 11 | - Daniel Pielmeie <daniel.pielmeie@googlemail.com>, for his patches. |
20 | 11 | - Dragonlord <dragonlord@seznam.cz>, for his Czech translation. | 12 | - Dragonlord <dragonlord@seznam.cz>, for his Czech translation. |
21 | @@ -18,6 +19,7 @@ | |||
22 | 18 | - Michael Opitz <opitz.michael@gmail.com>, for his patches. | 19 | - Michael Opitz <opitz.michael@gmail.com>, for his patches. |
23 | 19 | - Moritz Heiber <moe@xfce.org>, for his German translation. | 20 | - Moritz Heiber <moe@xfce.org>, for his German translation. |
24 | 20 | - Mr_Moustache <mr.moustache@laposte.net>, for his French translation. | 21 | - Mr_Moustache <mr.moustache@laposte.net>, for his French translation. |
25 | 22 | - Jakob Gruber <jakob.gruber@gmail.com>, for his segfault patches. | ||
26 | 21 | - Nuno Miguel <nunis@netcabo.pt>, for his European Portuguese translation. | 23 | - Nuno Miguel <nunis@netcabo.pt>, for his European Portuguese translation. |
27 | 22 | - Nyu <nyu_8804@yahoo.co.jp>, for his Japanese translation. | 24 | - Nyu <nyu_8804@yahoo.co.jp>, for his Japanese translation. |
28 | 23 | - Pablo Mazzini <pmazzini@gmail.com>, for his print patches. | 25 | - Pablo Mazzini <pmazzini@gmail.com>, for his print patches. |
29 | 24 | 26 | ||
30 | === modified file 'configure.ac' | |||
31 | --- configure.ac 2011-02-11 22:38:22 +0000 | |||
32 | +++ configure.ac 2011-06-19 19:53:28 +0000 | |||
33 | @@ -56,6 +56,11 @@ | |||
34 | 56 | if test "x$have_poppler_0_15_0" = "xyes"; then | 56 | if test "x$have_poppler_0_15_0" = "xyes"; then |
35 | 57 | AC_DEFINE([HAVE_POPPLER_0_15_0], [1], [Define to 1 if you have Poppler version 0.15.0 or higher.]) | 57 | AC_DEFINE([HAVE_POPPLER_0_15_0], [1], [Define to 1 if you have Poppler version 0.15.0 or higher.]) |
36 | 58 | fi | 58 | fi |
37 | 59 | PKG_CHECK_EXISTS([poppler-glib >= 0.15.1], [have_poppler_0_15_1=yes]) | ||
38 | 60 | if test "x$have_poppler_0_15_1" = "xyes"; then | ||
39 | 61 | AC_DEFINE([HAVE_POPPLER_0_15_1], [1], [Define to 1 if you have Poppler version 0.15.1 or higher.]) | ||
40 | 62 | fi | ||
41 | 63 | |||
42 | 59 | 64 | ||
43 | 60 | EPDFVIEW_PATH_CUPS([CUPS], [have_cups=yes]) | 65 | EPDFVIEW_PATH_CUPS([CUPS], [have_cups=yes]) |
44 | 61 | AM_CONDITIONAL(cups_printing, test "x$have_cups" = "xyes") | 66 | AM_CONDITIONAL(cups_printing, test "x$have_cups" = "xyes") |
45 | 62 | 67 | ||
46 | === modified file 'debian/changelog' | |||
47 | --- debian/changelog 2011-02-18 02:59:14 +0000 | |||
48 | +++ debian/changelog 2011-06-19 19:53:28 +0000 | |||
49 | @@ -1,3 +1,11 @@ | |||
50 | 1 | epdfview (0.1.7-5ubuntu1.1) natty-proposed; urgency=low | ||
51 | 2 | |||
52 | 3 | * debian/patches/ubuntu_poppler-0.16.patch: Backport upstream changes (r357 | ||
53 | 4 | and r359, in addition also r336, needed for the other patches to apply | ||
54 | 5 | cleanly) to prevent crashes due to API changes in poppler 0.16. LP: #783109 | ||
55 | 6 | |||
56 | 7 | -- Marcel Stimberg <stimberg@users.sourceforge.net> Fri, 19 Jun 2011 21:50:20 +0200 | ||
57 | 8 | |||
58 | 1 | epdfview (0.1.7-5ubuntu1) natty; urgency=low | 9 | epdfview (0.1.7-5ubuntu1) natty; urgency=low |
59 | 2 | 10 | ||
60 | 3 | * Merge from debian unstable. Remaining changes: | 11 | * Merge from debian unstable. Remaining changes: |
61 | 4 | 12 | ||
62 | === modified file 'debian/patches/series' | |||
63 | --- debian/patches/series 2011-02-18 02:59:14 +0000 | |||
64 | +++ debian/patches/series 2011-06-19 19:53:28 +0000 | |||
65 | @@ -4,3 +4,4 @@ | |||
66 | 4 | 04_fix-slash-search.patch | 4 | 04_fix-slash-search.patch |
67 | 5 | 05_fix-gtk-assertions.patch | 5 | 05_fix-gtk-assertions.patch |
68 | 6 | ubuntu_poppler-0.15.patch | 6 | ubuntu_poppler-0.15.patch |
69 | 7 | ubuntu_poppler-0.16.patch | ||
70 | 7 | 8 | ||
71 | === added file 'debian/patches/ubuntu_poppler-0.16.patch' | |||
72 | --- debian/patches/ubuntu_poppler-0.16.patch 1970-01-01 00:00:00 +0000 | |||
73 | +++ debian/patches/ubuntu_poppler-0.16.patch 2011-06-19 19:53:28 +0000 | |||
74 | @@ -0,0 +1,276 @@ | |||
75 | 1 | ## Description: Backport upstream changes to prevent crashes due to API changes in poppler 0.16. | ||
76 | 2 | ## Origin/Author: upstream, http://trac.emma-soft.com/epdfview/changeset/336?format=diff&new=336, | ||
77 | 3 | ## http://trac.emma-soft.com/epdfview/changeset/357?format=diff&new=357, | ||
78 | 4 | ## http://trac.emma-soft.com/epdfview/changeset/359?format=diff&new=359 | ||
79 | 5 | ## Bug: https://bugs.launchpad.net/ubuntu/+source/epdfview/+bug/783109 | ||
80 | 6 | diff -rpu epdfview.orig//configure.ac epdfview/configure.ac | ||
81 | 7 | --- epdfview.orig//configure.ac 2011-06-06 23:38:46.294634015 +0200 | ||
82 | 8 | +++ epdfview/configure.ac 2011-06-06 23:38:57.754634017 +0200 | ||
83 | 9 | @@ -56,6 +56,11 @@ PKG_CHECK_EXISTS([poppler-glib >= 0.15], | ||
84 | 10 | if test "x$have_poppler_0_15_0" = "xyes"; then | ||
85 | 11 | AC_DEFINE([HAVE_POPPLER_0_15_0], [1], [Define to 1 if you have Poppler version 0.15.0 or higher.]) | ||
86 | 12 | fi | ||
87 | 13 | +PKG_CHECK_EXISTS([poppler-glib >= 0.15.1], [have_poppler_0_15_1=yes]) | ||
88 | 14 | +if test "x$have_poppler_0_15_1" = "xyes"; then | ||
89 | 15 | + AC_DEFINE([HAVE_POPPLER_0_15_1], [1], [Define to 1 if you have Poppler version 0.15.1 or higher.]) | ||
90 | 16 | +fi | ||
91 | 17 | + | ||
92 | 18 | |||
93 | 19 | EPDFVIEW_PATH_CUPS([CUPS], [have_cups=yes]) | ||
94 | 20 | AM_CONDITIONAL(cups_printing, test "x$have_cups" = "xyes") | ||
95 | 21 | diff -rpu epdfview.orig//src/IDocument.cxx epdfview/src/IDocument.cxx | ||
96 | 22 | --- epdfview.orig//src/IDocument.cxx 2011-06-06 23:38:46.304634015 +0200 | ||
97 | 23 | +++ epdfview/src/IDocument.cxx 2011-06-06 23:38:57.754634017 +0200 | ||
98 | 24 | @@ -135,7 +135,11 @@ IDocument::IDocument () | ||
99 | 25 | m_FindPage = 0; | ||
100 | 26 | m_Format = NULL; | ||
101 | 27 | m_Keywords = NULL; | ||
102 | 28 | +#if defined (HAVE_POPPLER_0_15_1) | ||
103 | 29 | + m_Linearized = FALSE; | ||
104 | 30 | +#else | ||
105 | 31 | m_Linearized = NULL; | ||
106 | 32 | +#endif | ||
107 | 33 | m_ModifiedDate = NULL; | ||
108 | 34 | m_PageCache = NULL; | ||
109 | 35 | m_PageCacheAge = 0; | ||
110 | 36 | @@ -164,7 +168,9 @@ IDocument::~IDocument () | ||
111 | 37 | g_free (m_FileName); | ||
112 | 38 | g_free (m_Format); | ||
113 | 39 | g_free (m_Keywords); | ||
114 | 40 | +#if !defined (HAVE_POPPLER_0_15_1) | ||
115 | 41 | g_free (m_Linearized); | ||
116 | 42 | +#endif | ||
117 | 43 | g_free (m_ModifiedDate); | ||
118 | 44 | g_free (m_Password); | ||
119 | 45 | g_free (m_Producer); | ||
120 | 46 | @@ -555,9 +561,8 @@ IDocument::getTitle () | ||
121 | 47 | void | ||
122 | 48 | IDocument::setTitle (gchar *title) | ||
123 | 49 | { | ||
124 | 50 | - gchar *oldTitle = m_Title; | ||
125 | 51 | + g_free (m_Title); | ||
126 | 52 | m_Title = g_strdup (title); | ||
127 | 53 | - g_free (oldTitle); | ||
128 | 54 | g_free (title); | ||
129 | 55 | } | ||
130 | 56 | |||
131 | 57 | @@ -585,9 +590,8 @@ IDocument::getAuthor () | ||
132 | 58 | void | ||
133 | 59 | IDocument::setAuthor (gchar *author) | ||
134 | 60 | { | ||
135 | 61 | - gchar *oldAuthor = m_Author; | ||
136 | 62 | + g_free(m_Author); | ||
137 | 63 | m_Author = g_strdup (author); | ||
138 | 64 | - g_free (oldAuthor); | ||
139 | 65 | g_free (author); | ||
140 | 66 | } | ||
141 | 67 | |||
142 | 68 | @@ -615,10 +619,9 @@ IDocument::getSubject () | ||
143 | 69 | void | ||
144 | 70 | IDocument::setSubject (gchar *subject) | ||
145 | 71 | { | ||
146 | 72 | - gchar *oldSubject = m_Subject; | ||
147 | 73 | + g_free (m_Subject); | ||
148 | 74 | m_Subject = g_strdup (subject); | ||
149 | 75 | - g_free (oldSubject); | ||
150 | 76 | - m_Subject = subject; | ||
151 | 77 | + g_free (subject); | ||
152 | 78 | } | ||
153 | 79 | |||
154 | 80 | /// | ||
155 | 81 | @@ -646,9 +649,8 @@ IDocument::getKeywords () | ||
156 | 82 | void | ||
157 | 83 | IDocument::setKeywords (gchar *keywords) | ||
158 | 84 | { | ||
159 | 85 | - gchar *oldKeywords = m_Keywords; | ||
160 | 86 | + g_free(m_Keywords); | ||
161 | 87 | m_Keywords = g_strdup (keywords); | ||
162 | 88 | - g_free (oldKeywords); | ||
163 | 89 | g_free (keywords); | ||
164 | 90 | } | ||
165 | 91 | |||
166 | 92 | @@ -677,9 +679,8 @@ IDocument::getCreator () | ||
167 | 93 | void | ||
168 | 94 | IDocument::setCreator (gchar *creator) | ||
169 | 95 | { | ||
170 | 96 | - gchar *oldCreator = m_Creator; | ||
171 | 97 | + g_free (m_Creator); | ||
172 | 98 | m_Creator = g_strdup (creator); | ||
173 | 99 | - g_free (oldCreator); | ||
174 | 100 | g_free (creator); | ||
175 | 101 | } | ||
176 | 102 | /// | ||
177 | 103 | @@ -707,9 +708,8 @@ IDocument::getProducer () | ||
178 | 104 | void | ||
179 | 105 | IDocument::setProducer (gchar *producer) | ||
180 | 106 | { | ||
181 | 107 | - gchar *oldProducer = m_Producer; | ||
182 | 108 | + g_free (m_Producer); | ||
183 | 109 | m_Producer = g_strdup (producer); | ||
184 | 110 | - g_free (oldProducer); | ||
185 | 111 | g_free (producer); | ||
186 | 112 | } | ||
187 | 113 | |||
188 | 114 | @@ -739,9 +739,8 @@ IDocument::getFormat () | ||
189 | 115 | void | ||
190 | 116 | IDocument::setFormat (gchar *format) | ||
191 | 117 | { | ||
192 | 118 | - gchar *oldFormat = m_Format; | ||
193 | 119 | + g_free (m_Format); | ||
194 | 120 | m_Format = g_strdup (format); | ||
195 | 121 | - g_free (oldFormat); | ||
196 | 122 | g_free (format); | ||
197 | 123 | } | ||
198 | 124 | |||
199 | 125 | @@ -755,11 +754,16 @@ IDocument::setFormat (gchar *format) | ||
200 | 126 | const gchar * | ||
201 | 127 | IDocument::getLinearized () | ||
202 | 128 | { | ||
203 | 129 | +#if defined (HAVE_POPPLER_0_15_1) | ||
204 | 130 | + if ( m_Linearized ) return "Yes"; | ||
205 | 131 | + else return "No"; | ||
206 | 132 | +#else | ||
207 | 133 | if ( NULL == m_Linearized ) | ||
208 | 134 | { | ||
209 | 135 | return "No"; | ||
210 | 136 | } | ||
211 | 137 | return m_Linearized; | ||
212 | 138 | +#endif | ||
213 | 139 | } | ||
214 | 140 | |||
215 | 141 | /// | ||
216 | 142 | @@ -768,14 +772,21 @@ IDocument::getLinearized () | ||
217 | 143 | /// @param linearized Set to "Yes" if the document is linearized. "No" | ||
218 | 144 | /// otherwise. IDocument will free it. | ||
219 | 145 | /// | ||
220 | 146 | +#if defined (HAVE_POPPLER_0_15_1) | ||
221 | 147 | +void | ||
222 | 148 | +IDocument::setLinearized (gboolean *linearized) | ||
223 | 149 | +{ | ||
224 | 150 | + m_Linearized = linearized; | ||
225 | 151 | +} | ||
226 | 152 | +#else | ||
227 | 153 | void | ||
228 | 154 | -IDocument::setLinearized (gchar *linearized) | ||
229 | 155 | + IDocument::setLinearized (gchar *linearized) | ||
230 | 156 | { | ||
231 | 157 | - gchar *oldLinearized = m_Linearized; | ||
232 | 158 | + g_free (m_Linearized); | ||
233 | 159 | m_Linearized = g_strdup (linearized); | ||
234 | 160 | - g_free (oldLinearized); | ||
235 | 161 | g_free (linearized); | ||
236 | 162 | } | ||
237 | 163 | +#endif | ||
238 | 164 | |||
239 | 165 | /// | ||
240 | 166 | /// @brief Gets the document's creation date. | ||
241 | 167 | @@ -802,9 +813,8 @@ IDocument::getCreationDate () | ||
242 | 168 | void | ||
243 | 169 | IDocument::setCreationDate (gchar *date) | ||
244 | 170 | { | ||
245 | 171 | - gchar *oldCreationDate = m_CreationDate; | ||
246 | 172 | + g_free (m_CreationDate); | ||
247 | 173 | m_CreationDate = g_strdup (date); | ||
248 | 174 | - g_free (oldCreationDate); | ||
249 | 175 | g_free (date); | ||
250 | 176 | } | ||
251 | 177 | |||
252 | 178 | @@ -833,9 +843,8 @@ IDocument::getModifiedDate () | ||
253 | 179 | void | ||
254 | 180 | IDocument::setModifiedDate (gchar *date) | ||
255 | 181 | { | ||
256 | 182 | - gchar *oldModifiedDate = m_ModifiedDate; | ||
257 | 183 | + g_free (m_ModifiedDate); | ||
258 | 184 | m_ModifiedDate = g_strdup (date); | ||
259 | 185 | - g_free (oldModifiedDate); | ||
260 | 186 | g_free (date); | ||
261 | 187 | } | ||
262 | 188 | |||
263 | 189 | @@ -917,9 +926,8 @@ IDocument::getPassword () const | ||
264 | 190 | void | ||
265 | 191 | IDocument::setPassword (const gchar *password) | ||
266 | 192 | { | ||
267 | 193 | - gchar *oldPassword = m_Password; | ||
268 | 194 | + g_free (m_Password); | ||
269 | 195 | m_Password = g_strdup (password); | ||
270 | 196 | - g_free (oldPassword); | ||
271 | 197 | } | ||
272 | 198 | |||
273 | 199 | /// | ||
274 | 200 | @@ -959,14 +967,8 @@ IDocument::setFileName (const gchar *fil | ||
275 | 201 | { | ||
276 | 202 | g_assert (NULL != fileName && "Tried to set a NULL file name."); | ||
277 | 203 | |||
278 | 204 | - // Don't ask me why, but then I set like this: | ||
279 | 205 | - // g_free (m_FileName); | ||
280 | 206 | - // m_FileName = fileName | ||
281 | 207 | - // Somehow the g_free also frees the parameter ???????? | ||
282 | 208 | - // | ||
283 | 209 | - gchar *oldFileName = m_FileName; | ||
284 | 210 | + g_free(m_FileName); | ||
285 | 211 | m_FileName = g_strdup (fileName); | ||
286 | 212 | - g_free (oldFileName); | ||
287 | 213 | } | ||
288 | 214 | |||
289 | 215 | /// | ||
290 | 216 | diff -rpu epdfview.orig//src/IDocument.h epdfview/src/IDocument.h | ||
291 | 217 | --- epdfview.orig//src/IDocument.h 2011-06-06 23:38:46.304634015 +0200 | ||
292 | 218 | +++ epdfview/src/IDocument.h 2011-06-06 23:38:57.754634017 +0200 | ||
293 | 219 | @@ -306,7 +306,11 @@ namespace ePDFView | ||
294 | 220 | const gchar *getFormat (void); | ||
295 | 221 | void setFormat (gchar *format); | ||
296 | 222 | const gchar *getLinearized (void); | ||
297 | 223 | +#if defined (HAVE_POPPLER_0_15_1) | ||
298 | 224 | + void setLinearized (gboolean *linearized); | ||
299 | 225 | +#else | ||
300 | 226 | void setLinearized (gchar *linearized); | ||
301 | 227 | +#endif | ||
302 | 228 | const gchar *getCreationDate (void); | ||
303 | 229 | void setCreationDate (gchar *date); | ||
304 | 230 | const gchar *getModifiedDate (void); | ||
305 | 231 | @@ -382,7 +386,11 @@ namespace ePDFView | ||
306 | 232 | /// The document's keyword. | ||
307 | 233 | gchar *m_Keywords; | ||
308 | 234 | /// Tells if the document is linearized or not. | ||
309 | 235 | +#if defined (HAVE_POPPLER_0_15_1) | ||
310 | 236 | + gboolean *m_Linearized; | ||
311 | 237 | +#else | ||
312 | 238 | gchar *m_Linearized; | ||
313 | 239 | +#endif | ||
314 | 240 | /// The document's modification date and time. | ||
315 | 241 | gchar *m_ModifiedDate; | ||
316 | 242 | /// @brief The list of classes that will receive notifications | ||
317 | 243 | diff -rpu epdfview.orig//src/PDFDocument.cxx epdfview/src/PDFDocument.cxx | ||
318 | 244 | --- epdfview.orig//src/PDFDocument.cxx 2011-06-06 23:38:46.334634015 +0200 | ||
319 | 245 | +++ epdfview/src/PDFDocument.cxx 2011-06-06 23:38:57.754634017 +0200 | ||
320 | 246 | @@ -299,7 +299,11 @@ PDFDocument::loadMetadata (void) | ||
321 | 247 | gchar *format = NULL; | ||
322 | 248 | gchar *keywords = NULL; | ||
323 | 249 | PopplerPageLayout layout = POPPLER_PAGE_LAYOUT_UNSET; | ||
324 | 250 | +#if defined (HAVE_POPPLER_0_15_1) | ||
325 | 251 | + gboolean *linearized = NULL; | ||
326 | 252 | +#else | ||
327 | 253 | gchar *linearized = NULL; | ||
328 | 254 | +#endif | ||
329 | 255 | GTime modDate; | ||
330 | 256 | PopplerPageMode mode = POPPLER_PAGE_MODE_UNSET; | ||
331 | 257 | gchar *producer = NULL; | ||
332 | 258 | diff -rpu epdfview.orig//THANKS epdfview/THANKS | ||
333 | 259 | --- epdfview.orig//THANKS 2011-06-06 23:38:46.224634015 +0200 | ||
334 | 260 | +++ epdfview/THANKS 2011-06-06 23:38:57.754634017 +0200 | ||
335 | 261 | @@ -6,6 +6,7 @@ contributions: | ||
336 | 262 | - Alexander <lothalev@gmail.com>, for corrections in the Polish translation. | ||
337 | 263 | - Enrico Tröger <enrico.troeger@uvena.de>, for his full screen patch and others. | ||
338 | 264 | - ewtoombs <ewtoombs@uwaterloo.ca>, for his patches. | ||
339 | 265 | + - Dennis Sheil <dennis-poppler@vartmp.com>, for his patch. | ||
340 | 266 | - Daniel Nylander <po@danielnylander.se>, for his Swedish translation. | ||
341 | 267 | - Daniel Pielmeie <daniel.pielmeie@googlemail.com>, for his patches. | ||
342 | 268 | - Dragonlord <dragonlord@seznam.cz>, for his Czech translation. | ||
343 | 269 | @@ -18,6 +19,7 @@ contributions: | ||
344 | 270 | - Michael Opitz <opitz.michael@gmail.com>, for his patches. | ||
345 | 271 | - Moritz Heiber <moe@xfce.org>, for his German translation. | ||
346 | 272 | - Mr_Moustache <mr.moustache@laposte.net>, for his French translation. | ||
347 | 273 | + - Jakob Gruber <jakob.gruber@gmail.com>, for his segfault patches. | ||
348 | 274 | - Nuno Miguel <nunis@netcabo.pt>, for his European Portuguese translation. | ||
349 | 275 | - Nyu <nyu_8804@yahoo.co.jp>, for his Japanese translation. | ||
350 | 276 | - Pablo Mazzini <pmazzini@gmail.com>, for his print patches. | ||
351 | 0 | 277 | ||
352 | === modified file 'src/IDocument.cxx' | |||
353 | --- src/IDocument.cxx 2009-03-10 00:06:29 +0000 | |||
354 | +++ src/IDocument.cxx 2011-06-19 19:53:28 +0000 | |||
355 | @@ -135,7 +135,11 @@ | |||
356 | 135 | m_FindPage = 0; | 135 | m_FindPage = 0; |
357 | 136 | m_Format = NULL; | 136 | m_Format = NULL; |
358 | 137 | m_Keywords = NULL; | 137 | m_Keywords = NULL; |
359 | 138 | #if defined (HAVE_POPPLER_0_15_1) | ||
360 | 139 | m_Linearized = FALSE; | ||
361 | 140 | #else | ||
362 | 138 | m_Linearized = NULL; | 141 | m_Linearized = NULL; |
363 | 142 | #endif | ||
364 | 139 | m_ModifiedDate = NULL; | 143 | m_ModifiedDate = NULL; |
365 | 140 | m_PageCache = NULL; | 144 | m_PageCache = NULL; |
366 | 141 | m_PageCacheAge = 0; | 145 | m_PageCacheAge = 0; |
367 | @@ -164,7 +168,9 @@ | |||
368 | 164 | g_free (m_FileName); | 168 | g_free (m_FileName); |
369 | 165 | g_free (m_Format); | 169 | g_free (m_Format); |
370 | 166 | g_free (m_Keywords); | 170 | g_free (m_Keywords); |
371 | 171 | #if !defined (HAVE_POPPLER_0_15_1) | ||
372 | 167 | g_free (m_Linearized); | 172 | g_free (m_Linearized); |
373 | 173 | #endif | ||
374 | 168 | g_free (m_ModifiedDate); | 174 | g_free (m_ModifiedDate); |
375 | 169 | g_free (m_Password); | 175 | g_free (m_Password); |
376 | 170 | g_free (m_Producer); | 176 | g_free (m_Producer); |
377 | @@ -555,9 +561,8 @@ | |||
378 | 555 | void | 561 | void |
379 | 556 | IDocument::setTitle (gchar *title) | 562 | IDocument::setTitle (gchar *title) |
380 | 557 | { | 563 | { |
382 | 558 | gchar *oldTitle = m_Title; | 564 | g_free (m_Title); |
383 | 559 | m_Title = g_strdup (title); | 565 | m_Title = g_strdup (title); |
384 | 560 | g_free (oldTitle); | ||
385 | 561 | g_free (title); | 566 | g_free (title); |
386 | 562 | } | 567 | } |
387 | 563 | 568 | ||
388 | @@ -585,9 +590,8 @@ | |||
389 | 585 | void | 590 | void |
390 | 586 | IDocument::setAuthor (gchar *author) | 591 | IDocument::setAuthor (gchar *author) |
391 | 587 | { | 592 | { |
393 | 588 | gchar *oldAuthor = m_Author; | 593 | g_free(m_Author); |
394 | 589 | m_Author = g_strdup (author); | 594 | m_Author = g_strdup (author); |
395 | 590 | g_free (oldAuthor); | ||
396 | 591 | g_free (author); | 595 | g_free (author); |
397 | 592 | } | 596 | } |
398 | 593 | 597 | ||
399 | @@ -615,10 +619,9 @@ | |||
400 | 615 | void | 619 | void |
401 | 616 | IDocument::setSubject (gchar *subject) | 620 | IDocument::setSubject (gchar *subject) |
402 | 617 | { | 621 | { |
404 | 618 | gchar *oldSubject = m_Subject; | 622 | g_free (m_Subject); |
405 | 619 | m_Subject = g_strdup (subject); | 623 | m_Subject = g_strdup (subject); |
408 | 620 | g_free (oldSubject); | 624 | g_free (subject); |
407 | 621 | m_Subject = subject; | ||
409 | 622 | } | 625 | } |
410 | 623 | 626 | ||
411 | 624 | /// | 627 | /// |
412 | @@ -646,9 +649,8 @@ | |||
413 | 646 | void | 649 | void |
414 | 647 | IDocument::setKeywords (gchar *keywords) | 650 | IDocument::setKeywords (gchar *keywords) |
415 | 648 | { | 651 | { |
417 | 649 | gchar *oldKeywords = m_Keywords; | 652 | g_free(m_Keywords); |
418 | 650 | m_Keywords = g_strdup (keywords); | 653 | m_Keywords = g_strdup (keywords); |
419 | 651 | g_free (oldKeywords); | ||
420 | 652 | g_free (keywords); | 654 | g_free (keywords); |
421 | 653 | } | 655 | } |
422 | 654 | 656 | ||
423 | @@ -677,9 +679,8 @@ | |||
424 | 677 | void | 679 | void |
425 | 678 | IDocument::setCreator (gchar *creator) | 680 | IDocument::setCreator (gchar *creator) |
426 | 679 | { | 681 | { |
428 | 680 | gchar *oldCreator = m_Creator; | 682 | g_free (m_Creator); |
429 | 681 | m_Creator = g_strdup (creator); | 683 | m_Creator = g_strdup (creator); |
430 | 682 | g_free (oldCreator); | ||
431 | 683 | g_free (creator); | 684 | g_free (creator); |
432 | 684 | } | 685 | } |
433 | 685 | /// | 686 | /// |
434 | @@ -707,9 +708,8 @@ | |||
435 | 707 | void | 708 | void |
436 | 708 | IDocument::setProducer (gchar *producer) | 709 | IDocument::setProducer (gchar *producer) |
437 | 709 | { | 710 | { |
439 | 710 | gchar *oldProducer = m_Producer; | 711 | g_free (m_Producer); |
440 | 711 | m_Producer = g_strdup (producer); | 712 | m_Producer = g_strdup (producer); |
441 | 712 | g_free (oldProducer); | ||
442 | 713 | g_free (producer); | 713 | g_free (producer); |
443 | 714 | } | 714 | } |
444 | 715 | 715 | ||
445 | @@ -739,9 +739,8 @@ | |||
446 | 739 | void | 739 | void |
447 | 740 | IDocument::setFormat (gchar *format) | 740 | IDocument::setFormat (gchar *format) |
448 | 741 | { | 741 | { |
450 | 742 | gchar *oldFormat = m_Format; | 742 | g_free (m_Format); |
451 | 743 | m_Format = g_strdup (format); | 743 | m_Format = g_strdup (format); |
452 | 744 | g_free (oldFormat); | ||
453 | 745 | g_free (format); | 744 | g_free (format); |
454 | 746 | } | 745 | } |
455 | 747 | 746 | ||
456 | @@ -755,11 +754,16 @@ | |||
457 | 755 | const gchar * | 754 | const gchar * |
458 | 756 | IDocument::getLinearized () | 755 | IDocument::getLinearized () |
459 | 757 | { | 756 | { |
460 | 757 | #if defined (HAVE_POPPLER_0_15_1) | ||
461 | 758 | if ( m_Linearized ) return "Yes"; | ||
462 | 759 | else return "No"; | ||
463 | 760 | #else | ||
464 | 758 | if ( NULL == m_Linearized ) | 761 | if ( NULL == m_Linearized ) |
465 | 759 | { | 762 | { |
466 | 760 | return "No"; | 763 | return "No"; |
467 | 761 | } | 764 | } |
468 | 762 | return m_Linearized; | 765 | return m_Linearized; |
469 | 766 | #endif | ||
470 | 763 | } | 767 | } |
471 | 764 | 768 | ||
472 | 765 | /// | 769 | /// |
473 | @@ -768,14 +772,21 @@ | |||
474 | 768 | /// @param linearized Set to "Yes" if the document is linearized. "No" | 772 | /// @param linearized Set to "Yes" if the document is linearized. "No" |
475 | 769 | /// otherwise. IDocument will free it. | 773 | /// otherwise. IDocument will free it. |
476 | 770 | /// | 774 | /// |
481 | 771 | void | 775 | #if defined (HAVE_POPPLER_0_15_1) |
482 | 772 | IDocument::setLinearized (gchar *linearized) | 776 | void |
483 | 773 | { | 777 | IDocument::setLinearized (gboolean *linearized) |
484 | 774 | gchar *oldLinearized = m_Linearized; | 778 | { |
485 | 779 | m_Linearized = linearized; | ||
486 | 780 | } | ||
487 | 781 | #else | ||
488 | 782 | void | ||
489 | 783 | IDocument::setLinearized (gchar *linearized) | ||
490 | 784 | { | ||
491 | 785 | g_free (m_Linearized); | ||
492 | 775 | m_Linearized = g_strdup (linearized); | 786 | m_Linearized = g_strdup (linearized); |
493 | 776 | g_free (oldLinearized); | ||
494 | 777 | g_free (linearized); | 787 | g_free (linearized); |
495 | 778 | } | 788 | } |
496 | 789 | #endif | ||
497 | 779 | 790 | ||
498 | 780 | /// | 791 | /// |
499 | 781 | /// @brief Gets the document's creation date. | 792 | /// @brief Gets the document's creation date. |
500 | @@ -802,9 +813,8 @@ | |||
501 | 802 | void | 813 | void |
502 | 803 | IDocument::setCreationDate (gchar *date) | 814 | IDocument::setCreationDate (gchar *date) |
503 | 804 | { | 815 | { |
505 | 805 | gchar *oldCreationDate = m_CreationDate; | 816 | g_free (m_CreationDate); |
506 | 806 | m_CreationDate = g_strdup (date); | 817 | m_CreationDate = g_strdup (date); |
507 | 807 | g_free (oldCreationDate); | ||
508 | 808 | g_free (date); | 818 | g_free (date); |
509 | 809 | } | 819 | } |
510 | 810 | 820 | ||
511 | @@ -833,9 +843,8 @@ | |||
512 | 833 | void | 843 | void |
513 | 834 | IDocument::setModifiedDate (gchar *date) | 844 | IDocument::setModifiedDate (gchar *date) |
514 | 835 | { | 845 | { |
516 | 836 | gchar *oldModifiedDate = m_ModifiedDate; | 846 | g_free (m_ModifiedDate); |
517 | 837 | m_ModifiedDate = g_strdup (date); | 847 | m_ModifiedDate = g_strdup (date); |
518 | 838 | g_free (oldModifiedDate); | ||
519 | 839 | g_free (date); | 848 | g_free (date); |
520 | 840 | } | 849 | } |
521 | 841 | 850 | ||
522 | @@ -917,9 +926,8 @@ | |||
523 | 917 | void | 926 | void |
524 | 918 | IDocument::setPassword (const gchar *password) | 927 | IDocument::setPassword (const gchar *password) |
525 | 919 | { | 928 | { |
527 | 920 | gchar *oldPassword = m_Password; | 929 | g_free (m_Password); |
528 | 921 | m_Password = g_strdup (password); | 930 | m_Password = g_strdup (password); |
529 | 922 | g_free (oldPassword); | ||
530 | 923 | } | 931 | } |
531 | 924 | 932 | ||
532 | 925 | /// | 933 | /// |
533 | @@ -959,14 +967,8 @@ | |||
534 | 959 | { | 967 | { |
535 | 960 | g_assert (NULL != fileName && "Tried to set a NULL file name."); | 968 | g_assert (NULL != fileName && "Tried to set a NULL file name."); |
536 | 961 | 969 | ||
543 | 962 | // Don't ask me why, but then I set like this: | 970 | g_free(m_FileName); |
538 | 963 | // g_free (m_FileName); | ||
539 | 964 | // m_FileName = fileName | ||
540 | 965 | // Somehow the g_free also frees the parameter ???????? | ||
541 | 966 | // | ||
542 | 967 | gchar *oldFileName = m_FileName; | ||
544 | 968 | m_FileName = g_strdup (fileName); | 971 | m_FileName = g_strdup (fileName); |
545 | 969 | g_free (oldFileName); | ||
546 | 970 | } | 972 | } |
547 | 971 | 973 | ||
548 | 972 | /// | 974 | /// |
549 | 973 | 975 | ||
550 | === modified file 'src/IDocument.h' | |||
551 | --- src/IDocument.h 2009-03-10 00:06:29 +0000 | |||
552 | +++ src/IDocument.h 2011-06-19 19:53:28 +0000 | |||
553 | @@ -306,7 +306,11 @@ | |||
554 | 306 | const gchar *getFormat (void); | 306 | const gchar *getFormat (void); |
555 | 307 | void setFormat (gchar *format); | 307 | void setFormat (gchar *format); |
556 | 308 | const gchar *getLinearized (void); | 308 | const gchar *getLinearized (void); |
557 | 309 | #if defined (HAVE_POPPLER_0_15_1) | ||
558 | 310 | void setLinearized (gboolean *linearized); | ||
559 | 311 | #else | ||
560 | 309 | void setLinearized (gchar *linearized); | 312 | void setLinearized (gchar *linearized); |
561 | 313 | #endif | ||
562 | 310 | const gchar *getCreationDate (void); | 314 | const gchar *getCreationDate (void); |
563 | 311 | void setCreationDate (gchar *date); | 315 | void setCreationDate (gchar *date); |
564 | 312 | const gchar *getModifiedDate (void); | 316 | const gchar *getModifiedDate (void); |
565 | @@ -382,7 +386,11 @@ | |||
566 | 382 | /// The document's keyword. | 386 | /// The document's keyword. |
567 | 383 | gchar *m_Keywords; | 387 | gchar *m_Keywords; |
568 | 384 | /// Tells if the document is linearized or not. | 388 | /// Tells if the document is linearized or not. |
569 | 389 | #if defined (HAVE_POPPLER_0_15_1) | ||
570 | 390 | gboolean *m_Linearized; | ||
571 | 391 | #else | ||
572 | 385 | gchar *m_Linearized; | 392 | gchar *m_Linearized; |
573 | 393 | #endif | ||
574 | 386 | /// The document's modification date and time. | 394 | /// The document's modification date and time. |
575 | 387 | gchar *m_ModifiedDate; | 395 | gchar *m_ModifiedDate; |
576 | 388 | /// @brief The list of classes that will receive notifications | 396 | /// @brief The list of classes that will receive notifications |
577 | 389 | 397 | ||
578 | === modified file 'src/PDFDocument.cxx' | |||
579 | --- src/PDFDocument.cxx 2011-02-11 22:38:22 +0000 | |||
580 | +++ src/PDFDocument.cxx 2011-06-19 19:53:28 +0000 | |||
581 | @@ -299,7 +299,11 @@ | |||
582 | 299 | gchar *format = NULL; | 299 | gchar *format = NULL; |
583 | 300 | gchar *keywords = NULL; | 300 | gchar *keywords = NULL; |
584 | 301 | PopplerPageLayout layout = POPPLER_PAGE_LAYOUT_UNSET; | 301 | PopplerPageLayout layout = POPPLER_PAGE_LAYOUT_UNSET; |
585 | 302 | #if defined (HAVE_POPPLER_0_15_1) | ||
586 | 303 | gboolean *linearized = NULL; | ||
587 | 304 | #else | ||
588 | 302 | gchar *linearized = NULL; | 305 | gchar *linearized = NULL; |
589 | 306 | #endif | ||
590 | 303 | GTime modDate; | 307 | GTime modDate; |
591 | 304 | PopplerPageMode mode = POPPLER_PAGE_MODE_UNSET; | 308 | PopplerPageMode mode = POPPLER_PAGE_MODE_UNSET; |
592 | 305 | gchar *producer = NULL; | 309 | gchar *producer = NULL; |
Thanks for your work. However, it seems like you included a few unnecessary files in your patch:
- epdview/THANKS.orig configure. ac.orig src/IDocument. cxx.orig src/PDFDocument .cxx.orig
- epdfview/
- epdfview/
- epdfview/
Also, the diff is huge because the branch is normally pushed with the patches applied, whereas your merge proposal has none applied