From: Robin Candau Date: Thu, 27 Feb 2025 09:26:53 +0000 (+0100) Subject: tdf#165433 Fix PDF imports with (system) poppler >= 25.02.0 X-Git-Tag: archive/raspbian/4%25.2.1-3+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0e369ad8d504ab7455fa8c4cad7adce3ef87f8fd;p=libreoffice.git tdf#165433 Fix PDF imports with (system) poppler >= 25.02.0 Since poppler 25.02.0, GlobalParams doesn't have a constructor that accepts a nullptr anymore, see upstream poppler b50390f748b59cb0a64b912636ecf6527bd0d12a commit. As such, the data directory location defined for SYSTEM_POPPLER needs to be updated accordingly (when SYSTEM_POPPLER >= 25.02.0), otherwise PDF imports fail with "General Error / General input/output error". Change-Id: I2a60b03a9ae20aab8d36db2a6827f1f3b9618115 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182282 Tested-by: Jenkins Reviewed-by: Xisco Fauli Gbp-Pq: Name poppler-25.02.diff --- diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx index ebed120708c..1cb85e244fb 100644 --- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx @@ -110,7 +110,11 @@ int main(int argc, char **argv) /* Get data directory location */ #ifdef SYSTEM_POPPLER +#if POPPLER_CHECK_VERSION(25, 2, 0) + const std::string datadir = ""; +#else const char* datadir = nullptr; +#endif #else /* Creates an absolute path to the poppler_data directory, by taking the path * to the xpdfimport executable (provided in argv[0], and concatenating a