diff options
author | Slávek Banko <[email protected]> | 2021-12-15 17:30:53 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2021-12-16 14:59:20 +0100 |
commit | 544868bcc9aeaf703d4347b9726930a4e091c83e (patch) | |
tree | efd2096e22810e7260a6c867cb0850de6b19b78b /tdefile-plugins | |
parent | 2434371bdab3126bdf218b0837c28e3c7b280ae6 (diff) | |
download | tdegraphics-544868bcc9aeaf703d4347b9726930a4e091c83e.tar.gz tdegraphics-544868bcc9aeaf703d4347b9726930a4e091c83e.zip |
Add support for Poppler >= 21.11.
This resolves issue #36.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 9cde144216b331f0eef2ce2c3800d8356109ccc7)
Diffstat (limited to 'tdefile-plugins')
-rw-r--r-- | tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake | 2 | ||||
-rw-r--r-- | tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake b/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake index 52f08a4c..ceeaf409 100644 --- a/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake +++ b/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake @@ -24,7 +24,7 @@ check_cxx_source_compiles(" HAVE_POPPLER_030 ) tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) -foreach( _poppler_ver 0.58 0.64 0.70 0.71 0.72 0.76 0.82 0.83 0.86 21.08 ) +foreach( _poppler_ver 0.58 0.64 0.70 0.71 0.72 0.76 0.82 0.83 0.86 21.08 21.11 ) string( REPLACE "." "" _poppler_str "${_poppler_ver}" ) if( NOT DEFINED HAVE_POPPLER_${_poppler_str} ) message( STATUS "Performing Test HAVE_POPPLER_${_poppler_str}" ) 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; |