[Libreoffice-commits] core.git: sdext/source

Rico Tzschichholz (via logerrit) logerrit at kemper.freedesktop.org
Sun Sep 12 10:50:51 UTC 2021


 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit bc1b7491436146c3c4b2b69a46bd0cd37bbbecce
Author:     Rico Tzschichholz <ricotz at ubuntu.com>
AuthorDate: Sat Sep 11 12:09:40 2021 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Sep 12 12:50:18 2021 +0200

    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 at redhat.com>

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);


More information about the Libreoffice-commits mailing list