summaryrefslogtreecommitdiff
path: root/user/calligra/poppler2.patch
blob: 6f18c070fe0e4249c71d315f91732ed51c0a7eba (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
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
From fa4c2961b8280456d4c1484565b973d312e0bd1c Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Thu, 25 Oct 2018 23:04:39 +0200
Subject: Mark the functions as override

So when poppler API breaks (as it often does) it stops compiling and
someone has to fix it
---
 filters/karbon/pdf/SvgOutputDev.cpp | 13 +++--------
 filters/karbon/pdf/SvgOutputDev.h   | 43 +++++++++++++++++--------------------
 2 files changed, 23 insertions(+), 33 deletions(-)

diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp
index 5692824..1d07f16 100644
--- a/filters/karbon/pdf/SvgOutputDev.cpp
+++ b/filters/karbon/pdf/SvgOutputDev.cpp
@@ -387,7 +387,7 @@ QString SvgOutputDev::printStroke()
     return stroke;
 }
 
-void SvgOutputDev::drawString(GfxState * state, GooString * s)
+void SvgOutputDev::drawString(GfxState * state, const GooString * s)
 {
     int render = state->getRender();
     // check for invisible text -- this is used by Acrobat Capture
@@ -478,9 +478,9 @@ void SvgOutputDev::drawString(GfxState * state, GooString * s)
     *d->body << "</text>" << endl;
 }
 
-void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str,
+void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
                              int width, int height, GfxImageColorMap *colorMap,
-                             int *maskColors, GBool /*inlineImg*/)
+                             GBool /*interpolate*/, int *maskColors, GBool inlineImg)
 {
     ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
     imgStr->reset();
@@ -547,10 +547,3 @@ void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str,
     delete imgStr;
 }
 
-void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
-                             int width, int height, GfxImageColorMap *colorMap,
-                             GBool /*interpolate*/, int *maskColors, GBool inlineImg)
-{
-    drawImage(state, ref, str, width, height, colorMap, maskColors, inlineImg);
-}
-
diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h
index 2a44908..422027c 100644
--- a/filters/karbon/pdf/SvgOutputDev.h
+++ b/filters/karbon/pdf/SvgOutputDev.h
@@ -46,38 +46,35 @@ public:
 
     GBool isOk();
 
-    virtual GBool upsideDown();
-    virtual GBool useDrawChar();
-    virtual GBool interpretType3Chars();
-    virtual void startPage(int pageNum, GfxState *state, XRef *xref);
-    virtual void endPage();
+    GBool upsideDown() override;
+    GBool useDrawChar() override;
+    GBool interpretType3Chars() override;
+    void startPage(int pageNum, GfxState *state, XRef *xref) override;
+    void endPage() override;
 
     // path painting
-    virtual void stroke(GfxState * state);
-    virtual void fill(GfxState * state);
-    virtual void eoFill(GfxState *state);
+    void stroke(GfxState * state) override;
+    void fill(GfxState * state) override;
+    void eoFill(GfxState *state) override;
 
     // text
-    virtual void drawString(GfxState * state, GooString * s);
+    void drawString(GfxState * state, const GooString * s) override;
 
     // images
-    virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+    void drawImage(GfxState *state, Object *ref, Stream *str,
                            int width, int height, GfxImageColorMap *colorMap,
-                           int *maskColors, GBool inlineImg);
-    virtual void drawImage(GfxState *state, Object *ref, Stream *str,
-                           int width, int height, GfxImageColorMap *colorMap,
-                           GBool interpolate, int *maskColors, GBool inlineImg);
+                           GBool interpolate, int *maskColors, GBool inlineImg) override;
 
     // styles
-    virtual void updateAll(GfxState *state);
-    virtual void updateFillColor(GfxState *state);
-    virtual void updateStrokeColor(GfxState *state);
-    virtual void updateFillOpacity(GfxState *state);
-    virtual void updateStrokeOpacity(GfxState *state);
-    virtual void updateLineJoin(GfxState *state);
-    virtual void updateLineCap(GfxState *state);
-    virtual void updateMiterLimit(GfxState *state);
-    virtual void updateLineWidth(GfxState *state);
+    void updateAll(GfxState *state) override;
+    void updateFillColor(GfxState *state) override;
+    void updateStrokeColor(GfxState *state) override;
+    void updateFillOpacity(GfxState *state) override;
+    void updateStrokeOpacity(GfxState *state) override;
+    void updateLineJoin(GfxState *state) override;
+    void updateLineCap(GfxState *state) override;
+    void updateMiterLimit(GfxState *state) override;
+    void updateLineWidth(GfxState *state) override;
 
     /// Dumps content to svg file
     void dumpContent();
-- 
cgit v1.1