diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-09-11 12:09:40 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-12 12:50:18 +0200 |
commit | bc1b7491436146c3c4b2b69a46bd0cd37bbbecce (patch) | |
tree | f7a9aff4064a0dc5ae84a2ffaa264e483da62d60 /sdext | |
parent | 20f064c1d4d2788edbd4ed7303cf1fcc4f817be4 (diff) |
allow build with poppler <= 0.71
Change-Id: I359c8259ae402f9f22be392c4ab4a23d31a17b4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121937
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 9cd2c55cee21..5d6ce90bc44c 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -435,7 +435,12 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, const GfxState* st #if POPPLER_CHECK_VERSION(20, 12, 0) std::string familyName = gfxFont->getNameWithoutSubsetTag(); #else +#if POPPLER_CHECK_VERSION(0, 71, 0) // GooString::toStr() std::string familyName = gfxFont->getName()->toStr(); +#else + const GooString* gooString = gfxFont->getName(); + std::string familyName = std::string(gooString->getCString(), gooString->getLength()); +#endif if (familyName.length() > 7 && familyName.at(6) == '+') { familyName = familyName.substr(7); |