node-poppler 5.1.4 → 5.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/package.json +10 -10
  3. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Annot.h +0 -1783
  4. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/AnnotStampImageHelper.h +0 -68
  5. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Array.h +0 -92
  6. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/BBoxOutputDev.h +0 -54
  7. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CMap.h +0 -128
  8. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CachedFile.h +0 -149
  9. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoFontEngine.h +0 -122
  10. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoOutputDev.h +0 -468
  11. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoRescaleBox.h +0 -60
  12. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Catalog.h +0 -318
  13. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CertificateInfo.h +0 -129
  14. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharCodeToUnicode.h +0 -143
  15. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharTypes.h +0 -24
  16. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlCachedFile.h +0 -37
  17. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlPDFDocBuilder.h +0 -32
  18. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/DateInfo.h +0 -44
  19. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Decrypt.h +0 -147
  20. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Dict.h +0 -126
  21. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Error.h +0 -59
  22. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ErrorCodes.h +0 -54
  23. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FDPDFDocBuilder.h +0 -36
  24. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FILECacheLoader.h +0 -34
  25. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FileSpec.h +0 -85
  26. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontEncodingTables.h +0 -20
  27. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontInfo.h +0 -109
  28. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Form.h +0 -734
  29. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Function.h +0 -251
  30. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Gfx.h +0 -373
  31. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxFont.h +0 -466
  32. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState.h +0 -1759
  33. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState_helpers.h +0 -90
  34. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GlobalParams.h +0 -221
  35. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Hints.h +0 -91
  36. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JArithmeticDecoder.h +0 -131
  37. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JBIG2Stream.h +0 -130
  38. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JPEG2000Stream.h +0 -54
  39. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JSInfo.h +0 -65
  40. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Lexer.h +0 -113
  41. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Linearization.h +0 -43
  42. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Link.h +0 -566
  43. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/LocalPDFDocBuilder.h +0 -32
  44. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/MarkedContentOutputDev.h +0 -132
  45. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Movie.h +0 -123
  46. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToCharCode.h +0 -52
  47. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToUnicodeTable.h +0 -4300
  48. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Object.h +0 -678
  49. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OptionalContent.h +0 -117
  50. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Outline.h +0 -122
  51. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OutputDev.h +0 -379
  52. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDoc.h +0 -419
  53. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocBuilder.h +0 -47
  54. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocEncoding.h +0 -43
  55. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocFactory.h +0 -58
  56. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSOutputDev.h +0 -549
  57. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSTokenizer.h +0 -47
  58. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Page.h +0 -273
  59. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PageTransition.h +0 -105
  60. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Parser.h +0 -76
  61. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PopplerCache.h +0 -65
  62. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PreScanOutputDev.h +0 -148
  63. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ProfileData.h +0 -35
  64. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Rendition.h +0 -164
  65. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SecurityHandler.h +0 -131
  66. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Sound.h +0 -82
  67. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SplashOutputDev.h +0 -413
  68. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream-CCITT.h +0 -334
  69. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream.h +0 -1504
  70. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructElement.h +0 -406
  71. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructTreeRoot.h +0 -89
  72. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/TextOutputDev.h +0 -918
  73. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UTF.h +0 -112
  74. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCClassTables.h +0 -983
  75. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCompTables.h +0 -328
  76. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeDecompTables.h +0 -7181
  77. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMap.h +0 -128
  78. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapFuncs.h +0 -35
  79. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapTables.h +0 -84
  80. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeTypeTable.h +0 -49
  81. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ViewerPreferences.h +0 -87
  82. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/XRef.h +0 -325
  83. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-destination.h +0 -69
  84. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-document.h +0 -135
  85. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-embedded-file.h +0 -55
  86. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font-private.h +0 -68
  87. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font.h +0 -95
  88. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-global.h +0 -132
  89. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-image.h +0 -74
  90. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-renderer.h +0 -77
  91. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-transition.h +0 -85
  92. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page.h +0 -225
  93. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-rectangle.h +0 -66
  94. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-toc.h +0 -72
  95. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-version.h +0 -39
  96. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler_cpp_export.h +0 -42
  97. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiBase.h +0 -66
  98. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiEncodings.h +0 -43
  99. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiIdentifier.h +0 -52
  100. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiTrueType.h +0 -190
  101. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1.h +0 -70
  102. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1C.h +0 -263
  103. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-action.h +0 -454
  104. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-annot.h +0 -333
  105. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-attachment.h +0 -123
  106. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-date.h +0 -32
  107. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-document.h +0 -541
  108. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-enums.h +0 -191
  109. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-features.h +0 -88
  110. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-form-field.h +0 -254
  111. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-layer.h +0 -50
  112. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-macros.h +0 -42
  113. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-media.h +0 -80
  114. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-movie.h +0 -81
  115. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-page.h +0 -424
  116. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-structure-element.h +0 -425
  117. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler.h +0 -259
  118. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooCheckedOps.h +0 -116
  119. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooLikely.h +0 -22
  120. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooString.h +0 -262
  121. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooTimer.h +0 -59
  122. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/ImgWriter.h +0 -39
  123. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/JpegWriter.h +0 -69
  124. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/PNGWriter.h +0 -68
  125. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/TiffWriter.h +0 -70
  126. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gdir.h +0 -96
  127. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gfile.h +0 -156
  128. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gmem.h +0 -201
  129. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/grandom.h +0 -21
  130. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gstrtod.h +0 -45
  131. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler-config.h +0 -155
  132. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler_private_export.h +0 -42
  133. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/Splash.h +0 -336
  134. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashBitmap.h +0 -127
  135. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashClip.h +0 -131
  136. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashErrorCodes.h +0 -50
  137. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFont.h +0 -71
  138. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontEngine.h +0 -72
  139. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontFile.h +0 -64
  140. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFont.h +0 -116
  141. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontEngine.h +0 -89
  142. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFile.h +0 -98
  143. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFileID.h +0 -40
  144. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashGlyphBitmap.h +0 -23
  145. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashMath.h +0 -215
  146. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPath.h +0 -138
  147. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPattern.h +0 -107
  148. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashScreen.h +0 -87
  149. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashState.h +0 -132
  150. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashTypes.h +0 -248
  151. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPath.h +0 -95
  152. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPathScanner.h +0 -136
  153. package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-cpp.pc +0 -12
  154. package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-glib.pc +0 -12
  155. package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler.pc +0 -10
  156. package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-cpp.lib +0 -0
  157. package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-glib.lib +0 -0
  158. package/src/lib/win32/poppler-22.04.0/Library/lib/poppler.lib +0 -0
  159. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfattach.1 +0 -60
  160. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfdetach.1 +0 -94
  161. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdffonts.1 +0 -128
  162. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfimages.1 +0 -265
  163. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfinfo.1 +0 -198
  164. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfseparate.1 +0 -60
  165. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftocairo.1 +0 -346
  166. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftohtml.1 +0 -118
  167. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftoppm.1 +0 -230
  168. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftops.1 +0 -267
  169. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftotext.1 +0 -157
  170. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfunite.1 +0 -43
  171. package/src/lib/win32/poppler-22.04.0/share/poppler/CMakeLists.txt +0 -309
  172. package/src/lib/win32/poppler-22.04.0/share/poppler/Makefile +0 -333
@@ -1,116 +0,0 @@
1
- //========================================================================
2
- //
3
- // GooCheckedOps.h
4
- //
5
- // This file is licensed under the GPLv2 or later
6
- //
7
- // Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
8
- // Copyright (C) 2019 LE GARREC Vincent <legarrec.vincent@gmail.com>
9
- // Copyright (C) 2019-2021 Albert Astals Cid <aacid@kde.org>
10
- //
11
- //========================================================================
12
-
13
- #ifndef GOO_CHECKED_OPS_H
14
- #define GOO_CHECKED_OPS_H
15
-
16
- #include <limits>
17
- #include <type_traits>
18
-
19
- template<typename T>
20
- inline bool checkedAssign(long long lz, T *z)
21
- {
22
- static_assert((std::numeric_limits<long long>::max)() > (std::numeric_limits<T>::max)(), "The max of long long type must be larger to perform overflow checks.");
23
- static_assert((std::numeric_limits<long long>::min)() < (std::numeric_limits<T>::min)(), "The min of long long type must be smaller to perform overflow checks.");
24
-
25
- if (lz > (std::numeric_limits<T>::max)() || lz < (std::numeric_limits<T>::min)()) {
26
- return true;
27
- }
28
-
29
- *z = static_cast<T>(lz);
30
- return false;
31
- }
32
-
33
- #ifndef __has_builtin
34
- # define __has_builtin(x) 0
35
- #endif
36
-
37
- template<typename T>
38
- inline bool checkedAdd(T x, T y, T *z)
39
- {
40
- // The __GNUC__ checks can not be removed until we depend on GCC >= 10.1
41
- // which is the first version that returns true for __has_builtin(__builtin_add_overflow)
42
- #if __GNUC__ >= 5 || __has_builtin(__builtin_add_overflow)
43
- return __builtin_add_overflow(x, y, z);
44
- #else
45
- const auto lz = static_cast<long long>(x) + static_cast<long long>(y);
46
- return checkedAssign(lz, z);
47
- #endif
48
- }
49
-
50
- template<>
51
- inline bool checkedAdd<long long>(long long x, long long y, long long *z)
52
- {
53
- #if __GNUC__ >= 5 || __has_builtin(__builtin_add_overflow)
54
- return __builtin_add_overflow(x, y, z);
55
- #else
56
- if (x > 0 && y > 0) {
57
- if (x > (std::numeric_limits<long long>::max)() - y) {
58
- return true;
59
- }
60
- } else if (x < 0 && y < 0) {
61
- if (x < (std::numeric_limits<long long>::min)() - y) {
62
- return true;
63
- }
64
- }
65
- *z = x + y;
66
- return false;
67
- #endif
68
- }
69
-
70
- template<typename T>
71
- inline bool checkedSubtraction(T x, T y, T *z)
72
- {
73
- #if __GNUC__ >= 5 || __has_builtin(__builtin_sub_overflow)
74
- return __builtin_sub_overflow(x, y, z);
75
- #else
76
- const auto lz = static_cast<long long>(x) - static_cast<long long>(y);
77
- return checkedAssign(lz, z);
78
- #endif
79
- }
80
-
81
- template<typename T>
82
- inline bool checkedMultiply(T x, T y, T *z)
83
- {
84
- #if __GNUC__ >= 5 || __has_builtin(__builtin_mul_overflow)
85
- return __builtin_mul_overflow(x, y, z);
86
- #else
87
- const auto lz = static_cast<long long>(x) * static_cast<long long>(y);
88
- return checkedAssign(lz, z);
89
- #endif
90
- }
91
-
92
- template<>
93
- inline bool checkedMultiply<long long>(long long x, long long y, long long *z)
94
- {
95
- #if __GNUC__ >= 5 || __has_builtin(__builtin_mul_overflow)
96
- return __builtin_mul_overflow(x, y, z);
97
- #else
98
- if (x != 0 && (std::numeric_limits<long long>::max)() / x < y) {
99
- return true;
100
- }
101
-
102
- *z = x * y;
103
- return false;
104
- #endif
105
- }
106
-
107
- template<typename T>
108
- inline T safeAverage(T a, T b)
109
- {
110
- static_assert((std::numeric_limits<long long>::max)() > (std::numeric_limits<T>::max)(), "The max of long long type must be larger to perform overflow checks.");
111
- static_assert((std::numeric_limits<long long>::min)() < (std::numeric_limits<T>::min)(), "The min of long long type must be smaller to perform overflow checks.");
112
-
113
- return static_cast<T>((static_cast<long long>(a) + static_cast<long long>(b)) / 2);
114
- }
115
-
116
- #endif // GOO_CHECKED_OPS_H
@@ -1,22 +0,0 @@
1
- //========================================================================
2
- //
3
- // GooLikely.h
4
- //
5
- // This file is licensed under the GPLv2 or later
6
- //
7
- // Copyright (C) 2008 Kees Cook <kees@outflux.net>
8
- //
9
- //========================================================================
10
-
11
- #ifndef GOOLIKELY_H
12
- #define GOOLIKELY_H
13
-
14
- #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
15
- # define likely(x) __builtin_expect((x), 1)
16
- # define unlikely(x) __builtin_expect((x), 0)
17
- #else
18
- # define likely(x) (x)
19
- # define unlikely(x) (x)
20
- #endif
21
-
22
- #endif
@@ -1,262 +0,0 @@
1
- //========================================================================
2
- //
3
- // GooString.h
4
- //
5
- // Simple variable-length string type.
6
- //
7
- // Copyright 1996-2003 Glyph & Cog, LLC
8
- //
9
- //========================================================================
10
-
11
- //========================================================================
12
- //
13
- // Modified under the Poppler project - http://poppler.freedesktop.org
14
- //
15
- // All changes made under the Poppler project to this file are licensed
16
- // under GPL version 2 or later
17
- //
18
- // Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
19
- // Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
20
- // Copyright (C) 2008-2010, 2012, 2014, 2017-2022 Albert Astals Cid <aacid@kde.org>
21
- // Copyright (C) 2012-2014 Fabio D'Urso <fabiodurso@hotmail.it>
22
- // Copyright (C) 2013 Jason Crain <jason@aquaticape.us>
23
- // Copyright (C) 2015, 2018 Adam Reichold <adam.reichold@t-online.de>
24
- // Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
25
- // Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
26
- // Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
27
- // Copyright (C) 2019 Christophe Fergeau <cfergeau@redhat.com>
28
- // Copyright (C) 2019 Tomoyuki Kubota <himajin100000@gmail.com>
29
- // Copyright (C) 2019, 2020 Oliver Sander <oliver.sander@tu-dresden.de>
30
- // Copyright (C) 2019 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de>
31
- // Copyright (C) 2020 Thorsten Behrens <Thorsten.Behrens@CIB.de>
32
- // Copyright (C) 2022 Even Rouault <even.rouault@spatialys.com>
33
- //
34
- // To see a description of the changes please see the Changelog file that
35
- // came with your tarball or type make ChangeLog if you are building from git
36
- //
37
- //========================================================================
38
-
39
- #ifndef GooString_H
40
- #define GooString_H
41
-
42
- #include "poppler_private_export.h"
43
-
44
- #include <cstdarg>
45
- #include <memory>
46
- #include <string>
47
-
48
- #ifdef __clang__
49
- # define GOOSTRING_FORMAT __attribute__((__annotate__("gooformat")))
50
- #else
51
- # define GOOSTRING_FORMAT
52
- #endif
53
-
54
- class GooString : private std::string
55
- {
56
- public:
57
- // Create an empty string.
58
- GooString() = default;
59
-
60
- // Destructor.
61
- ~GooString() = default;
62
-
63
- GooString(GooString &&other) = default;
64
- GooString &operator=(GooString &&other) = default;
65
-
66
- GooString(const GooString &other) = delete;
67
- GooString &operator=(const GooString &other) = delete;
68
-
69
- // Create a string from a C string.
70
- explicit GooString(const char *sA) : std::string(sA ? sA : "") { }
71
-
72
- // Zero-cost conversion from and to std::string
73
- explicit GooString(const std::string &str) : std::string(str) { }
74
- explicit GooString(std::string &&str) : std::string(std::move(str)) { }
75
-
76
- const std::string &toStr() const { return *this; }
77
- std::string &toNonConstStr() { return *this; }
78
-
79
- // Create a string from <lengthA> chars at <sA>. This string
80
- // can contain null characters.
81
- GooString(const char *sA, int lengthA) : std::string(sA ? sA : "", sA ? lengthA : 0) { }
82
-
83
- // Create a string from <lengthA> chars at <idx> in <str>.
84
- GooString(const GooString *str, int idx, int lengthA) : std::string(*str, idx, lengthA) { }
85
- GooString(const std::string &str, int idx, int lengthA) : std::string(str, idx, lengthA) { }
86
-
87
- // Set content of a string to <newStr>.
88
- GooString *Set(const GooString *newStr)
89
- {
90
- assign(newStr ? static_cast<const std::string &>(*newStr) : std::string {});
91
- return this;
92
- }
93
- GooString *Set(const char *newStr)
94
- {
95
- assign(newStr ? newStr : "");
96
- return this;
97
- }
98
- GooString *Set(const char *newStr, int newLen)
99
- {
100
- assign(newStr ? newStr : "", newStr ? newLen : 0);
101
- return this;
102
- }
103
-
104
- // Copy a string.
105
- explicit GooString(const GooString *str) : std::string(str ? static_cast<const std::string &>(*str) : std::string {}) { }
106
- GooString *copy() const { return new GooString(this); }
107
-
108
- // Concatenate two strings.
109
- GooString(const GooString *str1, const GooString *str2)
110
- {
111
- reserve(str1->size() + str2->size());
112
- static_cast<std::string &>(*this).append(*str1);
113
- static_cast<std::string &>(*this).append(*str2);
114
- }
115
-
116
- // Create a formatted string. Similar to printf, but without the
117
- // string overflow issues. Formatting elements consist of:
118
- // {<arg>:[<width>][.<precision>]<type>}
119
- // where:
120
- // - <arg> is the argument number (arg 0 is the first argument
121
- // following the format string) -- NB: args must be first used in
122
- // order; they can be reused in any order
123
- // - <width> is the field width -- negative to reverse the alignment;
124
- // starting with a leading zero to zero-fill (for integers)
125
- // - <precision> is the number of digits to the right of the decimal
126
- // point (for floating point numbers)
127
- // - <type> is one of:
128
- // d, x, X, o, b -- int in decimal, lowercase hex, uppercase hex, octal, binary
129
- // ud, ux, uX, uo, ub -- unsigned int
130
- // ld, lx, lX, lo, lb, uld, ulx, ulX, ulo, ulb -- long, unsigned long
131
- // lld, llx, llX, llo, llb, ulld, ullx, ullX, ullo, ullb
132
- // -- long long, unsigned long long
133
- // f, g, gs -- floating point (float or double)
134
- // f -- always prints trailing zeros (eg 1.0 with .2f will print 1.00)
135
- // g -- omits trailing zeros and, if possible, the dot (eg 1.0 shows up as 1)
136
- // gs -- is like g, but treats <precision> as number of significant
137
- // digits to show (eg 0.0123 with .2gs will print 0.012)
138
- // c -- character (char, short or int)
139
- // s -- string (char *)
140
- // t -- GooString *
141
- // w -- blank space; arg determines width
142
- // To get literal curly braces, use {{ or }}.
143
- POPPLER_PRIVATE_EXPORT static std::unique_ptr<GooString> format(const char *fmt, ...) GOOSTRING_FORMAT;
144
- POPPLER_PRIVATE_EXPORT static std::unique_ptr<GooString> formatv(const char *fmt, va_list argList);
145
-
146
- // Get length.
147
- int getLength() const { return size(); }
148
-
149
- // Get C string.
150
- using std::string::c_str;
151
-
152
- // Get <i>th character.
153
- char getChar(int i) const { return (*this)[i]; }
154
-
155
- // Change <i>th character.
156
- void setChar(int i, char c) { (*this)[i] = c; }
157
-
158
- // Clear string to zero length.
159
- GooString *clear()
160
- {
161
- static_cast<std::string &>(*this).clear();
162
- return this;
163
- }
164
-
165
- // Append a character or string.
166
- GooString *append(char c)
167
- {
168
- push_back(c);
169
- return this;
170
- }
171
- GooString *append(const GooString *str)
172
- {
173
- static_cast<std::string &>(*this).append(*str);
174
- return this;
175
- }
176
- GooString *append(const std::string &str)
177
- {
178
- static_cast<std::string &>(*this).append(str);
179
- return this;
180
- }
181
- GooString *append(const char *str)
182
- {
183
- static_cast<std::string &>(*this).append(str);
184
- return this;
185
- }
186
- GooString *append(const char *str, int lengthA)
187
- {
188
- static_cast<std::string &>(*this).append(str, lengthA);
189
- return this;
190
- }
191
-
192
- // Append a formatted string.
193
- POPPLER_PRIVATE_EXPORT GooString *appendf(const char *fmt, ...) GOOSTRING_FORMAT;
194
- POPPLER_PRIVATE_EXPORT GooString *appendfv(const char *fmt, va_list argList);
195
-
196
- // Insert a character or string.
197
- GooString *insert(int i, char c)
198
- {
199
- static_cast<std::string &>(*this).insert(i, 1, c);
200
- return this;
201
- }
202
- GooString *insert(int i, const GooString *str)
203
- {
204
- static_cast<std::string &>(*this).insert(i, *str);
205
- return this;
206
- }
207
- GooString *insert(int i, const char *str)
208
- {
209
- static_cast<std::string &>(*this).insert(i, str);
210
- return this;
211
- }
212
- GooString *insert(int i, const char *str, int lengthA)
213
- {
214
- static_cast<std::string &>(*this).insert(i, str, lengthA);
215
- return this;
216
- }
217
-
218
- // Delete a character or range of characters.
219
- GooString *del(int i, int n = 1)
220
- {
221
- erase(i, n);
222
- return this;
223
- }
224
-
225
- // Convert string to all-lower case.
226
- POPPLER_PRIVATE_EXPORT GooString *lowerCase();
227
- POPPLER_PRIVATE_EXPORT static void lowerCase(std::string &s);
228
-
229
- // Returns a new string converted to all-lower case.
230
- POPPLER_PRIVATE_EXPORT static std::string toLowerCase(const std::string &s);
231
-
232
- // Compare two strings: -1:< 0:= +1:>
233
- int cmp(const GooString *str) const { return compare(*str); }
234
- int cmp(const std::string &str) const { return compare(str); }
235
- int cmpN(GooString *str, int n) const { return compare(0, n, *str); }
236
- int cmp(const char *sA) const { return compare(sA); }
237
- int cmpN(const char *sA, int n) const { return compare(0, n, sA); }
238
-
239
- // Return true if strings starts with prefix
240
- POPPLER_PRIVATE_EXPORT bool startsWith(const char *prefix) const;
241
- // Return true if string ends with suffix
242
- POPPLER_PRIVATE_EXPORT bool endsWith(const char *suffix) const;
243
-
244
- static bool startsWith(std::string_view str, std::string_view prefix) { return str.size() >= prefix.size() && 0 == str.compare(0, prefix.size(), prefix); }
245
- static bool endsWith(std::string_view str, std::string_view suffix) { return str.size() >= suffix.size() && 0 == str.compare(str.size() - suffix.size(), suffix.size(), suffix); }
246
-
247
- bool hasUnicodeMarker() const { return hasUnicodeMarker(*this); }
248
- static bool hasUnicodeMarker(const std::string &s) { return s.size() >= 2 && s[0] == '\xfe' && s[1] == '\xff'; }
249
- bool hasUnicodeMarkerLE() const { return hasUnicodeMarkerLE(*this); }
250
- static bool hasUnicodeMarkerLE(const std::string &s) { return s.size() >= 2 && s[0] == '\xff' && s[1] == '\xfe'; }
251
- bool hasJustUnicodeMarker() const { return size() == 2 && hasUnicodeMarker(); }
252
-
253
- POPPLER_PRIVATE_EXPORT void prependUnicodeMarker();
254
-
255
- // Sanitizes the string so that it does
256
- // not contain any ( ) < > [ ] { } / %
257
- // The postscript mode also has some more strict checks
258
- // The caller owns the return value
259
- POPPLER_PRIVATE_EXPORT GooString *sanitizedName(bool psmode) const;
260
- };
261
-
262
- #endif
@@ -1,59 +0,0 @@
1
- //========================================================================
2
- //
3
- // GooTimer.cc
4
- //
5
- // This file is licensed under GPLv2 or later
6
- //
7
- // Copyright 2005 Jonathan Blandford <jrb@redhat.com>
8
- // Copyright 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
9
- // Copyright 2010 Hib Eris <hib@hiberis.nl>
10
- // Copyright 2011 Albert Astals cid <aacid@kde.org>
11
- // Copyright 2014 Bogdan Cristea <cristeab@gmail.com>
12
- // Copyright 2014 Peter Breitenlohner <peb@mppmu.mpg.de>
13
- // Inspired by gtimer.c in glib, which is Copyright 2000 by the GLib Team
14
- //
15
- //========================================================================
16
-
17
- #ifndef GOOTIMER_H
18
- #define GOOTIMER_H
19
-
20
- #include "poppler-config.h"
21
- #include "poppler_private_export.h"
22
-
23
- #ifdef HAVE_GETTIMEOFDAY
24
- # include <sys/time.h>
25
- #endif
26
-
27
- #ifdef _WIN32
28
- # ifndef NOMINMAX
29
- # define NOMINMAX
30
- # endif
31
- # include <windows.h>
32
- #endif
33
-
34
- //------------------------------------------------------------------------
35
- // GooTimer
36
- //------------------------------------------------------------------------
37
-
38
- class POPPLER_PRIVATE_EXPORT GooTimer
39
- {
40
- public:
41
- // Create a new timer.
42
- GooTimer();
43
-
44
- void start();
45
- void stop();
46
- double getElapsed();
47
-
48
- private:
49
- #ifdef HAVE_GETTIMEOFDAY
50
- struct timeval start_time;
51
- struct timeval end_time;
52
- #elif defined(_WIN32)
53
- LARGE_INTEGER start_time;
54
- LARGE_INTEGER end_time;
55
- #endif
56
- bool active;
57
- };
58
-
59
- #endif
@@ -1,39 +0,0 @@
1
- //========================================================================
2
- //
3
- // ImgWriter.h
4
- //
5
- // This file is licensed under the GPLv2 or later
6
- //
7
- // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
8
- // Copyright (C) 2009, 2011, 2018 Albert Astals Cid <aacid@kde.org>
9
- // Copyright (C) 2010 Adrian Johnson <ajohnson@redneon.com>
10
- // Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com>
11
- // Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de>
12
- //
13
- //========================================================================
14
-
15
- #ifndef IMGWRITER_H
16
- #define IMGWRITER_H
17
-
18
- #include "poppler_private_export.h"
19
-
20
- #include <cstdio>
21
-
22
- class POPPLER_PRIVATE_EXPORT ImgWriter
23
- {
24
- public:
25
- ImgWriter() = default;
26
- ImgWriter(const ImgWriter &) = delete;
27
- ImgWriter &operator=(const ImgWriter &other) = delete;
28
-
29
- virtual ~ImgWriter();
30
- virtual bool init(FILE *f, int width, int height, int hDPI, int vDPI) = 0;
31
-
32
- virtual bool writePointers(unsigned char **rowPointers, int rowCount) = 0;
33
- virtual bool writeRow(unsigned char **row) = 0;
34
-
35
- virtual bool close() = 0;
36
- virtual bool supportCMYK() { return false; }
37
- };
38
-
39
- #endif
@@ -1,69 +0,0 @@
1
- //========================================================================
2
- //
3
- // JpegWriter.h
4
- //
5
- // This file is licensed under the GPLv2 or later
6
- //
7
- // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
8
- // Copyright (C) 2010, 2012, 2017 Adrian Johnson <ajohnson@redneon.com>
9
- // Copyright (C) 2010 Jürg Billeter <j@bitron.ch>
10
- // Copyright (C) 2010 Harry Roberts <harry.roberts@midnight-labs.org>
11
- // Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com>
12
- // Copyright (C) 2011, 2021 Albert Astals Cid <aacid@kde.org>
13
- // Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de>
14
- // Copyright (C) 2018 Martin Packman <gzlist@googlemail.com>
15
- //
16
- //========================================================================
17
-
18
- #ifndef JPEGWRITER_H
19
- #define JPEGWRITER_H
20
-
21
- #include "poppler-config.h"
22
- #include "poppler_private_export.h"
23
-
24
- #ifdef ENABLE_LIBJPEG
25
-
26
- # include <sys/types.h>
27
- # include "ImgWriter.h"
28
-
29
- struct JpegWriterPrivate;
30
-
31
- class POPPLER_PRIVATE_EXPORT JpegWriter : public ImgWriter
32
- {
33
- public:
34
- /* RGB - 3 bytes/pixel
35
- * GRAY - 1 byte/pixel
36
- * CMYK - 4 bytes/pixel
37
- */
38
- enum Format
39
- {
40
- RGB,
41
- GRAY,
42
- CMYK
43
- };
44
-
45
- JpegWriter(int quality, bool progressive, Format format = RGB);
46
- explicit JpegWriter(Format format = RGB);
47
- ~JpegWriter() override;
48
-
49
- JpegWriter(const JpegWriter &other) = delete;
50
- JpegWriter &operator=(const JpegWriter &other) = delete;
51
-
52
- void setQuality(int quality);
53
- void setProgressive(bool progressive);
54
- void setOptimize(bool optimize);
55
- bool init(FILE *f, int width, int height, int hDPI, int vDPI) override;
56
-
57
- bool writePointers(unsigned char **rowPointers, int rowCount) override;
58
- bool writeRow(unsigned char **row) override;
59
-
60
- bool close() override;
61
- bool supportCMYK() override;
62
-
63
- private:
64
- JpegWriterPrivate *priv;
65
- };
66
-
67
- #endif
68
-
69
- #endif
@@ -1,68 +0,0 @@
1
- //========================================================================
2
- //
3
- // PNGWriter.h
4
- //
5
- // This file is licensed under the GPLv2 or later
6
- //
7
- // Copyright (C) 2009 Warren Toomey <wkt@tuhs.org>
8
- // Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
9
- // Copyright (C) 2009, 2011-2013, 2021 Albert Astals Cid <aacid@kde.org>
10
- // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
11
- // Copyright (C) 2010, 2011, 2013, 2017 Adrian Johnson <ajohnson@redneon.com>
12
- // Copyright (C) 2012 Pino Toscano <pino@kde.org>
13
- //
14
- //========================================================================
15
-
16
- #ifndef PNGWRITER_H
17
- #define PNGWRITER_H
18
-
19
- #include "poppler-config.h"
20
- #include "poppler_private_export.h"
21
-
22
- #ifdef ENABLE_LIBPNG
23
-
24
- # include "ImgWriter.h"
25
-
26
- struct PNGWriterPrivate;
27
-
28
- class POPPLER_PRIVATE_EXPORT PNGWriter : public ImgWriter
29
- {
30
- public:
31
- /* RGB - 3 bytes/pixel
32
- * RGBA - 4 bytes/pixel
33
- * GRAY - 1 byte/pixel
34
- * MONOCHROME - 8 pixels/byte
35
- * RGB48 - 6 bytes/pixel
36
- */
37
- enum Format
38
- {
39
- RGB,
40
- RGBA,
41
- GRAY,
42
- MONOCHROME,
43
- RGB48
44
- };
45
-
46
- explicit PNGWriter(Format format = RGB);
47
- ~PNGWriter() override;
48
-
49
- PNGWriter(const PNGWriter &other) = delete;
50
- PNGWriter &operator=(const PNGWriter &other) = delete;
51
-
52
- void setICCProfile(const char *name, unsigned char *data, int size);
53
- void setSRGBProfile();
54
-
55
- bool init(FILE *f, int width, int height, int hDPI, int vDPI) override;
56
-
57
- bool writePointers(unsigned char **rowPointers, int rowCount) override;
58
- bool writeRow(unsigned char **row) override;
59
-
60
- bool close() override;
61
-
62
- private:
63
- PNGWriterPrivate *priv;
64
- };
65
-
66
- #endif
67
-
68
- #endif