summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorormorph <roma251078@mail.ru>2024-02-18 20:30:03 +0300
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-02-19 21:57:05 +0900
commitdf6124db4d9366cc339baa8ab36417b7da549e27 (patch)
treeb1350491ae8e4dea1411622ec18db7541574bcc8
parent490c2b6a6ae52357b3a0a38db277237c59cdab85 (diff)
downloadtdegraphics-df6124db4d9366cc339baa8ab36417b7da549e27.tar.gz
tdegraphics-df6124db4d9366cc339baa8ab36417b7da549e27.zip
Added support for poppler-24.02
Solution to problem #85 Signed-off-by: ormorph <roma251078@mail.ru> (cherry picked from commit 6b9d7271f32bc029b9a5e7cf636f1c52fd55c854)
-rw-r--r--config.h.cmake1
-rw-r--r--tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake2
-rw-r--r--tdefile-plugins/dependencies/poppler-tqt/poppler-private.cpp6
3 files changed, 8 insertions, 1 deletions
diff --git a/config.h.cmake b/config.h.cmake
index fea46aaf..5a1f1661 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -1,6 +1,7 @@
#cmakedefine VERSION "@VERSION@"
// poppler-tqt
+#cmakedefine HAVE_POPPLER_2402
#cmakedefine HAVE_POPPLER_2203
#cmakedefine HAVE_POPPLER_2112
#cmakedefine HAVE_POPPLER_2111
diff --git a/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake b/tdefile-plugins/dependencies/poppler-tqt/ConfigureChecks.cmake
index def19529..383ebdfa 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 21.11 21.12 22.03 )
+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 21.12 22.03 24.02 )
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-private.cpp b/tdefile-plugins/dependencies/poppler-tqt/poppler-private.cpp
index 059bf1c0..2f5e75ba 100644
--- a/tdefile-plugins/dependencies/poppler-tqt/poppler-private.cpp
+++ b/tdefile-plugins/dependencies/poppler-tqt/poppler-private.cpp
@@ -101,9 +101,15 @@ void DocumentData::addTocChildren( TQDomDocument * docSyn, TQDomNode * parent, O
// 1. create element using outlineItem's title as tagName
TQString name;
+#ifdef HAVE_POPPLER_2402
+ const std::vector<Unicode> &uVec = outlineItem->getTitle();
+ name = unicodeToTQString( uVec.data(), uVec.size() );
+#else
CONST_064 Unicode * uniChar = outlineItem->getTitle();
int titleLength = outlineItem->getTitleLength();
name = unicodeToTQString(uniChar, titleLength);
+#endif
+
if ( name.isEmpty() )
continue;