diff options
Diffstat (limited to 'tdefile-plugins/dependencies/poppler-tqt/poppler-private.h')
-rw-r--r-- | tdefile-plugins/dependencies/poppler-tqt/poppler-private.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/tdefile-plugins/dependencies/poppler-tqt/poppler-private.h b/tdefile-plugins/dependencies/poppler-tqt/poppler-private.h index 33b8cfc3..d3487ef1 100644 --- a/tdefile-plugins/dependencies/poppler-tqt/poppler-private.h +++ b/tdefile-plugins/dependencies/poppler-tqt/poppler-private.h @@ -29,39 +29,55 @@ #include <Object.h> #include <PDFDoc.h> #include <FontInfo.h> + +#if defined(HAVE_SPLASH) +# undef HAVE_SPLASH +#endif + #if defined(HAVE_SPLASH) #include <SplashOutputDev.h> #else class SplashOutputDev; #endif -#if defined(HAVE_POPPLER_064) +#if (POPPLER_VERSION_C >= 64000) #define CONST_064 const #else #define CONST_064 #endif -#if defined(HAVE_POPPLER_071) +#if (POPPLER_VERSION_C >= 71000) #define GBool bool #define gTrue true #define gFalse false #endif -#if defined(HAVE_POPPLER_072) +#if (POPPLER_VERSION_C >= 72000) #define GOO_GET_CSTR c_str #else #define GOO_GET_CSTR getCString #endif -#if defined(HAVE_POPPLER_076) +#if (POPPLER_VERSION_C >= 76000) #include <vector> class OutlineItem; #define OUTLINE_ITEMS_TYPE const std::vector<OutlineItem*> #define OUTLINE_ITEMS_LENGTH(goo) goo->size() +# if (POPPLER_VERSION_C >= 82000) #define FONTS_LIST_TYPE std::vector<::FontInfo*> +#define FONTS_LIST_LENGTH(goo) goo.size() +#define FONTS_LIST_IS_EMPTY(goo) goo.empty() +#define FONTS_LIST_GET(goo, i) goo[i] +# else +#define FONTS_LIST_TYPE std::vector<::FontInfo*>* #define FONTS_LIST_LENGTH(goo) goo->size() +#define FONTS_LIST_IS_EMPTY(goo) goo->empty() +#define FONTS_LIST_GET(goo, i) (*goo)[i] +# endif #define FIND_PAGE_ARGS(ref) ref #else #define OUTLINE_ITEMS_TYPE CONST_064 GooList #define OUTLINE_ITEMS_LENGTH(goo) goo->getLength() -#define FONTS_LIST_TYPE GooList +#define FONTS_LIST_TYPE GooList* #define FONTS_LIST_LENGTH(goo) goo->getLength() +#define FONTS_LIST_IS_EMPTY(goo) (goo == NULL || goo->getLength() == 0) +#define FONTS_LIST_GET(goo, i) (::FontInfo*)goo->get(i) #define FIND_PAGE_ARGS(ref) ref.num, ref.gen #endif @@ -88,7 +104,11 @@ class LinkDestinationData { class DocumentData { public: +# if (POPPLER_VERSION_C >= 22003000) + DocumentData(std::unique_ptr<GooString> &&filePath, const std::optional<GooString> &password) : doc(std::move(filePath), password), m_fontInfoScanner(0), m_outputDev(0) {} +# else DocumentData(GooString *filePath, GooString *password) : doc(filePath,password), m_fontInfoScanner(0), m_outputDev(0) {} +# endif ~DocumentData() { |