summaryrefslogtreecommitdiffstats
path: root/tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-12-15 17:30:53 +0100
committerSlávek Banko <slavek.banko@axis.cz>2021-12-15 17:31:57 +0100
commit9cde144216b331f0eef2ce2c3800d8356109ccc7 (patch)
treea27574195408bec5d5e0a27df6a586355faca9c4 /tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp
parent3658897e9536c30bb06c221d18839a1b8edb9085 (diff)
downloadtdegraphics-9cde144216b331f0eef2ce2c3800d8356109ccc7.tar.gz
tdegraphics-9cde144216b331f0eef2ce2c3800d8356109ccc7.zip
Add support for Poppler >= 21.11.
This resolves issue #36. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp')
-rw-r--r--tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp b/tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp
index 426b750f..9b4f6208 100644
--- a/tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp
+++ b/tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp
@@ -173,7 +173,11 @@ TQValueList<TextBox*> Page::textList() const
data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, 72, 72,
0, false, false, false, -1, -1, -1, -1);
+# if defined(HAVE_POPPLER_2111)
+ std::unique_ptr<TextWordList> word_list = output_dev->makeWordList();
+# else
TextWordList *word_list = output_dev->makeWordList();
+# endif
if (!word_list) {
delete output_dev;
@@ -193,7 +197,9 @@ TQValueList<TextBox*> Page::textList() const
output_list.append(text_box);
}
+# if !defined(HAVE_POPPLER_2111)
delete word_list;
+# endif
delete output_dev;
return output_list;