summaryrefslogtreecommitdiff
path: root/user/calligra/poppler.patch
blob: 458a315146e08557d636863d7423dbad1cd4c684 (plain) (blame)
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
From a615718222f8ad3bba4b88fad640382e517f7dd9 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Wed, 24 Oct 2018 08:28:00 +0200
Subject: Fix build with poppler>=0.69

Remove no longer available Object::memCheck usage (which didn't do anything anyway since DEBUG_MEM was not set); add some const's

Differential Revision: https://phabricator.kde.org/D16388
---
 filters/karbon/pdf/PdfImport.cpp    | 3 ---
 filters/karbon/pdf/SvgOutputDev.cpp | 8 ++++----
 filters/karbon/pdf/SvgOutputDev.h   | 2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp
index c3e96b0..48b08df 100644
--- a/filters/karbon/pdf/PdfImport.cpp
+++ b/filters/karbon/pdf/PdfImport.cpp
@@ -102,9 +102,6 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt
     delete globalParams;
     globalParams = 0;
 
-    // check for memory leaks
-    Object::memCheck(stderr);
-
     return KoFilter::OK;
 }
 
diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp
index 931917a..7901317 100644
--- a/filters/karbon/pdf/SvgOutputDev.cpp
+++ b/filters/karbon/pdf/SvgOutputDev.cpp
@@ -212,7 +212,7 @@ QString SvgOutputDev::convertMatrix(const QMatrix &matrix)
            .arg(matrix.dx()) .arg(matrix.dy());
 }
 
-QString SvgOutputDev::convertMatrix(double * matrix)
+QString SvgOutputDev::convertMatrix(const double * matrix)
 {
     return QString("matrix(%1 %2 %3 %4 %5 %6)")
            .arg(matrix[0]).arg(matrix[1])
@@ -402,7 +402,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s)
 
     QString str;
 
-    char * p = s->getCString();
+    const char * p = s->getCString();
     int len = s->getLength();
     CharCode code;
     Unicode *u = nullptr;
@@ -429,7 +429,7 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s)
     double x = state->getCurX();
     double y = state->getCurY();
 
-    double * ctm = state->getCTM();
+    const double * ctm = state->getCTM();
     QMatrix transform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
 
     QMatrix mirror;
@@ -522,7 +522,7 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str,
         return;
     }
 
-    double * ctm = state->getCTM();
+    const double * ctm = state->getCTM();
     QMatrix m;
     m.setMatrix(ctm[0] / width, ctm[1] / width, -ctm[2] / height, -ctm[3] / height, ctm[2] + ctm[4], ctm[3] + ctm[5]);
 
diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h
index 85fe55d..2a44908 100644
--- a/filters/karbon/pdf/SvgOutputDev.h
+++ b/filters/karbon/pdf/SvgOutputDev.h
@@ -84,7 +84,7 @@ public:
 private:
     QString convertPath(GfxPath *path);
     QString convertMatrix(const QMatrix &matrix);
-    QString convertMatrix(double * matrix);
+    QString convertMatrix(const double * matrix);
     QString printFill();
     QString printStroke();
 
-- 
cgit v0.11.2