diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2024-02-21 10:35:52 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2024-02-21 13:15:46 +0100 |
commit | 459c09ca534951e160dddafa22ef9dde1574baac (patch) | |
tree | a4323fb61cce205dede13cc96c36c8b4ee0027f0 /tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp | |
parent | df6124db4d9366cc339baa8ab36417b7da549e27 (diff) | |
download | tdegraphics-459c09ca534951e160dddafa22ef9dde1574baac.tar.gz tdegraphics-459c09ca534951e160dddafa22ef9dde1574baac.zip |
Simplify poppler version definitions.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 108c4a3a4ae4cdda98e46741c83666b3a7e13d03)
Diffstat (limited to 'tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp')
-rw-r--r-- | tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp b/tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp index 9b4f6208..54f198e9 100644 --- a/tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp +++ b/tdefile-plugins/dependencies/poppler-tqt/poppler-page.cpp @@ -129,7 +129,7 @@ TQString Page::getText(const Rectangle &r) const TQString result; ::Page *p; -#if defined(HAVE_POPPLER_058) || defined(HAVE_POPPLER_030) || defined(HAVE_POPPLER_020) +#if (POPPLER_VERSION_C >= 20000) output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse); #else output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse); @@ -164,7 +164,7 @@ TQValueList<TextBox*> Page::textList() const TQValueList<TextBox*> output_list; -#if defined(HAVE_POPPLER_058) || defined(HAVE_POPPLER_030) || defined(HAVE_POPPLER_020) +#if (POPPLER_VERSION_C >= 20000) output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse); #else output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse); @@ -173,7 +173,7 @@ 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) +# if (POPPLER_VERSION_C >= 21011000) std::unique_ptr<TextWordList> word_list = output_dev->makeWordList(); # else TextWordList *word_list = output_dev->makeWordList(); @@ -197,7 +197,7 @@ TQValueList<TextBox*> Page::textList() const output_list.append(text_box); } -# if !defined(HAVE_POPPLER_2111) +# if (POPPLER_VERSION_C < 21011000) delete word_list; # endif delete output_dev; @@ -211,14 +211,14 @@ PageTransition *Page::getTransition() const { Object o; PageTransitionParams params; -# if defined(HAVE_POPPLER_058) +# if (POPPLER_VERSION_C >= 58000) o = data->doc->data->doc.getCatalog()->getPage(data->index + 1)->getTrans(); # else data->doc->data->doc.getCatalog()->getPage(data->index + 1)->getTrans(&o); # endif params.dictObj = &o; data->transition = new PageTransition(params); -# if !defined(HAVE_POPPLER_058) +# if (POPPLER_VERSION_C < 58000) o.free(); # endif } |