1 |
commit: 3c55b2008f5417f6ddf252fddde26820cdad6b44 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 1 13:38:58 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 1 19:40:08 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c55b200 |
7 |
|
8 |
app-office/calligra: Split out plan, fix build with >=poppler-0.71 |
9 |
|
10 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
app-office/calligra/calligra-3.1.0-r3.ebuild | 211 +++++++++++++++++++++ |
14 |
.../files/calligra-3.1.0-poppler-0.69.patch | 83 ++++++++ |
15 |
.../files/calligra-3.1.0-poppler-0.71.patch | 202 ++++++++++++++++++++ |
16 |
3 files changed, 496 insertions(+) |
17 |
|
18 |
diff --git a/app-office/calligra/calligra-3.1.0-r3.ebuild b/app-office/calligra/calligra-3.1.0-r3.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..46e011852b1 |
21 |
--- /dev/null |
22 |
+++ b/app-office/calligra/calligra-3.1.0-r3.ebuild |
23 |
@@ -0,0 +1,211 @@ |
24 |
+# Copyright 1999-2019 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=6 |
28 |
+ |
29 |
+CHECKREQS_DISK_BUILD="4G" |
30 |
+KDE_DOC_DIR="xxx" # contains no language subdirs |
31 |
+KDE_HANDBOOK="forceoptional" |
32 |
+KDE_TEST="forceoptional" |
33 |
+inherit check-reqs kde5 |
34 |
+ |
35 |
+DESCRIPTION="KDE Office Suite" |
36 |
+HOMEPAGE="https://www.calligra.org/" |
37 |
+SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz" |
38 |
+ |
39 |
+LICENSE="GPL-2" |
40 |
+KEYWORDS="~amd64 ~x86" |
41 |
+ |
42 |
+CAL_FTS=( karbon sheets words ) |
43 |
+ |
44 |
+IUSE="activities +crypt +fontconfig gemini gsl import-filter +lcms okular openexr +pdf |
45 |
+ phonon pim spacenav +truetype X $(printf 'calligra_features_%s ' ${CAL_FTS[@]}) |
46 |
+ calligra_experimental_features_stage" |
47 |
+ |
48 |
+# TODO: Not packaged: Cauchy (https://bitbucket.org/cyrille/cauchy) |
49 |
+# Required for the matlab/octave formula tool |
50 |
+COMMON_DEPEND=" |
51 |
+ $(add_frameworks_dep karchive) |
52 |
+ $(add_frameworks_dep kcmutils) |
53 |
+ $(add_frameworks_dep kcodecs) |
54 |
+ $(add_frameworks_dep kcompletion) |
55 |
+ $(add_frameworks_dep kconfig) |
56 |
+ $(add_frameworks_dep kconfigwidgets) |
57 |
+ $(add_frameworks_dep kcoreaddons) |
58 |
+ $(add_frameworks_dep kdelibs4support) |
59 |
+ $(add_frameworks_dep kemoticons) |
60 |
+ $(add_frameworks_dep kglobalaccel) |
61 |
+ $(add_frameworks_dep kguiaddons) |
62 |
+ $(add_frameworks_dep ki18n) |
63 |
+ $(add_frameworks_dep kiconthemes) |
64 |
+ $(add_frameworks_dep kio) |
65 |
+ $(add_frameworks_dep kitemmodels) |
66 |
+ $(add_frameworks_dep kitemviews) |
67 |
+ $(add_frameworks_dep kjobwidgets) |
68 |
+ $(add_frameworks_dep knotifications) |
69 |
+ $(add_frameworks_dep knotifyconfig) |
70 |
+ $(add_frameworks_dep kparts) |
71 |
+ $(add_frameworks_dep kross) |
72 |
+ $(add_frameworks_dep ktextwidgets) |
73 |
+ $(add_frameworks_dep kwallet) |
74 |
+ $(add_frameworks_dep kwidgetsaddons) |
75 |
+ $(add_frameworks_dep kwindowsystem) |
76 |
+ $(add_frameworks_dep kxmlgui) |
77 |
+ $(add_frameworks_dep sonnet) |
78 |
+ $(add_qt_dep designer) |
79 |
+ $(add_qt_dep qtdbus) |
80 |
+ $(add_qt_dep qtdeclarative) |
81 |
+ $(add_qt_dep qtgui) |
82 |
+ $(add_qt_dep qtnetwork) |
83 |
+ $(add_qt_dep qtprintsupport) |
84 |
+ $(add_qt_dep qtscript) |
85 |
+ $(add_qt_dep qtsvg) |
86 |
+ $(add_qt_dep qtwidgets) |
87 |
+ $(add_qt_dep qtxml) |
88 |
+ dev-lang/perl |
89 |
+ sys-libs/zlib |
90 |
+ virtual/libiconv |
91 |
+ activities? ( $(add_frameworks_dep kactivities) ) |
92 |
+ crypt? ( app-crypt/qca:2[qt5(+)] ) |
93 |
+ fontconfig? ( media-libs/fontconfig ) |
94 |
+ gemini? ( $(add_qt_dep qtdeclarative 'widgets') ) |
95 |
+ gsl? ( sci-libs/gsl ) |
96 |
+ import-filter? ( |
97 |
+ $(add_frameworks_dep khtml) |
98 |
+ app-text/libetonyek |
99 |
+ app-text/libodfgen |
100 |
+ app-text/libwpd:* |
101 |
+ app-text/libwpg:* |
102 |
+ >=app-text/libwps-0.4 |
103 |
+ dev-libs/librevenge |
104 |
+ media-libs/libvisio |
105 |
+ ) |
106 |
+ lcms? ( |
107 |
+ media-libs/ilmbase:= |
108 |
+ media-libs/lcms:2 |
109 |
+ ) |
110 |
+ openexr? ( media-libs/openexr ) |
111 |
+ pdf? ( >=app-text/poppler-0.64:=[qt5] ) |
112 |
+ phonon? ( media-libs/phonon[qt5(+)] ) |
113 |
+ pim? ( $(add_kdeapps_dep kcalcore) ) |
114 |
+ spacenav? ( dev-libs/libspnav ) |
115 |
+ truetype? ( media-libs/freetype:2 ) |
116 |
+ X? ( |
117 |
+ $(add_qt_dep qtx11extras) |
118 |
+ x11-libs/libX11 |
119 |
+ ) |
120 |
+ calligra_experimental_features_stage? ( |
121 |
+ $(add_qt_dep qtwebkit) |
122 |
+ okular? ( $(add_kdeapps_dep okular) ) |
123 |
+ ) |
124 |
+ calligra_features_sheets? ( dev-cpp/eigen:3 ) |
125 |
+ calligra_features_words? ( |
126 |
+ dev-libs/libxslt |
127 |
+ okular? ( $(add_kdeapps_dep okular) ) |
128 |
+ ) |
129 |
+" |
130 |
+DEPEND="${COMMON_DEPEND} |
131 |
+ dev-libs/boost |
132 |
+ sys-devel/gettext |
133 |
+ x11-misc/shared-mime-info |
134 |
+ test? ( $(add_frameworks_dep threadweaver) ) |
135 |
+" |
136 |
+RDEPEND="${COMMON_DEPEND} |
137 |
+ calligra_features_karbon? ( media-gfx/pstoedit[plotutils] ) |
138 |
+ !app-office/calligra:4 |
139 |
+ !app-office/calligra-l10n:4 |
140 |
+" |
141 |
+RESTRICT+=" test" |
142 |
+ |
143 |
+PATCHES=( |
144 |
+ "${FILESDIR}"/${P}-no-arch-detection.patch |
145 |
+ "${FILESDIR}"/${P}-doc.patch |
146 |
+ "${FILESDIR}"/${P}-qt-5.11.patch |
147 |
+ "${FILESDIR}"/${P}-stage-qt-5.11.patch |
148 |
+ "${FILESDIR}"/${P}-poppler-0.69.patch |
149 |
+ "${FILESDIR}"/${P}-poppler-0.71.patch |
150 |
+) |
151 |
+ |
152 |
+pkg_pretend() { |
153 |
+ check-reqs_pkg_pretend |
154 |
+} |
155 |
+ |
156 |
+pkg_setup() { |
157 |
+ kde5_pkg_setup |
158 |
+ check-reqs_pkg_setup |
159 |
+} |
160 |
+ |
161 |
+src_prepare() { |
162 |
+ kde5_src_prepare |
163 |
+ |
164 |
+ if ! use test; then |
165 |
+ sed -e "/add_subdirectory( *benchmarks *)/s/^/#DONT/" \ |
166 |
+ -i libs/pigment/CMakeLists.txt || die |
167 |
+ fi |
168 |
+ |
169 |
+ # Unconditionally disable deprecated deps (required by QtQuick1) |
170 |
+ punt_bogus_dep Qt5 Declarative |
171 |
+ punt_bogus_dep Qt5 OpenGL |
172 |
+ |
173 |
+ if ! use calligra_experimental_features_stage; then |
174 |
+ punt_bogus_dep Qt5 WebKitWidgets |
175 |
+ punt_bogus_dep Qt5 WebKit |
176 |
+ fi |
177 |
+ |
178 |
+ # Hack around the excessive use of CMake macros |
179 |
+ if use okular && ! use calligra_features_words; then |
180 |
+ sed -i -e "/add_subdirectory( *okularodtgenerator *)/ s/^/#DONT/" \ |
181 |
+ extras/CMakeLists.txt || die "Failed to disable OKULAR_GENERATOR_ODT" |
182 |
+ fi |
183 |
+ |
184 |
+ if use okular && ! use calligra_experimental_features_stage; then |
185 |
+ sed -i -e "/add_subdirectory( *okularodpgenerator *)/ s/^/#DONT/" \ |
186 |
+ extras/CMakeLists.txt || die "Failed to disable OKULAR_GENERATOR_ODP" |
187 |
+ fi |
188 |
+} |
189 |
+ |
190 |
+src_configure() { |
191 |
+ local cal_ft myproducts |
192 |
+ |
193 |
+ # applications |
194 |
+ for cal_ft in ${CAL_FTS[@]}; do |
195 |
+ use calligra_features_${cal_ft} && myproducts+=( "${cal_ft^^}" ) |
196 |
+ done |
197 |
+ |
198 |
+ use calligra_experimental_features_stage && myproducts+=( STAGE ) |
199 |
+ |
200 |
+ use lcms && myproducts+=( PLUGIN_COLORENGINES ) |
201 |
+ use spacenav && myproducts+=( PLUGIN_SPACENAVIGATOR ) |
202 |
+ |
203 |
+ local mycmakeargs=( |
204 |
+ -DPACKAGERS_BUILD=OFF |
205 |
+ -DRELEASE_BUILD=ON |
206 |
+ -DWITH_Iconv=ON |
207 |
+ -DPRODUCTSET="${myproducts[*]}" |
208 |
+ $(cmake-utils_use_find_package activities KF5Activities) |
209 |
+ -DWITH_Qca-qt5=$(usex crypt) |
210 |
+ -DWITH_Fontconfig=$(usex fontconfig) |
211 |
+ $(cmake-utils_use_find_package gemini Libgit2) |
212 |
+ $(cmake-utils_use_find_package gemini Qt5QuickWidgets) |
213 |
+ -DWITH_GSL=$(usex gsl) |
214 |
+ -DWITH_LibEtonyek=$(usex import-filter) |
215 |
+ -DWITH_LibOdfGen=$(usex import-filter) |
216 |
+ -DWITH_LibRevenge=$(usex import-filter) |
217 |
+ -DWITH_LibVisio=$(usex import-filter) |
218 |
+ -DWITH_LibWpd=$(usex import-filter) |
219 |
+ -DWITH_LibWpg=$(usex import-filter) |
220 |
+ -DWITH_LibWps=$(usex import-filter) |
221 |
+ $(cmake-utils_use_find_package phonon Phonon4Qt5) |
222 |
+ $(cmake-utils_use_find_package pim KF5CalendarCore) |
223 |
+ -DWITH_LCMS2=$(usex lcms) |
224 |
+ -DWITH_Okular5=$(usex okular) |
225 |
+ -DWITH_OpenEXR=$(usex openexr) |
226 |
+ -DWITH_Poppler=$(usex pdf) |
227 |
+ -DWITH_Eigen3=$(usex calligra_features_sheets) |
228 |
+ -DBUILD_UNMAINTAINED=$(usex calligra_experimental_features_stage) |
229 |
+ -ENABLE_CSTESTER_TESTING=$(usex test) |
230 |
+ -DWITH_Freetype=$(usex truetype) |
231 |
+ ) |
232 |
+ |
233 |
+ kde5_src_configure |
234 |
+} |
235 |
|
236 |
diff --git a/app-office/calligra/files/calligra-3.1.0-poppler-0.69.patch b/app-office/calligra/files/calligra-3.1.0-poppler-0.69.patch |
237 |
new file mode 100644 |
238 |
index 00000000000..c82fbd242b8 |
239 |
--- /dev/null |
240 |
+++ b/app-office/calligra/files/calligra-3.1.0-poppler-0.69.patch |
241 |
@@ -0,0 +1,83 @@ |
242 |
+From 56bd4bab320b0c0a893751caee9a15a2241e3ef8 Mon Sep 17 00:00:00 2001 |
243 |
+From: Antonio Rojas <arojas@×××××××××.org> |
244 |
+Date: Wed, 24 Oct 2018 08:28:00 +0200 |
245 |
+Subject: Fix build with poppler>=0.69 |
246 |
+ |
247 |
+Remove no longer available Object::memCheck usage (which didn't do anything anyway since DEBUG_MEM was not set); add some const's |
248 |
+ |
249 |
+Differential Revision: https://phabricator.kde.org/D16388 |
250 |
+--- |
251 |
+ filters/karbon/pdf/PdfImport.cpp | 3 --- |
252 |
+ filters/karbon/pdf/SvgOutputDev.cpp | 8 ++++---- |
253 |
+ filters/karbon/pdf/SvgOutputDev.h | 2 +- |
254 |
+ 3 files changed, 5 insertions(+), 8 deletions(-) |
255 |
+ |
256 |
+diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp |
257 |
+index c3e96b0..48b08df 100644 |
258 |
+--- a/filters/karbon/pdf/PdfImport.cpp |
259 |
++++ b/filters/karbon/pdf/PdfImport.cpp |
260 |
+@@ -102,9 +102,6 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt |
261 |
+ delete globalParams; |
262 |
+ globalParams = 0; |
263 |
+ |
264 |
+- // check for memory leaks |
265 |
+- Object::memCheck(stderr); |
266 |
+- |
267 |
+ return KoFilter::OK; |
268 |
+ } |
269 |
+ |
270 |
+diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp |
271 |
+index 931917a..7901317 100644 |
272 |
+--- a/filters/karbon/pdf/SvgOutputDev.cpp |
273 |
++++ b/filters/karbon/pdf/SvgOutputDev.cpp |
274 |
+@@ -212,7 +212,7 @@ QString SvgOutputDev::convertMatrix(const QMatrix &matrix) |
275 |
+ .arg(matrix.dx()) .arg(matrix.dy()); |
276 |
+ } |
277 |
+ |
278 |
+-QString SvgOutputDev::convertMatrix(double * matrix) |
279 |
++QString SvgOutputDev::convertMatrix(const double * matrix) |
280 |
+ { |
281 |
+ return QString("matrix(%1 %2 %3 %4 %5 %6)") |
282 |
+ .arg(matrix[0]).arg(matrix[1]) |
283 |
+@@ -402,7 +402,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s) |
284 |
+ |
285 |
+ QString str; |
286 |
+ |
287 |
+- char * p = s->getCString(); |
288 |
++ const char * p = s->getCString(); |
289 |
+ int len = s->getLength(); |
290 |
+ CharCode code; |
291 |
+ Unicode *u = nullptr; |
292 |
+@@ -429,7 +429,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s) |
293 |
+ double x = state->getCurX(); |
294 |
+ double y = state->getCurY(); |
295 |
+ |
296 |
+- double * ctm = state->getCTM(); |
297 |
++ const double * ctm = state->getCTM(); |
298 |
+ QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]); |
299 |
+ |
300 |
+ QMatrix mirror; |
301 |
+@@ -522,7 +522,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str, |
302 |
+ return; |
303 |
+ } |
304 |
+ |
305 |
+- double * ctm = state->getCTM(); |
306 |
++ const double * ctm = state->getCTM(); |
307 |
+ QMatrix m; |
308 |
+ m.setMatrix(ctm[0] / width, ctm[1] / width, -ctm[2] / height, -ctm[3] / height, ctm[2] + ctm[4], ctm[3] + ctm[5]); |
309 |
+ |
310 |
+diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h |
311 |
+index 85fe55d..2a44908 100644 |
312 |
+--- a/filters/karbon/pdf/SvgOutputDev.h |
313 |
++++ b/filters/karbon/pdf/SvgOutputDev.h |
314 |
+@@ -84,7 +84,7 @@ public: |
315 |
+ private: |
316 |
+ QString convertPath(GfxPath *path); |
317 |
+ QString convertMatrix(const QMatrix &matrix); |
318 |
+- QString convertMatrix(double * matrix); |
319 |
++ QString convertMatrix(const double * matrix); |
320 |
+ QString printFill(); |
321 |
+ QString printStroke(); |
322 |
+ |
323 |
+-- |
324 |
+cgit v1.1 |
325 |
|
326 |
diff --git a/app-office/calligra/files/calligra-3.1.0-poppler-0.71.patch b/app-office/calligra/files/calligra-3.1.0-poppler-0.71.patch |
327 |
new file mode 100644 |
328 |
index 00000000000..6b50e3a42ed |
329 |
--- /dev/null |
330 |
+++ b/app-office/calligra/files/calligra-3.1.0-poppler-0.71.patch |
331 |
@@ -0,0 +1,202 @@ |
332 |
+From fa4c2961b8280456d4c1484565b973d312e0bd1c Mon Sep 17 00:00:00 2001 |
333 |
+From: Albert Astals Cid <aacid@×××.org> |
334 |
+Date: Thu, 25 Oct 2018 23:04:39 +0200 |
335 |
+Subject: Mark the functions as override |
336 |
+ |
337 |
+So when poppler API breaks (as it often does) it stops compiling and |
338 |
+someone has to fix it |
339 |
+ |
340 |
+From 82d68cebf870ac97fd27b626a08c3fb4dd94ea3e Mon Sep 17 00:00:00 2001 |
341 |
+From: Albert Astals Cid <aacid@×××.org> |
342 |
+Date: Thu, 25 Oct 2018 23:06:34 +0200 |
343 |
+Subject: GBool -> bool |
344 |
+ |
345 |
+It was just a typedef in poppler and it'll die in next versions |
346 |
+ |
347 |
+From f099b8e143bbeb1de3c7e89f4764006c3de61ae4 Mon Sep 17 00:00:00 2001 |
348 |
+From: Antonio Rojas <arojas@×××××××××.org> |
349 |
+Date: Fri, 2 Nov 2018 21:23:13 +0100 |
350 |
+Subject: Fix build with poppler 0.71 |
351 |
+ |
352 |
+Port away from removed API |
353 |
+ |
354 |
+diff -u a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp |
355 |
+--- a/filters/karbon/pdf/SvgOutputDev.cpp |
356 |
++++ b/filters/karbon/pdf/SvgOutputDev.cpp |
357 |
+@@ -39,7 +39,7 @@ |
358 |
+ { |
359 |
+ public: |
360 |
+ Private(const QString &fname) |
361 |
+- : svgFile(fname), defs(0), body(0), state(gTrue) |
362 |
++ : svgFile(fname), defs(0), body(0), state(true) |
363 |
+ , brush(Qt::SolidPattern) {} |
364 |
+ |
365 |
+ ~Private() { |
366 |
+@@ -52,7 +52,7 @@ |
367 |
+ QString defsData; |
368 |
+ QTextStream * defs; |
369 |
+ QTextStream * body; |
370 |
+- GBool state; |
371 |
++ bool state; |
372 |
+ QSizeF pageSize; |
373 |
+ QPen pen; |
374 |
+ QBrush brush; |
375 |
+@@ -62,7 +62,7 @@ |
376 |
+ : d(new Private(fileName)) |
377 |
+ { |
378 |
+ if (! d->svgFile.open(QIODevice::WriteOnly)) { |
379 |
+- d->state = gFalse; |
380 |
++ d->state = false; |
381 |
+ return; |
382 |
+ } |
383 |
+ |
384 |
+@@ -75,24 +75,24 @@ |
385 |
+ delete d; |
386 |
+ } |
387 |
+ |
388 |
+-GBool SvgOutputDev::isOk() |
389 |
++bool SvgOutputDev::isOk() |
390 |
+ { |
391 |
+ return d->state; |
392 |
+ } |
393 |
+ |
394 |
+-GBool SvgOutputDev::upsideDown() |
395 |
++bool SvgOutputDev::upsideDown() |
396 |
+ { |
397 |
+- return gTrue; |
398 |
++ return true; |
399 |
+ } |
400 |
+ |
401 |
+-GBool SvgOutputDev::useDrawChar() |
402 |
++bool SvgOutputDev::useDrawChar() |
403 |
+ { |
404 |
+- return gFalse; |
405 |
++ return false; |
406 |
+ } |
407 |
+ |
408 |
+-GBool SvgOutputDev::interpretType3Chars() |
409 |
++bool SvgOutputDev::interpretType3Chars() |
410 |
+ { |
411 |
+- return gFalse; |
412 |
++ return false; |
413 |
+ } |
414 |
+ |
415 |
+ void SvgOutputDev::startPage(int pageNum, GfxState *state, XRef */*xref*/) |
416 |
+@@ -387,7 +387,7 @@ |
417 |
+ return stroke; |
418 |
+ } |
419 |
+ |
420 |
+-void SvgOutputDev::drawString(GfxState * state, GooString * s) |
421 |
++void SvgOutputDev::drawString(GfxState * state, const GooString * s) |
422 |
+ { |
423 |
+ int render = state->getRender(); |
424 |
+ // check for invisible text -- this is used by Acrobat Capture |
425 |
+@@ -476,7 +476,7 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) |
426 |
+ |
427 |
+ void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, |
428 |
+ int width, int height, GfxImageColorMap *colorMap, |
429 |
+- int *maskColors, GBool /*inlineImg*/) |
430 |
++ bool /*interpolate*/, int *maskColors, bool inlineImg) |
431 |
+ { |
432 |
+ ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); |
433 |
+ imgStr->reset(); |
434 |
+@@ -550,7 +549,0 @@ |
435 |
+-void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, |
436 |
+- int width, int height, GfxImageColorMap *colorMap, |
437 |
+- GBool /*interpolate*/, int *maskColors, GBool inlineImg) |
438 |
+-{ |
439 |
+- drawImage(state, ref, str, width, height, colorMap, maskColors, inlineImg); |
440 |
+-} |
441 |
+- |
442 |
+ |
443 |
+--- a/filters/karbon/pdf/SvgOutputDev.h |
444 |
++++ b/filters/karbon/pdf/SvgOutputDev.h |
445 |
+@@ -20,11 +20,6 @@ |
446 |
+ #ifndef SVGOUTPUTDEV_H |
447 |
+ #define SVGOUTPUTDEV_H |
448 |
+ |
449 |
+-// Don't show this warning: it's an issue in poppler |
450 |
+-#ifdef __GNUC__ |
451 |
+-#pragma GCC diagnostic ignored "-Wunused-parameter" |
452 |
+-#endif |
453 |
+- |
454 |
+ #include <poppler/Object.h> |
455 |
+ #include <poppler/OutputDev.h> |
456 |
+ |
457 |
+@@ -44,40 +44,37 @@ |
458 |
+ explicit SvgOutputDev(const QString &fileName); |
459 |
+ virtual ~SvgOutputDev(); |
460 |
+ |
461 |
+- GBool isOk(); |
462 |
++ bool isOk(); |
463 |
+ |
464 |
+- virtual GBool upsideDown(); |
465 |
+- virtual GBool useDrawChar(); |
466 |
+- virtual GBool interpretType3Chars(); |
467 |
+- virtual void startPage(int pageNum, GfxState *state, XRef *xref); |
468 |
+- virtual void endPage(); |
469 |
++ bool upsideDown() override; |
470 |
++ bool useDrawChar() override; |
471 |
++ bool interpretType3Chars() override; |
472 |
++ void startPage(int pageNum, GfxState *state, XRef *xref) override; |
473 |
++ void endPage() override; |
474 |
+ |
475 |
+ // path painting |
476 |
+- virtual void stroke(GfxState * state); |
477 |
+- virtual void fill(GfxState * state); |
478 |
+- virtual void eoFill(GfxState *state); |
479 |
++ void stroke(GfxState * state) override; |
480 |
++ void fill(GfxState * state) override; |
481 |
++ void eoFill(GfxState *state) override; |
482 |
+ |
483 |
+ // text |
484 |
+- virtual void drawString(GfxState * state, GooString * s); |
485 |
++ void drawString(GfxState * state, const GooString * s) override; |
486 |
+ |
487 |
+ // images |
488 |
+- virtual void drawImage(GfxState *state, Object *ref, Stream *str, |
489 |
++ void drawImage(GfxState *state, Object *ref, Stream *str, |
490 |
+ int width, int height, GfxImageColorMap *colorMap, |
491 |
+- int *maskColors, GBool inlineImg); |
492 |
+- virtual void drawImage(GfxState *state, Object *ref, Stream *str, |
493 |
+- int width, int height, GfxImageColorMap *colorMap, |
494 |
+- GBool interpolate, int *maskColors, GBool inlineImg); |
495 |
++ bool interpolate, int *maskColors, bool inlineImg) override; |
496 |
+ |
497 |
+ // styles |
498 |
+- virtual void updateAll(GfxState *state); |
499 |
+- virtual void updateFillColor(GfxState *state); |
500 |
+- virtual void updateStrokeColor(GfxState *state); |
501 |
+- virtual void updateFillOpacity(GfxState *state); |
502 |
+- virtual void updateStrokeOpacity(GfxState *state); |
503 |
+- virtual void updateLineJoin(GfxState *state); |
504 |
+- virtual void updateLineCap(GfxState *state); |
505 |
+- virtual void updateMiterLimit(GfxState *state); |
506 |
+- virtual void updateLineWidth(GfxState *state); |
507 |
++ void updateAll(GfxState *state) override; |
508 |
++ void updateFillColor(GfxState *state) override; |
509 |
++ void updateStrokeColor(GfxState *state) override; |
510 |
++ void updateFillOpacity(GfxState *state) override; |
511 |
++ void updateStrokeOpacity(GfxState *state) override; |
512 |
++ void updateLineJoin(GfxState *state) override; |
513 |
++ void updateLineCap(GfxState *state) override; |
514 |
++ void updateMiterLimit(GfxState *state) override; |
515 |
++ void updateLineWidth(GfxState *state) override; |
516 |
+ |
517 |
+ /// Dumps content to svg file |
518 |
+ void dumpContent(); |
519 |
+--- a/filters/karbon/pdf/PdfImport.cpp |
520 |
++++ b/filters/karbon/pdf/PdfImport.cpp |
521 |
+@@ -88,9 +88,9 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt |
522 |
+ SvgOutputDev * dev = new SvgOutputDev(m_chain->outputFile()); |
523 |
+ if (dev->isOk()) { |
524 |
+ int rotate = 0; |
525 |
+- GBool useMediaBox = gTrue; |
526 |
+- GBool crop = gFalse; |
527 |
+- GBool printing = gFalse; |
528 |
++ bool useMediaBox = true; |
529 |
++ bool crop = false; |
530 |
++ bool printing = false; |
531 |
+ pdfDoc->displayPages(dev, firstPage, lastPage, hDPI, vDPI, rotate, useMediaBox, crop, printing); |
532 |
+ dev->dumpContent(); |
533 |
+ } |