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
|
Revert of upstream: https://gitlab.freedesktop.org/poppler/poppler/-/commit/d5ea5a24124badf2b32a7d08dd2c06a4a40f93fb
gcc 7.5.0 says:
workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In member function ‘std::optional<GfxFontLoc> GfxFont::locateFont(XRef*, PSOutputDev*)’:
/home/taichi/libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:660:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
return fontLoc;
^~~~~~~
workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:671:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
return fontLoc;
^~~~~~~
workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:680:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
return fontLoc;
^~~~~~~
libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:711:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
return fontLoc;
^~~~~~~
workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:723:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
return fontLoc;
^~~~~~~
workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:752:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
return fontLoc;
^~~~~~~
workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In static member function ‘static std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString*, bool)’:
workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:814:12: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
return fontLoc;
diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
index cc2ce038..b0d0d610 100644
--- a/poppler/GfxFont.cc
+++ b/poppler/GfxFont.cc
@@ -657,7 +657,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
fontLoc.locType = gfxFontLocEmbedded;
fontLoc.fontType = type;
fontLoc.embFontID = embFontID;
- return fontLoc;
+ return std::move(fontLoc); // std::move only required to please g++-7
}
}
}
@@ -668,7 +668,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
fontLoc.locType = gfxFontLocResident;
fontLoc.fontType = fontType1;
fontLoc.path = *name;
- return fontLoc;
+ return std::move(fontLoc); // std::move only required to please g++-7
}
//----- PS resident Base-14 font
@@ -677,7 +677,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
fontLoc.locType = gfxFontLocResident;
fontLoc.fontType = fontType1;
fontLoc.path = ((Gfx8BitFont *)this)->base14->base14Name;
- return fontLoc;
+ return std::move(fontLoc); // std::move only required to please g++-7
}
//----- external font file (fontFile, fontDir)
@@ -708,7 +708,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
fontLoc.fontType = fontCIDType2;
fontLoc.setPath(path);
fontLoc.fontNum = fontNum;
- return fontLoc;
+ return std::move(fontLoc); // std::move only required to please g++-7
}
} else {
GfxFontLoc fontLoc;
@@ -720,7 +720,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
fontLoc.fontType = fontType1;
fontLoc.fontNum = fontNum;
}
- return fontLoc;
+ return std::move(fontLoc); // std::move only required to please g++-7
}
delete path;
}
@@ -749,7 +749,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
fontLoc.fontType = fontType1;
fontLoc.path = substName;
fontLoc.substIdx = substIdx;
- return fontLoc;
+ return std::move(fontLoc); // std::move only required to please g++-7
} else {
path = globalParams->findFontFile(substName);
if (path) {
@@ -811,7 +811,7 @@ std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString *path, bool cid)
fontLoc.locType = gfxFontLocExternal;
fontLoc.fontType = fontType;
fontLoc.setPath(path);
- return fontLoc;
+ return std::move(fontLoc); // std::move only required to please g++-7
}
std::optional<std::vector<unsigned char>> GfxFont::readEmbFontFile(XRef *xref)
|