1 Revert of upstream: https://gitlab.freedesktop.org/poppler/poppler/-/commit/d5ea5a24124badf2b32a7d08dd2c06a4a40f93fb
5 workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In member function ‘std::optional<GfxFontLoc> GfxFont::locateFont(XRef*, PSOutputDev*)’:
6 /home/taichi/libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:660:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
9 workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:671:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
12 workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:680:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
15 libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:711:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
18 workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:723:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
21 workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:752:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
24 workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In static member function ‘static std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString*, bool)’:
25 workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:814:12: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
28 diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
29 index cc2ce038..b0d0d610 100644
30 --- a/poppler/GfxFont.cc
31 +++ b/poppler/GfxFont.cc
32 @@ -657,7 +657,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
33 fontLoc.locType = gfxFontLocEmbedded;
34 fontLoc.fontType = type;
35 fontLoc.embFontID = embFontID;
37 + return std::move(fontLoc); // std::move only required to please g++-7
41 @@ -668,7 +668,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
42 fontLoc.locType = gfxFontLocResident;
43 fontLoc.fontType = fontType1;
46 + return std::move(fontLoc); // std::move only required to please g++-7
49 //----- PS resident Base-14 font
50 @@ -677,7 +677,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
51 fontLoc.locType = gfxFontLocResident;
52 fontLoc.fontType = fontType1;
53 fontLoc.path = ((Gfx8BitFont *)this)->base14->base14Name;
55 + return std::move(fontLoc); // std::move only required to please g++-7
58 //----- external font file (fontFile, fontDir)
59 @@ -708,7 +708,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
60 fontLoc.fontType = fontCIDType2;
61 fontLoc.setPath(path);
62 fontLoc.fontNum = fontNum;
64 + return std::move(fontLoc); // std::move only required to please g++-7
68 @@ -720,7 +720,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
69 fontLoc.fontType = fontType1;
70 fontLoc.fontNum = fontNum;
73 + return std::move(fontLoc); // std::move only required to please g++-7
77 @@ -749,7 +749,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
78 fontLoc.fontType = fontType1;
79 fontLoc.path = substName;
80 fontLoc.substIdx = substIdx;
82 + return std::move(fontLoc); // std::move only required to please g++-7
84 path = globalParams->findFontFile(substName);
86 @@ -811,7 +811,7 @@ std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString *path, bool cid)
87 fontLoc.locType = gfxFontLocExternal;
88 fontLoc.fontType = fontType;
89 fontLoc.setPath(path);
91 + return std::move(fontLoc); // std::move only required to please g++-7
94 std::optional<std::vector<unsigned char>> GfxFont::readEmbFontFile(XRef *xref)