r24304 by jghali - Fix build with old poppler versions

scribus-commit scribus-commit at lists.scribus.net
Thu Dec 3 16:07:01 UTC 2020


Author: jghali
Date: Thu Dec  3 16:07:01 2020
New Revision: 24304

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24304
Log:
Fix build with old poppler versions

Modified:
    trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24304&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	Thu Dec  3 16:07:01 2020
@@ -791,19 +791,15 @@
 								if (names.isDict())
 								{
 #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-									std::unique_ptr<LinkAction> linkAction;
-									linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
+									std::unique_ptr<LinkAction> linkActionUPtr = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
+									LinkAction *linkAction = linkActionUPtr.get();
 #else
 									LinkAction *linkAction = nullptr;
 									linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
 #endif
-									if (linkAction && (linkAction.get()->getKind() == actionJavaScript))
+									if (linkAction && (linkAction->getKind() == actionJavaScript))
 									{
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
-										LinkJavaScript *jsa = (LinkJavaScript*) linkAction.get();
-#else
 										LinkJavaScript *jsa = (LinkJavaScript*) linkAction;
-#endif
 										if (jsa->isOk())
 										{
 											QString script = UnicodeParsedString(jsa->getScript());




More information about the scribus-commit mailing list