diff options
author | Kevin Suo <suokunlong@126.com> | 2021-07-15 12:56:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-16 09:06:47 +0200 |
commit | 07087041610ca8351d764c838ae07fa58f3bdf9e (patch) | |
tree | c9aa7dfb46eb48d9b52886613d4c4f0d132ba337 /sdext | |
parent | 44db9f08077f388306ef0bf7277c93a1e5cd89b8 (diff) |
restore compatibility with older popplers
with poppler 20.09:
/home/rene/LibreOffice/git/libreoffice-7-2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx: In member function 'int
pdfi::PDFOutDev::parseFont(long long int, GfxFont*, GfxState*) const':
/home/rene/LibreOffice/git/libreoffice-7-2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx:438:39: error: 'class
GfxFont' has no member named 'getNameWithoutSubsetTag'
https://www.google.com/search?q=getNameWithoutSubsetTag&oq=getNameWithoutSubsetTag&aqs=chrome..69i57.784j0j7&sourceid=chrome&ie=UTF-8 suggests it was added in 20.12
Change-Id: I4eacd2d740cb689ff9b3c6cab59376e01b1ba162
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118977
Tested-by: René Engelhard <rene@debian.org>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index d8b73f621a09..bc313f76ecc4 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -432,10 +432,15 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state ) FontAttributes aNewFont; int nSize = 0; -#if POPPLER_CHECK_VERSION(0, 64, 0) - const -#endif +#if POPPLER_CHECK_VERSION(20, 12, 0) std::string familyName = gfxFont->getNameWithoutSubsetTag(); +#else + std::string familyName = gfxFont->getName()->toStr(); + if (familyName.length() > 7 && familyName.at(6) == '+') + { + familyName = familyName.substr(7); + } +#endif if( familyName != "" ) { aNewFont.familyName.clear(); |