[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sdext/source
Kevin Suo (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 16 08:16:23 UTC 2021
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 4137f07b9b2a26faeafec4f5ee815f16adcec396
Author: Kevin Suo <suokunlong at 126.com>
AuthorDate: Thu Jul 15 12:56:43 2021 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 16 10:15:47 2021 +0200
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 at debian.org>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 07087041610ca8351d764c838ae07fa58f3bdf9e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118929
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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();
More information about the Libreoffice-commits
mailing list